[android-beginners] Intent between 2 APK (different projects)?
Hello, I have two different android projects and would like to communicate a data stream between those. Is this possible with intents? I can only find example code to communicate within the same project. I would appreciate if someone know where to find some example code. Thanks! /Oskar --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Possible to send object via intent extras?
Hi, Is it possible to send an object via intent extras? I would like to send a pipeoutputstream to another APK (project via extra). Can I save an object to a bundle somehow? Regards, Oskar --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Intent between 2 APK (different projects)?
Solved! On Sep 23, 8:08 am, Oskar cov.johans...@gmail.com wrote: Hello, I have two different android projects and would like to communicate a data stream between those. Is this possible with intents? I can only find example code to communicate within the same project. I would appreciate if someone know where to find some example code. Thanks! /Oskar --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Possible to send object via intent extras?
Is it possible to send an object via intent extras? I would like to send a pipeoutputstream to another APK (project via extra). That is not possible. Can I save an object to a bundle somehow? Only if you can make it implement Parcelable or Serializable. If you need to expose some sort of stream, you will need to wrap the stream in some API that you expose to other applications via AIDL. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] A problem about application die unexpected.
I've met this problem serveral times. When my application is running, some times it die unexpected. The logcat print the message below: (the application name is remove) 09-23 16:00:42.407: INFO/DEBUG(539): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 09-23 16:00:42.407: INFO/DEBUG(539): Build fingerprint: 'generic/sdk/ generic/:1.5/CUPCAKE/147336:eng/test-keys' 09-23 16:00:42.407: INFO/DEBUG(539): pid: 1471, tid: 1534 com.xx.xx 09-23 16:00:42.407: INFO/DEBUG(539): signal 11 (SIGSEGV), fault addr 00fe 09-23 16:00:42.407: INFO/DEBUG(539): r0 ff9d9d9d r1 43804000 r2 4232 r3 45ba86a0 09-23 16:00:42.407: INFO/DEBUG(539): r4 ff9d9d9d r5 43804000 r6 becf511c r7 45ba86e8 09-23 16:00:42.407: INFO/DEBUG(539): r8 44da4008 r9 ff80 10 74e7 fp 0200 09-23 16:00:42.407: INFO/DEBUG(539): ip ff81 sp 45ba8698 lr ac043dfc pc 00fe cpsr 9030 09-23 16:00:42.467: INFO/DEBUG(539): #00 pc 00fe 09-23 16:00:42.548: INFO/DEBUG(539): #01 pc 00043df8 / system/lib/libsgl.so 09-23 16:00:42.557: INFO/DEBUG(539): #02 pc 0003e018 / system/lib/libsgl.so 09-23 16:00:42.557: INFO/DEBUG(539): #03 pc 0004ea00 / system/lib/libsgl.so 09-23 16:00:42.557: INFO/DEBUG(539): #04 pc 00047e4c / system/lib/libsgl.so 09-23 16:00:42.568: INFO/DEBUG(539): #05 pc 00075d64 / system/lib/libsgl.so 09-23 16:00:42.568: INFO/DEBUG(539): #06 pc 000767d4 / system/lib/libsgl.so 09-23 16:00:42.568: INFO/DEBUG(539): #07 pc 0005b3e8 / system/lib/libsgl.so 09-23 16:00:42.578: INFO/DEBUG(539): #08 pc 00054b80 / system/lib/libsgl.so 09-23 16:00:42.578: INFO/DEBUG(539): #09 pc 00052204 / system/lib/libsgl.so 09-23 16:00:42.588: INFO/DEBUG(539): #10 pc 0003d008 / system/lib/libandroid_runtime.so 09-23 16:00:42.588: INFO/DEBUG(539): #11 pc e3b4 / system/lib/libdvm.so 09-23 16:00:42.588: INFO/DEBUG(539): stack: 09-23 16:00:42.598: INFO/DEBUG(539): 45ba8658 09-23 16:00:42.598: INFO/DEBUG(539): 45ba865c 000b 09-23 16:00:42.611: INFO/DEBUG(539): 45ba8660 45ba86d4 09-23 16:00:42.611: INFO/DEBUG(539): 45ba8664 0001 09-23 16:00:42.617: INFO/DEBUG(539): 45ba8668 0010 09-23 16:00:42.632: INFO/DEBUG(539): 45ba866c 0010 09-23 16:00:42.632: INFO/DEBUG(539): 45ba8670 0010 09-23 16:00:42.632: INFO/DEBUG(539): 45ba8674 0010 09-23 16:00:42.632: INFO/DEBUG(539): 45ba8678 44da4008 09-23 16:00:42.638: INFO/DEBUG(539): 45ba867c 0080 09-23 16:00:42.638: INFO/DEBUG(539): 45ba8680 0020 09-23 16:00:42.638: INFO/DEBUG(539): 45ba8684 45ba87ec 09-23 16:00:42.648: INFO/DEBUG(539): 45ba8688 0006 09-23 16:00:42.648: INFO/DEBUG(539): 45ba868c 0006 09-23 16:00:42.648: INFO/DEBUG(539): 45ba8690 df002777 09-23 16:00:42.648: INFO/DEBUG(539): 45ba8694 e3a070ad 09-23 16:00:42.648: INFO/DEBUG(539): #01 45ba8698 0037 09-23 16:00:42.648: INFO/DEBUG(539): 45ba869c 09-23 16:00:42.648: INFO/DEBUG(539): 45ba86a0 44da4008 09-23 16:00:42.648: INFO/DEBUG(539): 45ba86a4 003039f0 [heap] 09-23 16:00:42.648: INFO/DEBUG(539): 45ba86a8 45ba8b54 09-23 16:00:42.648: INFO/DEBUG(539): 45ba86ac 0080 09-23 16:00:42.648: INFO/DEBUG(539): 45ba86b0 ffb7 09-23 16:00:42.648: INFO/DEBUG(539): 45ba86b4 0037 09-23 16:00:42.648: INFO/DEBUG(539): 45ba86b8 0100 09-23 16:00:42.648: INFO/DEBUG(539): 45ba86bc 44da4008 09-23 16:00:42.648: INFO/DEBUG(539): 45ba86c0 ff80 09-23 16:00:42.648: INFO/DEBUG(539): 45ba86c4 becf511c [stack] 09-23 16:00:42.648: INFO/DEBUG(539): 45ba86c8 0200 09-23 16:00:42.648: INFO/DEBUG(539): 45ba86cc ac03e01c /system/ lib/libsgl.so 09-23 16:00:43.577: INFO/ActivityManager(568): Process com.uc.browser (pid 1471) has died. 09-23 16:00:43.599: INFO/WindowManager(568): WIN DEATH: Window {43766f50 com.xx.xxr/com.xx.xx.Activityxx paused=false} 09-23 16:00:43.707: WARN/InputManagerService(568): Got RemoteException sending setActive(false) notification to pid 1471 uid 10018 so, what happended? Is there any possible operation will cause this problem? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Phone call, recording
Hi! Did i can using my application record phone talk? b.c. usually activity at phone calling will be stopped(or paused) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Phone call, recording
I think there is no good, and =\ And how about NDK? On Sep 23, 12:07 pm, Mark Murphy mmur...@commonsware.com wrote: Did Android SDK 1.6 provide api to work with call stream? (incomming/ outcomming) Not that I have seen. -- Mark Murphy (a Commons Guy)http://commonsware.com Android App Developer Books:http://commonsware.com/books.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Phone call, recording
And how about NDK? That would be a good question to ask on the [android-ndk] Google Group. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Phone call, recording
Good idea, thanks ;) On Sep 23, 1:03 pm, Mark Murphy mmur...@commonsware.com wrote: And how about NDK? That would be a good question to ask on the [android-ndk] Google Group. -- Mark Murphy (a Commons Guy)http://commonsware.com Android App Developer Books:http://commonsware.com/books.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Utility class for database query
Hi all, Can anybody suggest what functionality to provide in a query utility class/classes? The idea is to provide a database utility package for android developers. I just wanna do it for android community and of course for my learning.:-) Warm Regards, Sudeep --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] How can the permission exception happens?
Hello everyone I modified the Launcher and did add the permisson uses-permission android:name=android.permission.BIND_APPWIDGET /. But after make, when I start the emulator there will be an exception told me that Bind_appwidget permisson should add. Can anyone help me. Thanks This is my manifeist ?xml version=1.0 encoding=utf-8? !-- /* ** ** Copyright 2008, The Android Open Source Project ** ** Licensed under the Apache License, Version 2.0 (the License); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an AS IS BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License. */ -- manifest xmlns:android=http://schemas.android.com/apk/res/android; package=com.android.launcher android:sharedUserId=android.uid.shared android:sharedUserLabel=@string/application_name permission android:name=com.android.launcher.permission.INSTALL_SHORTCUT android:permissionGroup=android.permission-group.SYSTEM_TOOLS android:protectionLevel=normal android:label=@string/permlab_install_shortcut android:description=@string/permdesc_install_shortcut / permission android:name=com.android.launcher.permission.UNINSTALL_SHORTCUT android:permissionGroup=android.permission-group.SYSTEM_TOOLS android:protectionLevel=normal android:label=@string/permlab_uninstall_shortcut android:description=@string/permdesc_uninstall_shortcut/ permission android:name=com.android.launcher.permission.READ_SETTINGS android:permissionGroup=android.permission-group.SYSTEM_TOOLS android:protectionLevel=normal android:label=@string/permlab_read_settings android:description=@string/permdesc_read_settings/ permission android:name=com.android.launcher.permission.WRITE_SETTINGS android:permissionGroup=android.permission-group.SYSTEM_TOOLS android:protectionLevel=normal android:label=@string/permlab_write_settings android:description=@string/permdesc_write_settings/ uses-permission android:name=android.permission.CALL_PHONE / uses-permission android:name=android.permission.EXPAND_STATUS_BAR / uses-permission android:name=android.permission.GET_TASKS / uses-permission android:name=android.permission.READ_CONTACTS/ uses-permission android:name=android.permission.SET_WALLPAPER / uses-permission android:name=android.permission.SET_WALLPAPER_HINTS / uses-permission android:name=android.permission.VIBRATE / uses-permission android:name=android.permission.WRITE_SETTINGS / uses-permission android:name=android.permission.BIND_APPWIDGET / uses-permission android:name=com.android.launcher.permission.READ_SETTINGS / uses-permission android:name=com.android.launcher.permission.WRITE_SETTINGS / application android:name=LauncherApplication android:process=android.process.acore android:label=@string/application_name android:icon=@drawable/ic_launcher_home activity android:name=Launcher android:launchMode=singleTask android:clearTaskOnLaunch=true android:stateNotNeeded=true android:theme=@style/Theme android:screenOrientation=nosensor android:windowSoftInputMode=stateUnspecified|adjustPan intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.HOME/ category android:name=android.intent.category.DEFAULT / category android:name=android.intent.category.MONKEY / /intent-filter /activity activity android:name=WallpaperChooser android:label=@string/pick_wallpaper android:icon=@drawable/ic_launcher_gallery intent-filter action android:name=android.intent.action.SET_WALLPAPER / category android:name=android.intent.category.DEFAULT / /intent-filter /activity !-- Enable system-default search mode for any activity in Home -- meta-data android:name=android.app.default_searchable android:value=* / !-- Intent received used to install shortcuts from other applications -- receiver android:name=.InstallShortcutReceiver android:permission=com.android.launcher.permission.INSTALL_SHORTCUT intent-filter action android:name=com.android.launcher.action.INSTALL_SHORTCUT / /intent-filter
[android-beginners] Re: A problem about application die unexpected.
someone can correct me if i am wrong, but i believe this is normal and expected. android will stop your process when memory becomes low. to verify this, put some debugging in your onPause(), onStop(), onDestroy() methods. if those are being called, it the OS stopping your process. On 9/23/09 1:21 AM, whitech wrote: I've met this problem serveral times. When my application is running, some times it die unexpected. The logcat print the message below: (the application name is remove) 09-23 16:00:42.407: INFO/DEBUG(539): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 09-23 16:00:42.407: INFO/DEBUG(539): Build fingerprint: 'generic/sdk/ generic/:1.5/CUPCAKE/147336:eng/test-keys' 09-23 16:00:42.407: INFO/DEBUG(539): pid: 1471, tid: 1534 com.xx.xx 09-23 16:00:42.407: INFO/DEBUG(539): signal 11 (SIGSEGV), fault addr 00fe 09-23 16:00:42.407: INFO/DEBUG(539): r0 ff9d9d9d r1 43804000 r2 4232 r3 45ba86a0 09-23 16:00:42.407: INFO/DEBUG(539): r4 ff9d9d9d r5 43804000 r6 becf511c r7 45ba86e8 09-23 16:00:42.407: INFO/DEBUG(539): r8 44da4008 r9 ff80 10 74e7 fp 0200 09-23 16:00:42.407: INFO/DEBUG(539): ip ff81 sp 45ba8698 lr ac043dfc pc 00fe cpsr 9030 09-23 16:00:42.467: INFO/DEBUG(539): #00 pc 00fe 09-23 16:00:42.548: INFO/DEBUG(539): #01 pc 00043df8 / system/lib/libsgl.so 09-23 16:00:42.557: INFO/DEBUG(539): #02 pc 0003e018 / system/lib/libsgl.so 09-23 16:00:42.557: INFO/DEBUG(539): #03 pc 0004ea00 / system/lib/libsgl.so 09-23 16:00:42.557: INFO/DEBUG(539): #04 pc 00047e4c / system/lib/libsgl.so 09-23 16:00:42.568: INFO/DEBUG(539): #05 pc 00075d64 / system/lib/libsgl.so 09-23 16:00:42.568: INFO/DEBUG(539): #06 pc 000767d4 / system/lib/libsgl.so 09-23 16:00:42.568: INFO/DEBUG(539): #07 pc 0005b3e8 / system/lib/libsgl.so 09-23 16:00:42.578: INFO/DEBUG(539): #08 pc 00054b80 / system/lib/libsgl.so 09-23 16:00:42.578: INFO/DEBUG(539): #09 pc 00052204 / system/lib/libsgl.so 09-23 16:00:42.588: INFO/DEBUG(539): #10 pc 0003d008 / system/lib/libandroid_runtime.so 09-23 16:00:42.588: INFO/DEBUG(539): #11 pc e3b4 / system/lib/libdvm.so 09-23 16:00:42.588: INFO/DEBUG(539): stack: 09-23 16:00:42.598: INFO/DEBUG(539): 45ba8658 09-23 16:00:42.598: INFO/DEBUG(539): 45ba865c 000b 09-23 16:00:42.611: INFO/DEBUG(539): 45ba8660 45ba86d4 09-23 16:00:42.611: INFO/DEBUG(539): 45ba8664 0001 09-23 16:00:42.617: INFO/DEBUG(539): 45ba8668 0010 09-23 16:00:42.632: INFO/DEBUG(539): 45ba866c 0010 09-23 16:00:42.632: INFO/DEBUG(539): 45ba8670 0010 09-23 16:00:42.632: INFO/DEBUG(539): 45ba8674 0010 09-23 16:00:42.632: INFO/DEBUG(539): 45ba8678 44da4008 09-23 16:00:42.638: INFO/DEBUG(539): 45ba867c 0080 09-23 16:00:42.638: INFO/DEBUG(539): 45ba8680 0020 09-23 16:00:42.638: INFO/DEBUG(539): 45ba8684 45ba87ec 09-23 16:00:42.648: INFO/DEBUG(539): 45ba8688 0006 09-23 16:00:42.648: INFO/DEBUG(539): 45ba868c 0006 09-23 16:00:42.648: INFO/DEBUG(539): 45ba8690 df002777 09-23 16:00:42.648: INFO/DEBUG(539): 45ba8694 e3a070ad 09-23 16:00:42.648: INFO/DEBUG(539): #01 45ba8698 0037 09-23 16:00:42.648: INFO/DEBUG(539): 45ba869c 09-23 16:00:42.648: INFO/DEBUG(539): 45ba86a0 44da4008 09-23 16:00:42.648: INFO/DEBUG(539): 45ba86a4 003039f0 [heap] 09-23 16:00:42.648: INFO/DEBUG(539): 45ba86a8 45ba8b54 09-23 16:00:42.648: INFO/DEBUG(539): 45ba86ac 0080 09-23 16:00:42.648: INFO/DEBUG(539): 45ba86b0 ffb7 09-23 16:00:42.648: INFO/DEBUG(539): 45ba86b4 0037 09-23 16:00:42.648: INFO/DEBUG(539): 45ba86b8 0100 09-23 16:00:42.648: INFO/DEBUG(539): 45ba86bc 44da4008 09-23 16:00:42.648: INFO/DEBUG(539): 45ba86c0 ff80 09-23 16:00:42.648: INFO/DEBUG(539): 45ba86c4 becf511c [stack] 09-23 16:00:42.648: INFO/DEBUG(539): 45ba86c8 0200 09-23 16:00:42.648: INFO/DEBUG(539): 45ba86cc ac03e01c /system/ lib/libsgl.so 09-23 16:00:43.577: INFO/ActivityManager(568): Process com.uc.browser (pid 1471) has died. 09-23 16:00:43.599: INFO/WindowManager(568): WIN DEATH: Window {43766f50 com.xx.xxr/com.xx.xx.Activityxx paused=false} 09-23 16:00:43.707: WARN/InputManagerService(568): Got RemoteException sending setActive(false) notification to pid 1471 uid 10018 so, what happended? Is there any possible operation will cause this problem? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
[android-beginners] Re: Utility class for database query
have you seen android.database.*? what would you provide on top of that? On 9/23/09 4:34 AM, Sudeep Jha wrote: Hi all, Can anybody suggest what functionality to provide in a query utility class/classes? The idea is to provide a database utility package for android developers. I just wanna do it for android community and of course for my learning.:-) Warm Regards, Sudeep --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~--- --
[android-beginners] Sprite Type Images Guy
Hey Guys, I was wondering if there was any sort of sprite support built into Android? Currently, I've got TONS of tiny icon-ish files (40x100, 90x90) and it's taking up a considerable amount of space. The first set is around 272KB total and the second is 432KB. When I sprite and optimize the images, it comes out to 88KB and 152KB, a savings of around 60%. Also, that 450kb just inflates the size of my apk dramatically. Is there any way to do Spriting? I use the icon currently in Images in both Grid and ListViews. Thanks! Evan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Poor performance on my file loader (code optimization help!)
Thanks for the reply. I think your suggestion of going binary is one of the better ones I had considered. Especially because I can avoid the parseFloat() calls altogether using this method. As for the quaternion vs axis/angle, I had thought I HAD to translate them originally (I found out later with more research that I just had to use the more complicated matrix math rather than simple glrotate and gltranslate calls if I didn't). I don't suppose you could direct me to a tutorial or good description that will help a 3D rendering newbie like me use the quaternions? If it really is better/faster, I want to go that route rather than finding out later I should have. I'm still looking for any additional suggestions on what particular parts of the code might be killing my load times, although I'm sure switching to binary and not using acos and sqrt will help quite a bit. Thanks, Glen On Sep 22, 5:03 am, a1 arco...@gmail.com wrote: On 20 Wrz, 20:28, Glen Kimsey gkim...@gmail.com wrote: Hello! I'm fairly new to both Android and Java (pretty experienced in C/C++), and (stupidly, perhaps) took on a big project. In it, I need to load information about 3D models and their respective animations from a text file (proprietary file format based on PSK/PSA). cut private static float[] parseRotLine(String line) { float[] retFloat = new float[4]; StringTokenizer tok = new StringTokenizer(line); // Ignore rot tok.nextToken(); // theta tok.nextToken(); retFloat[0] = wToTheta(Float.parseFloat(tok.nextToken())); // x tok.nextToken(); retFloat[1] = Float.parseFloat(tok.nextToken()); // y tok.nextToken(); retFloat[2] = Float.parseFloat(tok.nextToken()); // z tok.nextToken(); retFloat[3] = Float.parseFloat(tok.nextToken()); // Need to scale this vector to make glRotate happy retFloat = scaleAxisAngleVector(retFloat); return retFloat; } private static float wToTheta(float w) { // w = cos(theta/2) float theta = (float)Math.acos((double)w) * 2; // convert theta to degrees theta = 180 * theta / (float)Math.PI; // The above calculation only gave us a value from 0 to 180 because of arccosine // TODO: Determine if this is a problem. Note that w can be negative, and this implies 180 degrees if (w 0) { theta += 180; } return theta; } private static float[] scaleAxisAngleVector(float[] unscaled) { float[] scaled = new float[4]; // scale = sqrt(x^2 + y^2 + z^2); float scale = (float)Math.sqrt(unscaled[1] * unscaled[1] + unscaled [2] * unscaled[2] + unscaled[3] * unscaled[3]); if (scale != 0) { scaled[0] = unscaled[0]; scaled[1] = unscaled[1] / scale; scaled[2] = unscaled[2] / scale; scaled[3] = unscaled[3] / scale; } else { // Scale can be 0, which means we're not rotating // but dividing by zero is bad, and glRotate still // needs a normalized vector. scaled[0] = 0; scaled[1] = 1; scaled[2] = 0; scaled[3] = 0; } return scaled; }} End of Loader Code Ugh, why oh why are you transforming quaterninions to axis/angle representation? Quaternion interpolation is easier, and gives better result (you will also save a lot of time on calculations). About performance, if it's possible (eg. you are not downloading the scene files from network or smth), write a small utility that will convert text file to binary representation offline, and then read the binary files on android. Also try to minimize number of allocation during file loading. -- Bart 'arcone1' janusz --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Poor performance on my file loader (code optimization help!)
Fadden, Sorry, I missed your reply when I responded to Bart! I tried to find significant ways that I could avoid allocation, but the StringTokenizer is the main thing that I'm calling 'new' on and I didn't see any way to avoid doing that for every line. Your suggestion of using regexs for a parser kind of threw me off, because I didn't even see that as a possibility. I'll have to look into that and see what you mean. I also didn't know the G1 didn't have floating- point hardware. Will this likely be the case for other android phones in the near future? This information combined with Bart's suggestion to stick with quaternions means I'll very likely be removing those calls to acos and sqrt entirely. Also, thanks for the links. Your reply was extremely helpful. Thanks! Glen On Sep 21, 7:22 pm, fadden fad...@android.com wrote: On Sep 20, 11:28 am, Glen Kimsey gkim...@gmail.com wrote: The loading process on a sample (1000+ line) file is abysmally slow (more than 4 minutes). [...] Some possible causes for the slowness: - Extensive use of parseFloat() - Creating new StringTokenizer for every line - Inefficiencies in for() loops (not caching as necessary?) - Repeated use of the acos() and sqrt() functions Re-use objects when possible to avoid allocation and construction overhead. For a parser using regular expressions, you avoid the cost of recompiling the RE. acos() and sqrt() are not especially fast; sqrt () in particular, since the G1 lacks floating-point hardware. You can get some sense for where the time is going with the method tracing facility: http://developer.android.com/guide/developing/tools/traceview.html [...] I could even do something as drastic as performing this load in a separate app (before distribution) and somehow exporting the resulting object (KdfAnimation) that could more easily be picked back up (this would work in C, but I'm doubtful Java would allow such low-level memory copying). Java does provide a serialization mechanism, but it's not widely loved. :-) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Syntax error with function
Hello, I am working with the softkeyboard example in the SDK and I can't get past an error. I want to use 2 public functions in the KeyboardView class. It finds getKeyboard(), but invalidateAllKeys(). I created the code below to show the problem. I am using 1.6 SDK. Any suggestions would be helpful. package com.example.android.softkeyboard; import android.content.Context; import android.inputmethodservice.Keyboard; import android.inputmethodservice.KeyboardView; import android.inputmethodservice.Keyboard.Key; import android.util.AttributeSet; public class LatinKeyboardView extends KeyboardView { public LatinKeyboardView(Context context, AttributeSet attrs) { super(context, attrs); getKeyboard(); //found invalidateAllKeys(); //Not found } ... Nitin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Gallery View performance
Anyone? On Sep 21, 1:12 pm, MagouyaWare magouyaw...@gmail.com wrote: I have an application on the market (AppSwipe!) that displays three Gallery views with icons of running apps, recent apps, and running processes. I have subclassed Gallery and modified the onFling method to add in the ability to swipe up on any given view in the gallery. Some users have been complaining about the Galleries being sluggish. After looking into it a little bit it, this is what is happening: - The app launches - On any of the gallery views, swiping left or right initially has some hiccups (it is not a smooth scroll) - After every item has been displayed on the screen at least once the hiccups are gone I assume this is because the Gallery View only stores information for what is currently displayed on the screen and that it also caches the information for items that have been viewed but are not currently visible (hence the smoothness after scrolling through everything). I could not find anything in the SDK docs or the Dev Guide. The adapter is a very simple extension of BaseAdapter... Not very different from the Gallery example in the Dev Guide. Is there any way to improve this? Thanks in advance, Justin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Poor performance on my file loader (code optimization help!)
On Sep 23, 8:49 am, Glen Kimsey gkim...@gmail.com wrote: I tried to find significant ways that I could avoid allocation, but the StringTokenizer is the main thing that I'm calling 'new' on and I didn't see any way to avoid doing that for every line. Your suggestion of using regexs for a parser kind of threw me off, because I didn't even see that as a possibility. I'll have to look into that and see what you mean. From the JavaDoc for StringTokenizer: StringTokenizer is a legacy class that is retained for compatibility reasons although its use is discouraged in new code. It is recommended that anyone seeking this functionality use the split method of String or the java.util.regex package instead. I also didn't know the G1 didn't have floating- point hardware. Will this likely be the case for other android phones in the near future? This information combined with Bart's suggestion to stick with quaternions means I'll very likely be removing those calls to acos and sqrt entirely. It also lacks an integer divide instruction, so go easy on divisions and modulus. :-) If you do a google search for ODROID you can see an example of a device with hardware FP. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Syntax error with function
Then probably you are not using 1.6 SDK, because invalidateAllKeys() is a level 4 API. I suggest you check Eclipse-Preferences-Android- SDK Location. Balwinder Kaur Open Source Development Center ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Sep 23, 10:32 am, Nitin67 nitin6...@gmail.com wrote: Hello, I am working with the softkeyboard example in the SDK and I can't get past an error. I want to use 2 public functions in the KeyboardView class. It finds getKeyboard(), but invalidateAllKeys(). I created the code below to show the problem. I am using 1.6 SDK. Any suggestions would be helpful. package com.example.android.softkeyboard; import android.content.Context; import android.inputmethodservice.Keyboard; import android.inputmethodservice.KeyboardView; import android.inputmethodservice.Keyboard.Key; import android.util.AttributeSet; public class LatinKeyboardView extends KeyboardView { public LatinKeyboardView(Context context, AttributeSet attrs) { super(context, attrs); getKeyboard(); //found invalidateAllKeys(); //Not found } ... Nitin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] How to start an Android project in Eclipse?
I tried to install Android in Eclipse. I followed instructions from the sites http://www.howtoforge.com/installing-google-android-sdk1.0-on-ubuntu8.04-desktop and http://developer.android.com/guide/tutorials/hello-world.html . Now, as I start Eclipse and an Android project, it says that An SDK Target must be specified. But in the window, the whole Built Target - box is inactive so I can't activate the Target Name. How can I fix the problem? I installed today the latest version of Java available in Xubuntu and downloaded Eclipse and Android from the web so I guess my tools are not out of date. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: How does one change androids default language
hi, how to change android default language to arabic language ? plz help me --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Failed to start monitoring
I do not know your problem.Send a message to your programmer.Nice day. 2009/9/23 Pruthvi Raj pruthvi...@gmail.com Hi,If i plug in my device its showing as Failed to start monitoring HT851GZ44724. But it was working fine i minute before. Can you please tell me what might be the problem. -- Thank You, Pruthvi Raj G.R -- Alle utgående meldinger er godkjent av meg. Sender aldri ting som kan skade andre personer. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Android 1.6 SDK is here!
Just downloaded the 1.6 and followed the instructions on http://source.android.com/download. ... external/webkit/WebCore/dom/Range.cpp: In member function 'bool WebCore::Range::intersectsNode(WebCore::Node*, WebCore::ExceptionCode)': external/webkit/WebCore/dom/Range.cpp:560: warning: suggest parentheses around within || ... What does this warning means? the built image is going to crash on my phone? Also getting message like 'recompile using -Xlint option'. how do i do that? Find and insert all javac in make file? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] EditText
Hello, I have a problem using EditText. What I do is creating an instance using new (no xml configuration) and then draw it to my Canvas. What I do not understand is that nothing happens when clicking into the text box. Normally the focus is on the text box, I get a cursor and the virtual keyboard appears, I can make text input etc... ! Creating the EditText element in a layout xml everything works fine. But this is not what I want in that case. Any ideas ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Unit Testing
Hi, Is there any tutorial on the instrumentation test framework, videos and stuff for 1.6? It would be nice if the tutorials make use of the Android Eclipse plugin. Cheers --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: HelloAndroid app crashing
Go to Help - Software Updates and update the Android DDMS. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Audio Stream Processing
I've browsed the audio API in search of functions that would allow me to process the audio data stream (that which ultimately reaches the sound jack) for purposes of signal processing such as equalization. I have been unable to find anything that would allow that. Is that due to my inexperience or is there really no way to process all audio on the way out? Thanks, Andy --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] onKeyboardActionListener vs onKeylistener
Hi, I am new to Android, and am writing an app which has 2 EditTexts (Let's call them A and B) and whenever I hit any key in A, it is automatically copied to B. For example, if I type HELLO in A, it will copy each letter into B. I managed to get this to work perfectly with the setOnKeyListener(). However, in the emulator I found that the virtual keyboard did not respond to this listener the same way. For some weird reason, the number keys in the Virtual Keyboard (0-9) responded to the onKeyListener but none of the others did. After doing a Google search of my issue, I found some people with similar problems, but no real solution. I realized there is a KeyboardView.OnKeyboardActionListener which listens for inputs from the virtual keyboard. However, I have no idea how to use this in my edittext field. I would appreciate some sort of help with this matter. Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] How to call built-in camera application from my app??
Hi !! I am a newbie and thinking about doing barcode scanning thing a little different way. I have tested a code which decode a stored image in res folder using zxing library. I am thinking to first call built- in camera app from my app in start, once the image of barcode is taken and stored in gallery ... my app will then read the latest added image and will run the decode function on it. I know it look a little old- fashioned plan of action though i can use intents. But i was just wondering if i can do this way. Coz i was finding difficulty doing it with intent way as i dont have a phone and doing it with emulator is little confusing rite now :S Any guidance is appreciated. Regards, wahib --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: EditText
Can you post the code you used to programmatically create an EditText ? The following code snippet in an activity does what you want it to do. EditText e = new EditText(this); ViewGroup.LayoutParams vw = new ViewGroup.LayoutParams (ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); addContentView(e, vw); Hope this helps, Balwinder Kaur Open Source Development Center ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Sep 23, 3:58 am, Sven Mutscher sven.mutsc...@gmx.de wrote: Hello, I have a problem using EditText. What I do is creating an instance using new (no xml configuration) and then draw it to my Canvas. What I do not understand is that nothing happens when clicking into the text box. Normally the focus is on the text box, I get a cursor and the virtual keyboard appears, I can make text input etc... ! Creating the EditText element in a layout xml everything works fine. But this is not what I want in that case. Any ideas ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Scroll image like a WebView
The image is being dynamically created by the app, and so doesn't exist on the web. I don't need network connectivity, or the ability to parse HTML, so a full WebView is overkill. I just figure that since WebView has the scrolling functionality I want, and that it seems like that method of should be pretty common, it should exist as a separate component. On Sep 22, 11:49 am, Balwinder Kaur (T-Mobile USA) balwinder.k...@t- mobile.com wrote: You are right. ScrollView only supports vertical scrolling and HoriontalScrollView supports horizontal scrolling. Since WebView scrolls like you want to it, why don't use it ? WebView w = (WebView)findViewById(R.id.webkit); w.loadUrl(http://www.android.com/goodies/android_vector.jpg;); Use the url of the image, not a web page. Balwinder Kaur Open Source Development Center ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Sep 22, 5:05 am, jsera gall.blad...@gmail.com wrote: I have a large image, and I'd like to scroll around it like you'd scroll around inside a WebView. This means horizontal, and vertical scrollbars. Since ScrollView and HorizontalScrollView only have vertical, and horizontal scrollbars respectively, neither of these will do what I want. Sticking a HorizontalScrollView inside a ScrollView doesn't work, because the horizontal scroll bar disappears when you scroll up. WebView scrolls exactly like what I want, but I don't want to display a web page, just an image created dynamically. There has to be some way of doing this without writing an entirely new class. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Sense UI
I was able to download and build a 1.6 version of Android. But the UI seems to be same as 1.5.I heard about Sense UI. Where do i get that UI?? thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Sense UI
You can check out differences from 1.6 and 1.5 http://developer.android.com/sdk/api_diff/4/changes.html The platform highlights are here: http://developer.android.com/sdk/android-1.6-highlights.html Balwinder Kaur Open Source Development Center ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Sep 23, 12:48 pm, jpntiger wave jpntiger.w...@gmail.com wrote: I was able to download and build a 1.6 version of Android. But the UI seems to be same as 1.5.I heard about Sense UI. Where do i get that UI?? thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Battery Usage Indicator API - JDK 1.6
I assume you mean Android SDK 1.6, not JDK 1.6. Thanks for sharing the information and you can check out a presentation made at Google I/O this year on Battery Life http://code.google.com/events/io/sessions/CodingLifeBatteryLife.html Balwinder Kaur Open Source Development Center ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Sep 22, 2:50 pm, SagarH attitude.unleas...@gmail.com wrote: I am getting started with Android. The JDK1.6 features highlights a new addition - Battery Usage Indicator - which gives a breakdown of how much battery is being consumed by each application. I found that the os.battery returns the battery status (charging, full, via USB, etc). Sagar Hatekar --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: onKeyboardActionListener vs onKeylistener
Thanks for the reply. If I type HELLO and hit the back button, only O gets copied into box B. It's weird. Here is the relevant part of my code: @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.virtualkeyboard); final EditText boxA= (EditText) findViewById(R.id.boxA); final EditText boxB= (EditText) findViewById(R.id.boxB); boxA.setOnKeyListener(new OnKeyListener() { @Override public boolean onKey(View v, int keyCode, KeyEvent event) { // TODO Auto-generated method stub if(event.getAction() == KeyEvent.ACTION_UP) { //copy text from box A to B } return false; } }); Now just to repeat my problem, the above code works perfectly when I use a physical keyboard, or the emulators hard keyboard. It is only when I use the virtual(soft) keyboard does it not work. I saw some posts online about using setOnKeyListener instead. But I do not know how that works since it is not a method for EditText. On Sep 23, 3:54 pm, Balwinder Kaur (T-Mobile USA) balwinder.k...@t- mobile.com wrote: Did you try hitting the backbutton on the emulator ( that would remove virtual keyboard) and see if EditBox B gets updated or not ? I think it should. If not, please past your code here, so folks can take a look at it. Thanks, Balwinder Kaur Open Source Development Center ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Sep 23, 11:13 am, Android_n00b nikhil...@gmail.com wrote: Hi, I am new to Android, and am writing an app which has 2 EditTexts (Let's call them A and B) and whenever I hit any key in A, it is automatically copied to B. For example, if I type HELLO in A, it will copy each letter into B. I managed to get this to work perfectly with the setOnKeyListener(). However, in the emulator I found that the virtual keyboard did not respond to this listener the same way. For some weird reason, the number keys in the Virtual Keyboard (0-9) responded to the onKeyListener but none of the others did. After doing a Google search of my issue, I found some people with similar problems, but no real solution. I realized there is a KeyboardView.OnKeyboardActionListener which listens for inputs from the virtual keyboard. However, I have no idea how to use this in my edittext field. I would appreciate some sort of help with this matter. Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Xzing Barcodescanner without Intent
So well, yess, people preffer using intents because it is much easier! but the google barcodescanner must be installed, otherwise you have to handle the exeptions (when you start the intent put it into a try and if it does not work let a dialog pop up or so...) and yesss, something you should know about intents, sometimes it doesn't handle the orientation changes right! ok, i just found out, that the emulator does not support the android market, so what you can do is look in some filesharing sites and download the apk and then upload it to some website, and then install it via the webbrowser onto your emulator. thats the only thing, i could think of. to your problem of the barcode scanner, it is going to be hard to get that to work isn't there something black and white, when you start the camera on the emulator? couldn't you maybee just change that picture to a barcode one? but i have now idea how you would do that... sorry if i couldn't help you as much as you would prefer... regards joe On 22 Sep., 20:57, wahib haq wahib.t...@gmail.com wrote: hi joe. I am also working on a simple barcode scanning app and being a newbie i am stuck for a long time. Up to my research all people preffer using intent for barcode scanning. I really need your little help. How have u done using intents? I found the code using intents but i am confused as i am working on emulator only. so how can i text it using emulator only? how to install barcode scanning app on emulator? and share link of .apk file if you have. First i was working on decoding a stored barcode image but it wasnt working so i just want to move on to finalizing it. Your help can just solve my problem. Well, to your issue i can come up to only one solution. If you just take snap of the barcode image and store it in gallery and after it your app read the latest added image from gallery and decode it. Dont laugh if its a very childish solution :) waiting for ur reply. Regards, wahib On 9/22/09, Joe nisyp...@gmail.com wrote: Hey everyone... how can i integrate the barcodescanner, whithout unsing an intent? my app, is now working with an intent, but i sort of disklile it for many reasons (one needs to have the barcodescanner installed, i don't want it full screen... ) i would like it similar to compare everywhere or shopsavy... but i am totally lost... i would very much appreciate help in any form. Regards johannes --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: How to call built-in camera application from my app??
There are a lot of good tutorials/examples on the web on using Intents. If you post your code using Intents, someone will help you get started. If you are using Android, you should be familiar with Intents. Thanks, Balwinder Kaur Open Source Development Center ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Sep 23, 11:18 am, wahib wahib.t...@gmail.com wrote: Hi !! I am a newbie and thinking about doing barcode scanning thing a little different way. I have tested a code which decode a stored image in res folder using zxing library. I am thinking to first call built- in camera app from my app in start, once the image of barcode is taken and stored in gallery ... my app will then read the latest added image and will run the decode function on it. I know it look a little old- fashioned plan of action though i can use intents. But i was just wondering if i can do this way. Coz i was finding difficulty doing it with intent way as i dont have a phone and doing it with emulator is little confusing rite now :S Any guidance is appreciated. Regards, wahib --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Sense UI
Thanks! Sense UI is not part of 1.6. So the question now is 'Where do i get the sense UI theme? Is it opensourced? thanks On Wed, Sep 23, 2009 at 12:57 PM, Balwinder Kaur (T-Mobile USA) balwinder.k...@t-mobile.com wrote: You can check out differences from 1.6 and 1.5 http://developer.android.com/sdk/api_diff/4/changes.html The platform highlights are here: http://developer.android.com/sdk/android-1.6-highlights.html Balwinder Kaur Open Source Development Center ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Sep 23, 12:48 pm, jpntiger wave jpntiger.w...@gmail.com wrote: I was able to download and build a 1.6 version of Android. But the UI seems to be same as 1.5.I heard about Sense UI. Where do i get that UI?? thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners]
can anyone help me what is pendingIntent and its purpose and how it differ from intent --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Poor performance on my file loader (code optimization help!)
Hi, As for the quaternion vs axis/angle, I had thought I HAD to translate them originally (I found out later with more research that I just had to use the more complicated matrix math rather than simple glrotate and gltranslate calls if I didn't). I don't suppose you could direct me to a tutorial or good description that will help a 3D rendering newbie like me use the quaternions? If it really is better/faster, I want to go that route rather than finding out later I should have. Quaternions aren't faster (well ok nlerp can be) but they are better at least for interpolation, sice you are clearly reading keyframing data, thus I assumed that you will interpolate it sooner or later therefore transforming them to axis/angle looks a bit redundant (since usually rotation is interpolated with cubic quaternion interpolation aka. squad). If yor some basic info about quaternions you can check this old (very) flipcode FAQ: http://www.flipcode.com/documents/matrfaq.html (this is really basic so may be a bit too basic :)) After bit searching I also found this: www.itu.dk/people/erikdam/DOWNLOAD/98-5.pdf looks ok to me And of course if you have Foley, van Dam CG: Principles And Practice book. (It may be a bit outdated nowadays but still it's a CG bible) -- Bart 'arcone1' Janusz --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] pendingIntent vs. Intent for Saurabh Sinha
You been asking this for MONTHS! With MANY emails!!! And multiple people helped you and answered you already. If you STILL don't know or haven't figure it out yet, why don't you just GOOGLE IT? The examples, difference, manuals and docs are there. You're just not getting it! - Original Message From: saurabh sinha saurso...@gmail.com To: android-beginners@googlegroups.com Sent: Wednesday, September 23, 2009 1:27:05 PM Subject: [android-beginners] can anyone help me what is pendingIntent and its purpose and how it differ from intent --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] coarse versus fine location provider
The MapView demo application sets the ACCESS_COARSE_LOCATION permission for wifi or cell location. Should a MapView activity also set the ACCESS_FINE_LOCATION permission to enable GPS location providers or is that permission also implied by setting ACCESS_COARSE_LOCATION? If both permissions are set and both settings are enabled will MapView prefer the fine (over the coarse) location provider? And will MapView sense a change in the availability of GPS? In typical devices are the two settings enabled or disabled by default (factory setting)? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Scroll image like a WebView
Scaling will not work, and yes, I need to scroll in both directions. This is for an Android port of Nethack: http://www.nethack.org/ For reference, here's an image of the WinCE port: http://images.google.com/imgres?imgurl=http://freewareppc.com/images/products/games/nethack.gifimgrefurl=http://freewareppc.com/games/nethack.shtmlusg=__V2gViMypkQ0c-uVhdy-kZnJhC9Q=h=206w=168sz=16hl=enstart=1sig2=LE6i0h0F_Y4qJ38HDPfA7gum=1tbnid=3nSzvzw93Y2NeM:tbnh=105tbnw=86prev=/images%3Fq%3Dwince%2Bnethack%26hl%3Den%26client%3Dfirefox-a%26rls%3Dorg.mozilla:en-US:official%26sa%3DN%26um%3D1ei=veq6SpzDFqiQtAPlp6mYCQ There's a large map, the tiles are 16x16 pixels, and scrolling in both directions is absolutely required. This is really something that should be easy in Android, but I have no idea how to do it. On Sep 23, 1:04 pm, Balwinder Kaur (T-Mobile USA) balwinder.k...@t- mobile.com wrote: It would be a matter of debate from the UX folks, and I say this from years of prior working at a handset manufacturer. On a small screen, the need for scrolling in both directions is not really that common, nor that desirable. I don't have insights on why Android does not support scrolling functionality in both directions in a single view/ widget, but I guess it maybe for the same reason. That being said, have you solved your current issue of displaying the image as you wish to ? You could also scale your image to fit the screen, but I assume you already thought about that. Take care, Balwinder Kaur Open Source Development Center ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Sep 23, 12:07 pm, jsera gall.blad...@gmail.com wrote: The image is being dynamically created by the app, and so doesn't exist on the web. I don't need network connectivity, or the ability to parse HTML, so a full WebView is overkill. I just figure that since WebView has the scrolling functionality I want, and that it seems like that method of should be pretty common, it should exist as a separate component. On Sep 22, 11:49 am, Balwinder Kaur (T-Mobile USA) balwinder.k...@t- mobile.com wrote: You are right. ScrollView only supports vertical scrolling and HoriontalScrollView supports horizontal scrolling. Since WebView scrolls like you want to it, why don't use it ? WebView w = (WebView)findViewById(R.id.webkit); w.loadUrl(http://www.android.com/goodies/android_vector.jpg;); Use the url of the image, not a web page. Balwinder Kaur Open Source Development Center ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Sep 22, 5:05 am, jsera gall.blad...@gmail.com wrote: I have a large image, and I'd like to scroll around it like you'd scroll around inside a WebView. This means horizontal, and vertical scrollbars. Since ScrollView and HorizontalScrollView only have vertical, and horizontal scrollbars respectively, neither of these will do what I want. Sticking a HorizontalScrollView inside a ScrollView doesn't work, because the horizontal scroll bar disappears when you scroll up. WebView scrolls exactly like what I want, but I don't want to display a web page, just an image created dynamically. There has to be some way of doing this without writing an entirely new class. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Scroll image like a WebView
Scaling will not work, and yes, I need to scroll in both directions. This is for an Android port of Nethack: http://www.nethack.org/ For reference, here's an image of the WinCE port: http://images.google.com/imgres?imgurl=http://freewareppc.com/images/products/games/nethack.gifimgrefurl=http://freewareppc.com/games/nethack.shtmlusg=__V2gViMypkQ0c-uVhdy-kZnJhC9Q=h=206w=168sz=16hl=enstart=1sig2=LE6i0h0F_Y4qJ38HDPfA7gum=1tbnid=3nSzvzw93Y2NeM:tbnh=105tbnw=86prev=/images%3Fq%3Dwince%2Bnethack%26hl%3Den%26client%3Dfirefox-a%26rls%3Dorg.mozilla:en-US:official%26sa%3DN%26um%3D1ei=veq6SpzDFqiQtAPlp6mYCQ There's a large map, the tiles are 16x16 pixels, and scrolling in both directions is absolutely required. This is really something that should be easy in Android, but I have no idea how to do it. Try using the 2D graphics API (Canvas and SurfaceView). I suspect there are few, if any, games on Android akin to Nethack that attempt to use the widget API (ImageView and scrolling containers). I know that Ed Burnette's book _Hello, Android_ covers this API, albeit for a Sudoku game rather than something like Nethack. One of these days, I'll have to learn this stuff myself... -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Utility class for database query
Thanks Jefferey. I don't want to extend the android.database.* package but I just want to simplify it. The idea is to build a utility package to help developers for easier,faster and robust programming. On Sep 23, 7:00 pm, Jeffrey Blattman jeffrey.blatt...@gmail.com wrote: have you seen android.database.*? what would you provide on top of that? On 9/23/09 4:34 AM, Sudeep Jha wrote: Hi all, Can anybody suggest what functionality to provide in a query utility class/classes? The idea is to provide a database utility package for android developers. I just wanna do it for android community and of course for my learning.:-) Warm Regards, Sudeep -- --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: onKeyboardActionListener vs onKeylistener
hmm..I don't know what is going in your environment. For me (using SDK 1.5) Your code as is, works too. When I hit the back button on the emulator, the virtual keyboard exits, HELLO gets copied to the EditTextA. Balwinder Kaur ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Sep 23, 1:10 pm, Android_n00b nikhil...@gmail.com wrote: I apologize about the last part of that message. I meant that I read online about KeyboardView.OnKeyboardActionListener, but do not know how it works. On Sep 23, 4:08 pm, Android_n00b nikhil...@gmail.com wrote: Thanks for the reply. If I type HELLO and hit the back button, only O gets copied into box B. It's weird. Here is the relevant part of my code: @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.virtualkeyboard); final EditText boxA= (EditText) findViewById(R.id.boxA); final EditText boxB= (EditText) findViewById(R.id.boxB); boxA.setOnKeyListener(new OnKeyListener() { @Override public boolean onKey(View v, int keyCode, KeyEvent event) { // TODO Auto-generated method stub if(event.getAction() == KeyEvent.ACTION_UP) { //copy text from box A to B } return false; } }); Now just to repeat my problem, the above code works perfectly when I use a physical keyboard, or the emulators hard keyboard. It is only when I use the virtual(soft) keyboard does it not work. I saw some posts online about using setOnKeyListener instead. But I do not know how that works since it is not a method for EditText. On Sep 23, 3:54 pm, Balwinder Kaur (T-Mobile USA) balwinder.k...@t- mobile.com wrote: Did you try hitting the backbutton on the emulator ( that would remove virtual keyboard) and see if EditBox B gets updated or not ? I think it should. If not, please past your code here, so folks can take a look at it. Thanks, Balwinder Kaur Open Source Development Center ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Sep 23, 11:13 am, Android_n00b nikhil...@gmail.com wrote: Hi, I am new to Android, and am writing an app which has 2 EditTexts (Let's call them A and B) and whenever I hit any key in A, it is automatically copied to B. For example, if I type HELLO in A, it will copy each letter into B. I managed to get this to work perfectly with the setOnKeyListener(). However, in the emulator I found that the virtual keyboard did not respond to this listener the same way. For some weird reason, the number keys in the Virtual Keyboard (0-9) responded to the onKeyListener but none of the others did. After doing a Google search of my issue, I found some people with similar problems, but no real solution. I realized there is a KeyboardView.OnKeyboardActionListener which listens for inputs from the virtual keyboard. However, I have no idea how to use this in my edittext field. I would appreciate some sort of help with this matter. Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Empty EditText Causing force closes
I'm trying to make an error message pop up if the user leaves an entry field blank instead of a force close. Right now I've got this: if (NumCanShootValue == null) { String Failure = Please Fill In required Fields.; Toast.makeText(QuickShoot.this, Failure, Toast.LENGTH_SHORT).show(); } else {blah blah blah} This doesn't work, and I tried a .hasNext() but I don't know what to attach it to. .hasNext() doesn't work. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---