[android-developers] Re: Softkeyboard
Hi, I am the author of 9420 Tablet Keyboard, it is on Google Play. What you are looking for can be done by creating key-sequence logic of output, we usually call meta state. For starter, you want to look at onKey() method to intercept input from onscreen KB and start from there. Best Regards, Solution 9420 On Ma y 16, 2:44 am, Tony tonych...@gmail.com wrote: I want to program a softkeyboard where you click on a key, and instead of outputting an alphabet into the textediting area, i want it to output a different letter or symbol. Sort of like how a japanese romaji keyboard would work. (eg: when you click on the a, r, i, g, a, t, o, u keys, it would output あ、り、が、と、う, instantly as you type them. Anybody have any suggestions on how to set that up? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: java.lang.OutOfMemoryError on 4.0.3 APV and phone not in 2.1 2.3
? NewsGroup OK. I'm guessing here from my 2-day observation on this case. [First of All, this is the good reading. May not relate to this case] http://developer.android.com/resources/articles/avoiding-memory-leaks.html [What I did] - In my case is about those global bitmap. (I cache my own (image) view). - Manually free bitmap to assist Garbage Collection activity. I have not got to the bottom of this item. But the symptom seems to go away. Best Regards, Solution 9420 [My code is like these] private Bitmap bp=null; void main() { .. .. } onOrientationChage() { if( bp != null) bp.recycle(); //Delete any references to this bitmap, mark as NotUsed bp = buildNewViewCache(); } Bitmap buildNewViewCache() { Bitmap newAllocatedBP = new bitMap(.); return newAllocatedBP; } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] java.lang.OutOfMemoryError on 4.0.3 APV and phone not in 2.1 2.3
hi, Just want to share with U that I also experienced the same scenario when I did the compatibility test of my app (9420 Tablet Keyboard) again 4.0.4 (GNexus). What I did is unscientific but to do bitmap.recycle() more often. (check null first) on the unused ones. The symptom seems to go away. Regards, Solution 9420 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Bluetooth (BT) Hardware keyboard custom layout and special keys service
Hi There, The CNTL key is not existed in Android 2.x series. You'll have to dig into the OS keymap, like what you mentioned, to open these to the underlined applications. My app, 9420 Tablet keyboard (and 9420 Thai Keyboard), handls the key inputs from the HW keyboard as well beside the on-screen one. It emulates Cntl-A, Cntl-X/C/V and even overrides the sticky behavier of the SHIFT key to non-sticky. On the 9420 Thai Keyboard, it also suppots multi-tap and long-press from the HW keyboard (just to mention to show how far the customization can be done without rooting the phone) It is on the market, you can check it out, maybe it serves your purposes more or less. Frankly speaking, 9420 Thai/Tablet Keyboard is designed to be able to re-map the HW keys to any Android keyCode as long as the HW keyboard is sending out the key inputs. Best Regards, Solutikn 9420 www.solution9420.com On Mar 18, 7:30 pm, Никита Траторов nikita.win...@gmail.com wrote: https://lh3.googleusercontent.com/-junDMI1xOCI/T2XUzN_5f5I/Aq... *Good day to all developers!* I have a Bluetooth (BT) Hardware keyboard RAPOO E6300, working on my SGSII with Android 2.3.5. It is working fine, but some special keys is not mapped as expected or may not work at all, like Ctrl in Putty. For example, VolumeUp/VolumeDown keys is working, but Mute key is don't. *With help of dev.android.com I get keymap:* D:\android-sdks\platform-toolsadb shell getevent -p add device 1: /dev/input/event9 name: Broadcom Bluetooth HID events: SYN (): 0001 0004 0014 KEY (0001): 0001 0002 0003 0004 0005 0006 0007 0008 0009 000a 000b 000c 000d 000e 000f 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 001a 001b 001c 001d 001e 001f 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 002a 002b 002c 002d 002e 002f 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 003a 003b 003c 003d 003e 003f 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 004a 004b 004c 004d 004e 004f 0050 0051 0052 0053 0055 0056 0057 0058 0059 005a 005b 005c 005d 005e 005f 0060 0061 0062 0063 0064 0066 0067 0068 0069 006a 006b 006c 006d 006e 006f 0071 0072 0073 0074 0075 0077 0079 007a 007b 007c 007d 007e 007f 0080 0081 0082 0083 0084 0085 0086 0087 0088 0089 008a 008c 008e 0096 0098 009e 009f 00a1 00a3 00a4 00a5 00a6 00ac 00ad 00b0 00b1 00b2 00b3 00b4 00b7 00b8 00b9 00ba 00bb 00bc 00bd 00be 00bf 00c0 00c1 00c2 00d9 00f0 MSC (0004): 0004 I think, that half of solution of this problem is to develop new keylayout file and put it to */system/usr/keychars*. And the othe half of solution is to develop android service app, that will cover othe virtual keys, like changing tracks of media/radio player etc. And this service must start or will enabled new functions only when keyboard is connected with device. Who can help me with advice? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Cannot catch swipe action for SoftKeyboard
Dear Tsukishiro, Let me start with the bottom line which are 1. You need to have your own KeyboardView. - Either extend from Android KeyboardView or make your own based on Android KeyboardView. - For example http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.0.3_r1/android/inputmethodservice/KeyboardView.java#KeyboardView 2. Intercept GestureDetector.onTouchEvent(me) in the onTouchEvent() - You need to grab the x, y of the ACTION_DOWN and identify which key is actually pressed (before swiping) 3. Distinguish keyboard-level swipe and key-level swipe using your own method (Mine uses the swipe distance. Short = key-level, Long=keyboard- level) To actually implement your own view, you will need to tell the OS you want to use your (keyboard) view instead - Check out the method onCreateInputView() - Don't forget to edit the xml/input.xml and change the class name from Android KeyboardView to yours. (Mine is com.solution9420.android.thaikeyboard9420.ThaiKeyboardViewNew xmlns:android=http://schemas.android.com/apk/res/android; android:id=@+id/keyboard android:layout_alignParentBottom=true I started by study the Android KeyboardView code. In summary, there are two main portions a. the drawing part - look into onDraw() but you can skip this part for now. b. Input capturing part - the main logic is at onTouchEvent() and GestureDetector.onTouchEvent(me) - also this important one. detectAndSendKey() Once you reach step #2, you can then start to dump out the x,y of the actions you do on the keyboard. Cheers, Solution 9420 On Mar 14, 8:42 am, tsukishiro yamazaki tsukishir...@gmail.com wrote: Hello again Solution 9420, I just downloaded the 9420 Tablet Keyboard to my device and had a taste of your IME. It's nice and swiping clearly works. For example, swipeRight changes keyboard type between English and Thai. But I'm afraid I was not able to find a way to check Key-level fling. So can you help me with the following questions : 1.) How did you enable swiping on the keyboard? 2.) How to enable key-level fling? Example, if I fling a key upwards, a different character will be printed. Hoping for your guidance. Thanks and best regards, - tsukishiro On Wednesday, March 14, 2012 9:34:16 AM UTC+9, tsukishiro yamazaki wrote: Hi Solution 9420, Thanks so much for your reply! I have been trying SoftKeyboard (Demo API) and I wanted to verify if the method swipeLeft(), which has been implemented to do backspace or delete function, is actually working. So I deployed SoftKeyboard.apk to my device and have been swiping my finger on the keyboard. But as I mentioned above, all I get is a bunch of letters being printed out because of the swipe: motion over the row of keys. I will check your application to see how you made swiping and especially key-level fling (I really wanted to implement this on my IME too) to work. Thank you again and best regards, P.S. Your English is perfectly fine and understandable :) On Tuesday, March 13, 2012 6:39:40 PM UTC+9, Solution 9420 wrote: Hi there, I am the creator of 9420 Tablet Keyboard (and 9420 Thai Keyboard). Pretty much familiar with this matter. For swipe, you can only trap the outcome of the swipe thru the method swipeDown/Left/Up/Right() and it is the swipe at keyboard level. You can change the action of the swipe, for example, from delete to anything else). If you want to trap the MotionEvent, you will need to create your own keyboardView. That way, you can implement anything you want such as key-level flingUp. I'm poor on English. Please check out my application. It supports - configurable keyboard-level swipe - Key-level fling - MultiTap - LongPress All are done thru custom keyboard view. Seewww.solution9420.com Cheers, Solution 9420 On Mar 13, 3:57 pm, tsukishiro yamazaki tsukishir...@gmail.com wrote: Hello everyone, I wanted to implement swiping for the custom IME I am developing. Looking into SoftKeyboard sample code, it seems this can be handled by the swipe methods under OnKeyboardActionListener. However when I tried to test if the swipe methods in SoftKeyboard were working, I found myself having a hard time catching the event. For example, swipeLeft() method in SoftKeyboard will perform a backspace. But I never get to pull this off. I usually just get some random letters being printed out to the input field whenever I do swipe left aciton. Can someone tell me how to get swipe methods to work? Thanks and best regards, - tsukishiro -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers
[android-developers] Re: How to get smart key board on my device.
Hi, Is your Acer Iconia on R3.0 (HoneyComb)? If so, I guess you will have to set the option Use physical keyboard to OFF. (ON means you want to use physical keyboard only) It is on the input method selection icon (left to the right-most digital clock.) This option will only show when you connect the physicak device (a.k.a NFC or keyboard). Best Regards, Solution 9420 www.solution9420.com On Mar 14, 11:47 pm, Srinivas Nainala srito...@gmail.com wrote: Dear All, I am facing strange behavior on my Acer Iconia tablet when I connect NFC reader to the tablet USB port. Its killing my soft-keyboard on my screen (I am not able to enter any data on my application and even I observed with other application. The result is same). When I remove my NFC reader its immediately showing keyboard on the screen. How can I get the Keyboard even I have connected the my NFC reader to the tablet. Is there any way to call smart keyboard explicitly the tablet even Acer guys event manger kills soft keyboard whenever I connect my NFC reader through USB port. I am giving some of log, how its detecting and behaving :- 03-03 21:12:24.810: D/BatteryService(139): level:57 scale:100 status:3 health:2 present:true voltage: 3827 temperature: 286 technology: Li-ion AC powered:false USB powered:false icon:17302701 invalid charger:0 03-03 21:12:24.810: D/WifiService(139): ACTION_BATTERY_CHANGED pluggedType: 0 03-03 21:12:39.420: D/dalvikvm(226): GC_EXPLICIT freed 929K, 15% free 22433K/26247K, paused 8ms+7ms 03-03 21:12:41.660: D/EventHub(139): No input device configuration file found for device 'RFIDeas USB Keyboard'. 03-03 21:12:41.670: I/EventHub(139): New device: id=15, fd=221, path='/dev/input/event5', name='RFIDeas USB Keyboard', classes=0x8003, configuration='', keyLayout='/system/usr/keylayout/Generic.kl', keyCharacterMap='/system/usr/keychars/Generic.kcm', builtinKeyboard=false 03-03 21:12:41.670: I/InputReader(139): Device added: id=15, name='RFIDeas USB Keyboard', sources=0x0101 03-03 21:12:41.670: I/PowerManagerService(139): WakeLock: SCREEN_FROZEN(PARTIAL_WAKE_LOCK ) is acquired by pid(139), uid(1000) 03-03 21:12:41.670: I/ActivityManager(139): Config changed: { scale=1.0 imsi=0/0 loc=en_US touch=3 keys=2/1/1 nav=1/2 orien=L layout=0x1014 uiMode=0x11 seq=21} 03-03 21:12:41.960: I/PowerManagerService(139): WakeLock: SCREEN_FROZEN(PARTIAL_WAKE_LOCK ) is released by pid(139), uid(1000) 03-03 21:12:44.030: D/dalvikvm(139): GC_EXPLICIT freed 333K, 46% free 15799K/28935K, paused 6ms+5ms 03-03 21:12:46.990: D/dalvikvm(624): GC_EXPLICIT freed 22K, 5% free 6301K/6595K, paused 1ms+2ms 03-03 21:12:54.890: D/BatteryService(139): level:57 scale:100 status:3 health:2 present:true voltage: 3826 temperature: 286 technology: Li-ion AC powered:false USB powered:false icon:17302701 invalid charger:0 03-03 21:12:54.900: D/WifiService(139): ACTION_BATTERY_CHANGED pluggedType: 0 I hoping get some solutions for this problem:) I really appreciate someone give a comment on it. BR Srinivas -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Bring up Recent Apps Dialog programatically...
Dears, I posted previously but not sure if it got thru. My app has a button to bring up the Recent Apps Dialog. Is it possible to do that or it is locked for OS only? Can someone guide me the way to do it? I did searched for solution with no avails. Best Regards, Solution 9420 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Cannot catch swipe action for SoftKeyboard
Hi there, I am the creator of 9420 Tablet Keyboard (and 9420 Thai Keyboard). Pretty much familiar with this matter. For swipe, you can only trap the outcome of the swipe thru the method swipeDown/Left/Up/Right() and it is the swipe at keyboard level. You can change the action of the swipe, for example, from delete to anything else). If you want to trap the MotionEvent, you will need to create your own keyboardView. That way, you can implement anything you want such as key-level flingUp. I'm poor on English. Please check out my application. It supports - configurable keyboard-level swipe - Key-level fling - MultiTap - LongPress All are done thru custom keyboard view. See www.solution9420.com Cheers, Solution 9420 On Mar 13, 3:57 pm, tsukishiro yamazaki tsukishir...@gmail.com wrote: Hello everyone, I wanted to implement swiping for the custom IME I am developing. Looking into SoftKeyboard sample code, it seems this can be handled by the swipe methods under OnKeyboardActionListener. However when I tried to test if the swipe methods in SoftKeyboard were working, I found myself having a hard time catching the event. For example, swipeLeft() method in SoftKeyboard will perform a backspace. But I never get to pull this off. I usually just get some random letters being printed out to the input field whenever I do swipe left aciton. Can someone tell me how to get swipe methods to work? Thanks and best regards, - tsukishiro -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Bring up Recent Apps Dialog programatically...
Thank Justin. I'll check it out. Best Regards, Solution 9420 On Mar 13, 10:29 pm, Justin Anderson magouyaw...@gmail.com wrote: AFAIK you can't access that... However, it isn't super hard to roll your own. This method returns a list of recently run apps:http://developer.android.com/reference/android/app/ActivityManager.ht... One advantage to this is that the default one, at least on older versions of Android, only shows you about 8 apps. If you roll your own can show as many as you want. Thanks, Justin Anderson MagouyaWare Developerhttp://sites.google.com/site/magouyaware On Mon, Mar 12, 2012 at 9:30 AM, Solution 9420 solution9...@gmail.comwrote: Dears, I posted previously but not sure if it got thru. My app has a button to bring up the Recent Apps Dialog. Is it possible to do that or it is locked for OS only? Can someone guide me the way to do it? I did searched for solution with no avails. Best Regards, Solution 9420 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: find word in faster speed
Hi, I'm the auther of 9420 Thai Keyboard which incorporates English word suggestion feature as well. I've around 200K words and can look up in average of 80 mSec. Assuming the word DB is static, I've done the following... 1. pre-sorted your word in file. 2. pre-index your words. 3. Use binary search tree algorithm. You'll have to a bit careful the size of the index file, and very optimized on memory usage to avoid the delay from JAVA gabage collection as well. Cheers, Solution 9420... www.solution9420.com On Dec 20, 12:26 am, felix guofuchu...@gmail.com wrote: Hi! I'm working on a dict app on android, I need to search a list of words(about 500-600 thousand words) in file to find the word. It took me about 10-20 seconds to search the word. How can I improve the search speed? Thanks to all! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en