Re: [android-developers] Re: Activity lifecycle... still a mystery to me
2011/3/12 Indicator Veritatis mej1...@yahoo.com Actually, comparing with the text, I don't think it means just what is says. There is an asymmetry in the states, an asymmetry I believe is deliberate, if poorly explained: that between onPause and onResume: when you enter onPause, you may still be partially visible, but you lose input focus. But when you enter onResume you must have both full visibility and input focus. onResume() is called when you are becoming the top activity on the global activity stack. onPause() is called when you are going away from that state (prior to a different activity becoming the top). I'm not sure how this is asymmetrical? There are important implications about being the top activity -- for example you will have input focus over any other activities, your window will be on top of all other activities, etc. However there are some subtle aspects of this. In particular, being the top activity does *not* guarantee being input focus; input focus is based on windows, and there are a number of Android UI elements that are implemented as pure windows. This includes the lock screen, and notification shade. When one of these elements is shown, the top activity's window will lose input focus for that time. There are really three important pairs to the activity lifecycle: onCreate() / onDestroy() onStart() / onStop() onResume() / onPause() Any resources you create in the first of the pair should generally be released in the matching one. For example, if you use registerReceiver() in onCreate(), you should generally call unregisterReceiver() then in onDestroy(). These pairs represent symmetric major states of an activity: onCreate() is when it is first created, onDestroy() is when it is last being cleaned up; onStart() is when it is becoming visible, onStop() is when it is no longer going to be visible to the user. And we already talked about onResume() and onPause(). Finish would cause it too - your activity is about to not be visible (since it's going away). Cause what, too? It causes your activity to go through onPause() and onStop() (if needed) since it is no longer going to be visible to the user, and then onDestroy() since the activity instance is being destroyed. But what does front-most position really mean? That is what confuses many, not just the OP when reading the online documentation about the Activity lifecycle. My best attempt at reading the mind of the online doc's author is that front-most position means not only 1) being fully visible, most likely completely covering up all other Activities, but also 2) capturing input focus from all input devices: touch screen, keyboard... It really just means top of the activity stack, and since the windows created by activities are Z-ordered in the window manager based on that stack, its windows are on top, bringing along all of the repercussions of that both visually and for input focus. 3. How is onPause() - onResume() different than onStop() - onRestart()? What circumstances differentiate the flow? onStart / onResume depend on what happened before. In what way do they depend? Isn't it just a matter of onPause() - onResume() being as the documentation says, the foreground lifetime of the Activity has started? While onStop() - onRestart() is quite different? I would ignore onRestart(). It is useful for some semi-common situations we saw during app developer, where one wants to do some work when being started but not duplicate stuff that was already done in onCreate(). For the basics of the activity lifecycle, though, the 3 pairs are the important things to understand. I actually did work on a project where they somehow defeated the normal behavior of the home key -- and I hated that feature. I am sure most users feel the same way. Generally we consider this a security hole and fix this. The current platform has closed all the holes I know of; if there are new ways people have found to prevent the home key from working correctly, I would love to get a hold of the app to fix it. :) -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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
Re: [android-developers] Re: Global Variables
That's strange, it works for me. On Sat, Mar 12, 2011 at 11:42 PM, Indicator Veritatis mej1...@yahoo.comwrote: I get no such project when I try to go to your link. On Mar 12, 1:05 am, Dianne Hackborn hack...@android.com wrote: Oh good lord, there is nothing intrinsically evil about globals or singletons. Just don't abuse them. For example, say I want to do a query on the package manager about a set of applications that are available. If I stick this as local data inside of a particular activity, then every time the user presses back and returns to the activity the state needs to be reloaded, and if I want to share that state with another activity I need to figure out some way to get the object over to the other activity without using an evil global. Just use a singleton and a global. It's the appropriate tool for this. Like the current code here in Manage Applications, which works 10x better in gingerbread because it was refactored to have a cleanly controlled singleton that tracks everything that needs to be known about the installed applications across all parts of the UI: http://android.git.kernel.org/?p=platform/packages/apps/Settings.git;... On Fri, Mar 11, 2011 at 9:21 PM, Brill Pappin br...@pappin.ca wrote: Singleton is also one to be avoided however... just like global vars :) However, as we're working on a (sort of) limited device, Singletons are a way of life. -- 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 -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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 -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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] resources directory for 320x400 and 800x854
resource handling: how can iam add resources for the resolution of 320x400 and 800x854? the image can't be resize or crop at realtime from device until they looks not good. all images are fullscreen background images or splash picture. the directorys drawable-l/m/h dpi only support the default resolutions. brgds lars -- 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
Re: [android-developers] Re: Activity lifecycle... still a mystery to me
13.03.2011 10:29, Indicator Veritatis пишет: I want to perform certain actions when the BACK or HOME keys are pressed, and ignore cases where a third-party activity simply pops up on part of the screen and then goes away. If you find yourself needing this, perhaps you need a Service. Why a Service? Services are meant for either 1) long-running operations in the background, operations that do not need UI or 2) exposing this component's functionality to other components, using IBinder if the latter are in other applications. Because he's trying to determine when the user really leaves his activity vs. when it's temporarily occluded. This is most likely to either continue or stop doing something. I'm speculating, but it seems likely. An oath he should take seriously. He asked for a response that could be vouched for - and since I can't sign in blood using email, that was the best I could do :) Let's hope he hasn't heard the famous Turgenev quote, каждый Русский -- неисправаемый лгун;) Turgenev was Russian, too, so that's just like All Cretans are liars :) -- Kostya Vasilyev -- http://kmansoft.wordpress.com -- 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] SQLite Database - Multiple Tables
How to insert multiple tables which have few fields in common? -- 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
Re: [android-developers] SQLite Database - Multiple Tables
Multiple inserts, one at a time. Preferably using a transaction. 13.03.2011 12:58 пользователь Brad Stintson geek.bin...@gmail.com написал: How to insert multiple tables which have few fields in common? -- 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: Global Variables
Dianne, I also get 404 No such project On Mar 13, 6:42 pm, Dianne Hackborn hack...@android.com wrote: That's strange, it works for me. On Sat, Mar 12, 2011 at 11:42 PM, Indicator Veritatis mej1...@yahoo.comwrote: I get no such project when I try to go to your link. On Mar 12, 1:05 am, Dianne Hackborn hack...@android.com wrote: Oh good lord, there is nothing intrinsically evil about globals or singletons. Just don't abuse them. For example, say I want to do a query on the package manager about a set of applications that are available. If I stick this as local data inside of a particular activity, then every time the user presses back and returns to the activity the state needs to be reloaded, and if I want to share that state with another activity I need to figure out some way to get the object over to the other activity without using an evil global. Just use a singleton and a global. It's the appropriate tool for this. Like the current code here in Manage Applications, which works 10x better in gingerbread because it was refactored to have a cleanly controlled singleton that tracks everything that needs to be known about the installed applications across all parts of the UI: http://android.git.kernel.org/?p=platform/packages/apps/Settings.git;... On Fri, Mar 11, 2011 at 9:21 PM, Brill Pappin br...@pappin.ca wrote: Singleton is also one to be avoided however... just like global vars :) However, as we're working on a (sort of) limited device, Singletons are a way of life. -- 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 -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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 -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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
Re: [android-developers] SQLite Database - Multiple Tables
How to use transaction and how to implement the concept of foreign key? 2011/3/13 Kostya Vasilyev kmans...@gmail.com Multiple inserts, one at a time. Preferably using a transaction. 13.03.2011 12:58 пользователь Brad Stintson geek.bin...@gmail.com написал: How to insert multiple tables which have few fields in common? -- 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 -- 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: How to change animation velocity on SlidingDrawer
http://groups.google.com/group/android-developers/browse_thread/thread/a7d0102811474bfe/ 2011/3/11 bertrand hellobertr...@gmail.com Hey everyone. I'm using a sliding drawer and I just want to change animation velocity. But how ? How I can do that ? I don't see public attributes and parameters to change animation effects. Anybody can help ? -- *Bertrand Lebonnois * *Consultant en Technologie Internet Fixe et Mobile Co-fondateur et Directeur Technique de Pollop Sarl* tél : 06 310 320 72 - fax : 09 59 74 39 40 4, rue de Jarente 75004 Paris http://www.pollop.fr http://fr.linkedin.com/in/bertrandlebonnois -- 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
Re: [android-developers] ANR keyDispatchingTimedOut on android/com.android.internal.app.RingtonePickerActivity
Today, I got a ANR error, too. I want to know how to read this error message. 2011/3/1 Sven sirdarthna...@googlemail.com Hello! Today I got a error report in my market account for my application. It is listed under Freeze. I use the RingtonePicker in my preferences. Any chance I can do something on this error? Whats the reason for this? Following the stack trace: v1.5.3 Mar 1, 2011 7:34:38 AM OTHER DALVIK THREADS: main prio=5 tid=1 NATIVE | group=main sCount=1 dsCount=0 s=N obj=0x40020ba0 self=0xcdd0 | sysTid=24486 nice=0 sched=0/0 cgrp=unknown handle=-1345025984 at android.graphics.Canvas.native_drawRect(Native Method) at android.graphics.Canvas.drawRect(Canvas.java:870) at android.view.View.draw(View.java:6866) at android.widget.AbsListView.draw(AbsListView.java:2257) at android.view.ViewGroup.drawChild(ViewGroup.java:1640) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367) at android.view.View.draw(View.java:6743) at android.view.ViewGroup.drawChild(ViewGroup.java:1640) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367) at android.view.ViewGroup.drawChild(ViewGroup.java:1638) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367) at android.view.ViewGroup.drawChild(ViewGroup.java:1638) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367) at android.view.View.draw(View.java:6743) at android.widget.FrameLayout.draw(FrameLayout.java:352) at com.android.internal.policy.impl.PhoneWindow $DecorView.draw(PhoneWindow.java:1846) at android.view.ViewRoot.draw(ViewRoot.java:1407) at android.view.ViewRoot.performTraversals(ViewRoot.java:1163) at android.view.ViewRoot.handleMessage(ViewRoot.java:1727) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:123) at android.app.ActivityThread.main(ActivityThread.java:4627) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:521) at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:860) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) at dalvik.system.NativeStart.main(Native Method) Binder Thread #2 prio=5 tid=6 NATIVE | group=main sCount=1 dsCount=0 s=N obj=0x44a4ee80 self=0x126178 | sysTid=24491 nice=0 sched=0/0 cgrp=unknown handle=1234816 at dalvik.system.NativeStart.run(Native Method) Binder Thread #1 prio=5 tid=5 NATIVE | group=main sCount=1 dsCount=0 s=N obj=0x44a4e840 self=0x139220 | sysTid=24490 nice=0 sched=0/0 cgrp=unknown handle=1239728 at dalvik.system.NativeStart.run(Native Method) Compiler daemon prio=5 tid=4 VMWAIT | group=system sCount=1 dsCount=0 s=N obj=0x44a482a0 self=0x12e938 | sysTid=24489 nice=0 sched=0/0 cgrp=unknown handle=1183528 at dalvik.system.NativeStart.run(Native Method) Signal Catcher daemon prio=5 tid=3 RUNNABLE | group=system sCount=0 dsCount=0 s=N obj=0x44a481e8 self=0x125dd8 | sysTid=24488 nice=0 sched=0/0 cgrp=unknown handle=1203608 at dalvik.system.NativeStart.run(Native Method) HeapWorker daemon prio=5 tid=2 VMWAIT | group=system sCount=1 dsCount=0 s=N obj=0x43347ce8 self=0x126938 | sysTid=24487 nice=0 sched=0/0 cgrp=unknown handle=1206520 at dalvik.system.NativeStart.run(Native Method) Thanks for your help! -- 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
Re: [android-developers] SQLite Database - Multiple Tables
SQLite has foreign key support starting with version 3.6.19. http://www.sqlite.org/foreignkeys.html Some versions of Android have SQLite versions earlier than that - someone posted a breakdown recently, check the list archives. For earlier versions, it works pretty well to do something like: CREATE TABLE . ref_id_value INTEGER NOT NULL REFERENCES the_other_table (_id) For transactions, check SQLiteDatabase docs: http://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html#beginTransaction() The above gives the usual pattern for using transactions. -- Kostya 13.03.2011 13:16, Brad Stintson пишет: How to use transaction and how to implement the concept of foreign key? 2011/3/13 Kostya Vasilyev kmans...@gmail.com mailto:kmans...@gmail.com Multiple inserts, one at a time. Preferably using a transaction. 13.03.2011 12:58 пользователь Brad Stintson geek.bin...@gmail.com mailto:geek.bin...@gmail.com написал: How to insert multiple tables which have few fields in common? -- 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 mailto:android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com mailto:android-developers%2bunsubscr...@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 mailto:android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com mailto:android-developers%2bunsubscr...@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 -- Kostya Vasilyev -- http://kmansoft.wordpress.com -- 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] how to write a view object into a parcelable class
Hi all, Basically i am trying to pass a view instance from one process to another process. I need to write a view instance into a parcelable class. I am not sure how to write a view data into parcel object. Parcel instance takes writeByte(byte), readByte(), writeDouble(double), readDouble(), writeFloat(float), readFloat(), writeInt(int), readInt(), writeLong(long), readLong(), writeString(String), readString(). So can anybody help me here, how to convert view instance and write into a parcel. THanks, mani -- 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: Log every action/event to an external file
Hi there, Thank you for the feedback. I actually thought there was something to automatically log this information, I read some project (Microlog for Android) but I must have misunderstood. So basically what you're saying is that I'll have to log every piece of code that I actually want to a internal file and like this have posterior access to the information and I'll also be able to just log the valuable information that I need instead of everything that device might do, right? I'll dig on this, thank you very much for your time. P On Mar 12, 7:43 pm, TreKing treking...@gmail.com wrote: On Sat, Mar 12, 2011 at 11:52 AM, Pedro Teixeira pedroteixeir...@gmail.comwrote: I'd like to store events like pressing buttons but also store the location and orientation of the device while using my application as well as the time between this actions. Stuff like this you'd have to have your own code to read the device settings. If you're hoping for some automatic way to log all this information, I doubt you're going to find it. Is there any good approach for this? Was I clear or can I try and explain in another way? You are free to create and write to files on your own app's space (or even the SD card) for logging purposes. I have a log class that not only writes to the LogCat in debug mode but generates an internal log that I can send in bug reports if and when the app crashes on user devices. It has been *far* more useful than the generic stack traces in the developer console in resolving issues that crop up in the wild. You just have to be careful about logging only what's actually useful and keeping the log file size to something reasonable for a mobile device. --- -- TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- 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: XOOM
Adb to Xoom worked on my Windows 7 laptop. I used this: Download Motorola 4.9.0 Driver with MotoHelper* From their USB and PC Charging Drivers page: http://www.motorola.com/consumers/v/index.jsp?vgnextoid=bda09ec8009a0210VgnVCM108806b00aRCRD And the INI modifications to the Android SDK driver Juan mentioned. Took a couple restarts, and I probably uninstalled a bunch of stuff via USBDeview, a program for working with USB drivers. Since it is working, I won't try Xavier's link for now. If that's an adb other than the Android SDK one, I've run into problems with those in the past. At one point adb would say it was out of date and restart itself every time I ran the command and not work. As far as I can tell from process explorer, there was some sort of service running in the background, I suspect from one of these OEM adb drivers, that was starting a different adb constantly. It could be the better way to go in this case, no clue, just pointing out one way that worked for me so far. On Mar 11, 9:15 pm, Xavier Ducrohet x...@android.com wrote: As Mark said, Motorola distribute the Xoom drivers. The android drivers are only for developer and nexus devices. Each manufacturers provides drivers for their own devices. Find the manufacturer links athttp://developer.android.com/sdk/oem-usb.html Xav On Fri, Mar 11, 2011 at 5:08 PM, J Handal jhand...@gmail.com wrote: Mark, Only modified android_winusb.inf will enable you to install the Android Composite ADB Interface. ;NVIDIA Tegra %SingleAdbInterface% = USB_Install, USB\VID_0955PID_7000 %CompositeAdbInterface% = USB_Install, USB\VID_0955PID_7100MI_01 -- 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 -- Xavier Ducrohet Android SDK Tech Lead Google Inc.http://developer.android.com|http://tools.android.com Please do not send me questions directly. Thanks! -- 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: Question about registering for location updates
You have to unregister. Otherwise you end up with multiple listeners for the same provider. On Mar 12, 4:05 pm, Danny S. danny.schi...@googlemail.com wrote: Hi, I have to register my locationListener for location updates using the LocationManager. Now the user have the change to set values in the preferences that should set for gestitration. mLocationManager.requestLocationUpdates(GPS_PROVIDER, PreferenceHelper.getLocationFixInterval(mPrefs), PreferenceHelper.getLocationFixDistance(mPrefs), locationListener); mLocationManager.requestLocationUpdates(NETWORK_PROVIDER, PreferenceHelper.getLocationFixInterval(mPrefs), PreferenceHelper.getLocationFixDistance(mPrefs), locationListener); If the preferences for the fix distance or fix interval changes, I need to call requestLocationUpdates again with the new values. Do I have to unregister from the listener first or is it overridden by the new request call? Thanks a lot! -Danny -- 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: abortBroadcast
Judging from the name of the class, maybe it is an attempt to stop an SMS by working with android.provider.Telephony.SMS_RECEIVED? Unrelated, but does Toast#setDuration even work with raw numbers like that? I thought it takes one of two constants for long or short. I guess the name and documentation could be clearer there, though. On Mar 11, 9:15 pm, Indicator Veritatis mej1...@yahoo.com wrote: You really need to include more information in your posts before you can expect a good answer. Not only was Dianne fully justified in asking, what did you expect it to do, but you also failed to tell us what it did instead. Nor have you given us enough info to duplicate whatever the problem was. This is not a quiz group. Based on the meager information you have supplied we can only guess, which is usually a waste or your time and ours. That said, my guess is that you forgot: abortBroadcast() only works with an ORDERED broadcast. You probably sent it a non ordered broadcast, e.g., via Context.sendBroadcast(). Or you might have forgotten something else: you might have forgotten that 'abortBroadcast' only sets a flag. You then have to wait for the actual abort to happen. Or are you not even seeing the Toast at all? In that case, there is nothing wrong with abortBroadcast: you just don't even GET the onReceive event. But that you will have to debug on your own. On Mar 10, 10:34 pm, Thiri Yee thirithewut...@gmail.com wrote: abortBroadcast didn't work. Why? Code is as follow public class SMSReceiver1 extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { this.abortBroadcast(); Toast tag = Toast.makeText(context, Abort Broadcast!!!, Toast.LENGTH_LONG); tag.setDuration(30); tag.show(); -- Please reply me as soon as possible. -- 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] Paint single Path object with Xfermode
Hi, I have one path object (for example recorded track). I'm drawing it on canvas. When I set semi-transparent color to paint object, whole path is colored like this. This is correct. Imagine that you was walking on some rectangle area from one side to another, few times you were on same place. And want to draw this path in same way you're drawing single lines, so you can see places where you were more then once darker then others (because line is draw there more then once). Anyway path object draw all areas with same color and because it's only one object, Xfermode PorterDuffXfermode(PorterDuff.Mode.DARKEN) have no effect on it. I hope you understand what I want. And I don't want to use only drawing single lines, because track width should be for example 100px. Nice example is here http://locus.asamm.cz/data/1300018457960.png. This is created with drawing single lines and I want to all path to be connected together but with darker places on place where I walk more then one. Do you have any tip for this or only to separate path into more pieces? thanks guys! -- 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: Log every action/event to an external file
There are examples for custom exception handlers that make the stack trace nicer to read and allow to save the result to SD card. Users can then decide if they want to help you and send you these files. Market has the option to show the raw stack traces but I found these insufficient for troubleshooting. On Mar 13, 7:28 am, Pedro Teixeira pedroteixeir...@gmail.com wrote: Hi there, Thank you for the feedback. I actually thought there was something to automatically log this information, I read some project (Microlog for Android) but I must have misunderstood. So basically what you're saying is that I'll have to log every piece of code that I actually want to a internal file and like this have posterior access to the information and I'll also be able to just log the valuable information that I need instead of everything that device might do, right? I'll dig on this, thank you very much for your time. P On Mar 12, 7:43 pm, TreKing treking...@gmail.com wrote: On Sat, Mar 12, 2011 at 11:52 AM, Pedro Teixeira pedroteixeir...@gmail.comwrote: I'd like to store events like pressing buttons but also store the location and orientation of the device while using my application as well as the time between this actions. Stuff like this you'd have to have your own code to read the device settings. If you're hoping for some automatic way to log all this information, I doubt you're going to find it. Is there any good approach for this? Was I clear or can I try and explain in another way? You are free to create and write to files on your own app's space (or even the SD card) for logging purposes. I have a log class that not only writes to the LogCat in debug mode but generates an internal log that I can send in bug reports if and when the app crashes on user devices. It has been *far* more useful than the generic stack traces in the developer console in resolving issues that crop up in the wild. You just have to be careful about logging only what's actually useful and keeping the log file size to something reasonable for a mobile device. --- -- TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- 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: Log every action/event to an external file
This is a thesis project so I'm actually conducting the user testing on a singular device that I will have access to the information I need. That's a thing to consider then. Thanks for the feedback On Mar 13, 12:23 pm, lbendlin l...@bendlin.us wrote: There are examples for custom exception handlers that make the stack trace nicer to read and allow to save the result to SD card. Users can then decide if they want to help you and send you these files. Market has the option to show the raw stack traces but I found these insufficient for troubleshooting. On Mar 13, 7:28 am, Pedro Teixeira pedroteixeir...@gmail.com wrote: Hi there, Thank you for the feedback. I actually thought there was something to automatically log this information, I read some project (Microlog for Android) but I must have misunderstood. So basically what you're saying is that I'll have to log every piece of code that I actually want to a internal file and like this have posterior access to the information and I'll also be able to just log the valuable information that I need instead of everything that device might do, right? I'll dig on this, thank you very much for your time. P On Mar 12, 7:43 pm, TreKing treking...@gmail.com wrote: On Sat, Mar 12, 2011 at 11:52 AM, Pedro Teixeira pedroteixeir...@gmail.comwrote: I'd like to store events like pressing buttons but also store the location and orientation of the device while using my application as well as the time between this actions. Stuff like this you'd have to have your own code to read the device settings. If you're hoping for some automatic way to log all this information, I doubt you're going to find it. Is there any good approach for this? Was I clear or can I try and explain in another way? You are free to create and write to files on your own app's space (or even the SD card) for logging purposes. I have a log class that not only writes to the LogCat in debug mode but generates an internal log that I can send in bug reports if and when the app crashes on user devices. It has been *far* more useful than the generic stack traces in the developer console in resolving issues that crop up in the wild. You just have to be careful about logging only what's actually useful and keeping the log file size to something reasonable for a mobile device. --- -- TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- 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] passing arrays between classes using intent
hi, i am developing a final year project where i need to retrieve details of hospitals like name ,address, location(in terms of latitude and longitude) from a server and display them on a mapconnectivity has been established and i am able to retrieve the values in the from of array like address[], name[] etc.. now i need to pass these values from an activity class to map activity class..i have used bundle to pass variables but i have no clue how to pass integer and string arrays and how to retrieve them in the second class using bundle... can anyone please provide codes or relevant links which may be helpful in solving this problem using bundle any help will be really appreciatedcheers :) -- 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] passing arrays between classes using intent
hi, i am developing a final year project where i need to retrieve details of hospitals like name ,address, location(in terms of latitude and longitude) from a server and display them on a mapconnectivity has been established and i am able to retrieve the values in the from of array like address[], name[] etc.. now i need to pass these values from an activity class to map activity class..i have used bundle to pass variables but i have no clue how to pass integer and string arrays and how to retrieve them in the second class using bundle... can anyone please provide codes or relevant links which may be helpful in solving this problem using bundle any help will be really appreciatedcheers :) -- 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
Re: [android-developers] how to write a view object into a parcelable class
On Sun, Mar 13, 2011 at 7:26 AM, mani smanikanda...@gmail.com wrote: Basically i am trying to pass a view instance from one process to another process. I can think of no valid scenario where this would be the appropriate design. First, unless these are multiple applications, there should not be multiple processes. If there are multiple applications, those applications should expose an API that ships model data between processes, not views. To put it another way, what you are asking is akin to how do I pass this listbox from Microsoft Excel to Quicken?. Passing *data* from Excel to Quicken may make sense; passing GUI widgets from Excel to Quicken does not, IMHO. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android 3.0 Programming Books: http://commonsware.com/books -- 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
Re: [android-developers] passing arrays between classes using intent
On Sun, Mar 13, 2011 at 8:49 AM, Chetan Singh Bisht chetanbish...@gmail.com wrote: hi, i am developing a final year project where i need to retrieve details of hospitals like name ,address, location(in terms of latitude and longitude) from a server and display them on a mapconnectivity has been established and i am able to retrieve the values in the from of array like address[], name[] etc.. now i need to pass these values from an activity class to map activity class.. What you really need is a central spot to hold that data, such as a database. Think of a Web app. Would you pass the entire contents of your details of hospitals in GET parameters from one Web page to another? Or would you hold the details of hospitals in a central place (Web server) and use the data from both pages? -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android 3.0 Programming Books: http://commonsware.com/books -- 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] Renderscript vs WebGL
Anyone know the strategy for 3D on Android? Is the primary platform going to be Renderscript or WebGL? Also, is there a PC emulator for Honeycomb? http://www.pcprogramming.com JD -- 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: how to write a view object into a parcelable class
thanks for your response!! I will add more into the details, what scenario i am in. I am trying to pick the Notification view from status bar and put into another application. Its our requirement that for our product we are planning to remove the notification view from status bar and keep it in some other application. i did analysis on statusBarService, and found out that there is view which is been inflated and statusBarservice is been called by NotificationManager to update this view. It was quite very difficult to decouple the logics between them. -frameworks/base/services/java/com/android/server/status/ StatusBarService.java private void makeStatusBarView(Context context) { Resources res = context.getResources(); mRightIconSlots = res.getStringArray(com.android.internal.R.array.status_bar_icon_order); mRightIcons = new StatusBarIcon[mRightIconSlots.length]; **ExpandedView expanded** = (ExpandedView)View.inflate(context, com.android.internal.R.layout.status_bar_expanded, null); } So i thought of passing this view instance ( i.e expanded ) to an another application via aidl. and we can show the view, but updating the view and those logics still remains same!! It may not be the best approach, but still we wanted to try out and see the pros and cons..!! so my question was is there an way to convert view object to bytes and pass them via parcel ? if so can you help me how to do that ? Thanks, Mani On Mar 13, 6:14 pm, Mark Murphy mmur...@commonsware.com wrote: On Sun, Mar 13, 2011 at 7:26 AM, mani smanikanda...@gmail.com wrote: Basically i am trying to pass a view instance from one process to another process. I can think of no valid scenario where this would be the appropriate design. First, unless these are multiple applications, there should not be multiple processes. If there are multiple applications, those applications should expose an API that ships model data between processes, not views. To put it another way, what you are asking is akin to how do I pass this listbox from Microsoft Excel to Quicken?. Passing *data* from Excel to Quicken may make sense; passing GUI widgets from Excel to Quicken does not, IMHO. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android 3.0 Programming Books:http://commonsware.com/books -- 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
Re: [android-developers] Re: how to write a view object into a parcelable class
On Sun, Mar 13, 2011 at 9:27 AM, mani smanikanda...@gmail.com wrote: I am trying to pick the Notification view from status bar and put into another application. That makes no sense for an SDK application. Its our requirement that for our product we are planning to remove the notification view from status bar and keep it in some other application. That makes even less sense for an SDK application. i did analysis on statusBarService Which is only part of the firmware and is not to be used by SDK applications. If you are actually modifying the firmware, this is not the correct list to be using -- visit http://source.android.com to find one that is more suitable for firmware questions. So i thought of passing this view instance ( i.e expanded ) to an another application via aidl. and we can show the view, but updating the view and those logics still remains same!! None of that is possible, except *maybe* by modifying the firmware, and I am skeptical even of that. so my question was is there an way to convert view object to bytes and pass them via parcel ? No. RemoteViews is designed to cross process boundaries. View is not, nor should it cross process boundaries. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android 3.0 Programming Books: http://commonsware.com/books -- 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: how to write a view object into a parcelable class
okay.. Thanks for your advise. On Mar 13, 6:33 pm, Mark Murphy mmur...@commonsware.com wrote: On Sun, Mar 13, 2011 at 9:27 AM, mani smanikanda...@gmail.com wrote: I am trying to pick the Notification view from status bar and put into another application. That makes no sense for an SDK application. Its our requirement that for our product we are planning to remove the notification view from status bar and keep it in some other application. That makes even less sense for an SDK application. i did analysis on statusBarService Which is only part of the firmware and is not to be used by SDK applications. If you are actually modifying the firmware, this is not the correct list to be using -- visithttp://source.android.comto find one that is more suitable for firmware questions. So i thought of passing this view instance ( i.e expanded ) to an another application via aidl. and we can show the view, but updating the view and those logics still remains same!! None of that is possible, except *maybe* by modifying the firmware, and I am skeptical even of that. so my question was is there an way to convert view object to bytes and pass them via parcel ? No. RemoteViews is designed to cross process boundaries. View is not, nor should it cross process boundaries. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android 3.0 Programming Books:http://commonsware.com/books -- 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] RadioGroup listener won't listen when buttons are not direct children
I'm trying to make a RadioGroup with active games where there is a message Your move! beside those games where it is your move. So, I modified my RadioGroup to have LinearLayouts with horizontal orientation as immediate children, then nest the RadioButtons inside those along with a TextView that has the appropriate message where needed. Unfortunately, when I put the LinearLayout between the RadioButtons and the RadioGroup in the hierarchy, the RadioGroup OnClickListener() stopped working. So, my question is how to get the RadioGroup to listen while still dynamically generating a message for those games where it's your move. Here's the code that generates the custom RadioGroup (a class ResumeRadioGroup that extends RadioGroup) and which is setting the tags correctly: private void init(Context context) { db = new ChessDataBaseAdapter(context); db.open(); playerCursor = db.getActiveGamePlayers(); numPlayers = playerCursor.getCount(); Log.d(TAG, numPlayers + players found with active games); final int playerNameCol = playerCursor.getColumnIndex(PLAYER_NAME_COL); final int playerIdCol = playerCursor.getColumnIndex(PLAYER_ID_COL); final int gameIdCol = playerCursor.getColumnIndex(GAME_ID_COL); final int selfToMoveCol = playerCursor.getColumnIndex(SELF_TO_MOVE_COL); playerRadio = new RadioButton[numPlayers]; // new LinearLayout container; TextView moveText; playerCursor.moveToFirst(); for (int i = 0; i numPlayers; ++i) { container = new LinearLayout(context); playerRadio[i] = new RadioButton(context); playerRadio[i].setText(playerCursor.getString(playerNameCol)); Log.d(TAG, setTag() playerId: + playerCursor.getInt(playerIdCol) + , gameId: + playerCursor.getInt(gameIdCol)); playerRadio[i].setTag(new PlayerAndGame(playerCursor.getInt(playerIdCol), playerCursor.getInt(gameIdCol))); moveText = new TextView(context); moveText.setGravity(Gravity.RIGHT); if (playerCursor.getInt(selfToMoveCol) == 1) { moveText.setText(Your move!); moveText.setTextColor(Color.parseColor(#ffddad65)); container.setBackgroundColor(Color.parseColor(#ff67656c)); } container.setPadding(5, 0, 5, 0); container.setOrientation(HORIZONTAL); container.addView(playerRadio[i], LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT); container.addView(moveText, LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT); //*/ this.addView(container, LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT); playerCursor.moveToNext(); } playerCursor.close(); db.close(); } However, when I set up my listener for the RadioGroup as follows (in the Activity that controls these views), nothing is happening when a button is clicked: private void init() { selectedPlayer = -1; selectedGame = -1; continueButton = findViewById(R.id.continue_button); gameRadioGroup = (RadioGroup) findViewById(R.id.resume_radio); continueButton.setOnClickListener(this); gameRadioGroup.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() { @Override public void onCheckedChanged(RadioGroup group, int checkedId) { selectedGame = ((PlayerAndGame) findViewById(checkedId).getTag()).gameId(); selectedPlayer = ((PlayerAndGame) findViewById(checkedId).getTag()).playerId(); } }); } That is, selectedPlayer and selectedGame just stay at -1 when a button is clicked. Any ideas how to fix this problem? -- 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
Re: [android-developers] RadioGroup listener won't listen when buttons are not direct children
On Sun, Mar 13, 2011 at 10:33 AM, Marshall Farrier marsh...@marshallfarrier.com wrote: I’m trying to make a RadioGroup with active games where there is a message “Your move!” beside those games where it is your move. So, I modified my RadioGroup to have LinearLayouts with horizontal orientation as immediate children, then nest the RadioButtons inside those along with a TextView that has the appropriate message where needed. Unfortunately, when I put the LinearLayout between the RadioButtons and the RadioGroup in the hierarchy, the RadioGroup OnClickListener() stopped working. This is a long-standing issue. You need to have your RadioButtons be immediate children of your RadioGroup. Or, create your own RadioGroup with the smarts to look down the hierarchy for RadioButton children. Or, redesign your UI such that you do not need LinearLayouts in between the RadioGroup and the RadioButtons. In your case, you could simply use string concatenation to combine the radio button text with your message. Or, don't use RadioButtons. There may be other options, but these should give you grist for the proverbial mill. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android 3.0 Programming Books: http://commonsware.com/books -- 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: Log every action/event to an external file
I found a really helpufll class that helps me easilly to Log into a a .log file on the SDCARD and all I have to do is to call it whenever I need it during my application. You can actually almost creat a script of the user action. Thank you very much for your input that helped me finding this. P On Mar 13, 12:43 pm, Pedro Teixeira pedroteixeir...@gmail.com wrote: This is a thesis project so I'm actually conducting the user testing on a singular device that I will have access to the information I need. That's a thing to consider then. Thanks for the feedback On Mar 13, 12:23 pm, lbendlin l...@bendlin.us wrote: There are examples for custom exception handlers that make the stack trace nicer to read and allow to save the result to SD card. Users can then decide if they want to help you and send you these files. Market has the option to show the raw stack traces but I found these insufficient for troubleshooting. On Mar 13, 7:28 am, Pedro Teixeira pedroteixeir...@gmail.com wrote: Hi there, Thank you for the feedback. I actually thought there was something to automatically log this information, I read some project (Microlog for Android) but I must have misunderstood. So basically what you're saying is that I'll have to log every piece of code that I actually want to a internal file and like this have posterior access to the information and I'll also be able to just log the valuable information that I need instead of everything that device might do, right? I'll dig on this, thank you very much for your time. P On Mar 12, 7:43 pm, TreKing treking...@gmail.com wrote: On Sat, Mar 12, 2011 at 11:52 AM, Pedro Teixeira pedroteixeir...@gmail.comwrote: I'd like to store events like pressing buttons but also store the location and orientation of the device while using my application as well as the time between this actions. Stuff like this you'd have to have your own code to read the device settings. If you're hoping for some automatic way to log all this information, I doubt you're going to find it. Is there any good approach for this? Was I clear or can I try and explain in another way? You are free to create and write to files on your own app's space (or even the SD card) for logging purposes. I have a log class that not only writes to the LogCat in debug mode but generates an internal log that I can send in bug reports if and when the app crashes on user devices. It has been *far* more useful than the generic stack traces in the developer console in resolving issues that crop up in the wild. You just have to be careful about logging only what's actually useful and keeping the log file size to something reasonable for a mobile device. --- -- TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- 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
Re: [android-developers] RadioGroup listener won't listen when buttons are not direct children
13.03.2011 17:33, Marshall Farrier ?: Unfortunately, when I put the LinearLayout between the RadioButtons and the RadioGroup in the hierarchy, the RadioGroup OnClickListener() stopped working. You can always mange RadioButton states without a RadioGroup at all, by setting an OnCheckedChangeListener for all the buttons and tracking the current selection. It's only about a dozen lines of code. -- Kostya Vasilyev -- http://kmansoft.wordpress.com -- 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] Mapview ArrayIndexOutOfBoundsException in java.util.Vector.elementAt
I really need some help. I have a report of a force close with this stack trace, and I cant find any information on how to prevent this type of error. java.util.Vector.elementAt(Vector.java:331) com.google.googlenav.map.Map.drawTile(Unknown Source) com.google.googlenav.map.Map.drawMapBackground(Unknown Source) com.google.googlenav.map.Map.drawMap(Unknown Source) com.google.android.maps.MapView.drawMap(MapView.java:1048) com.google.android.maps.MapView.onDraw(MapView.java:486) android.view.View.draw(View.java:6535) android.view.ViewGroup.drawChild(ViewGroup.java:1531) android.view.ViewGroup.dispatchDraw(ViewGroup.java:1258) android.view.View.draw(View.java:6538) android.view.ViewGroup.drawChild(ViewGroup.java:1531) android.view.ViewGroup.dispatchDraw(ViewGroup.java:1258) android.view.View.draw(View.java:6538) android.widget.FrameLayout.draw(FrameLayout.java:352) android.view.ViewGroup.drawChild(ViewGroup.java:1531) android.view.ViewGroup.dispatchDraw(ViewGroup.java:1258) android.view.View.draw(View.java:6538) android.widget.FrameLayout.draw(FrameLayout.java:352) com.android.internal.policy.impl.PhoneWindow $DecorView.draw(PhoneWindow.java:1830) android.view.ViewRoot.draw(ViewRoot.java:1349) android.view.ViewRoot.performTraversals(ViewRoot.java:1114) android.view.ViewRoot.handleMessage(ViewRoot.java:1633) android.os.Handler.dispatchMessage(Handler.java:99) android.os.Looper.loop(Looper.java:123) android.app.ActivityThread.main(ActivityThread.java:4363) java.lang.reflect.Method.invokeNative(Native Method) java.lang.reflect.Method.invoke(Method.java:521) com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:860) com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) dalvik.system.NativeStart.main(Native Method) -- 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: RadioGroup listener won't listen when buttons are not direct children
Thanks very much for the fast responses! I don't like the string concatention because the UI looks way better if I can make the message text a different color and size. Any suggestions on where to look to make my RadioGroup smart enough to look down the hierarchy or to drop the RadioGroup but keep the RadioButtons and manage their states by setting an onCheckedChangeListener? That would be my preferred solution, but I'm having trouble figuring out how to approach that. On Mar 13, 9:43 am, Kostya Vasilyev kmans...@gmail.com wrote: 13.03.2011 17:33, Marshall Farrier ?: Unfortunately, when I put the LinearLayout between the RadioButtons and the RadioGroup in the hierarchy, the RadioGroup OnClickListener() stopped working. You can always mange RadioButton states without a RadioGroup at all, by setting an OnCheckedChangeListener for all the buttons and tracking the current selection. It's only about a dozen lines of code. -- Kostya Vasilyev --http://kmansoft.wordpress.com -- 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] Dynamic rows in a TableLayout
Hi I 'm trying to add dynamic rows to a table layout I current have an image button (to add) and then it runs the code TextView txt02 = new TextView(row.getContext()); txt02.setId(102000 + table.getChildCount() + 1); txt02.setTextSize(TypedValue.COMPLEX_UNIT_PT, 10); txt02.setText(Description); txt02.setWidth(400); txt02.setHeight(20); row.addView(txt02); to add all the elements in this new row and then adds the row to the table. I would prefer to us the layout new_row.xml which has TableRow xmlns:android=http://schemas.android.com/apk/res/android; android:id=@+id/invNewRow android:layout_margin=2dp EditText android:id=@+id/invName android:text=Description style=@style/EditFont.Black android:layout_margin=2dp android:background=#FF android:layout_width=400dp android:layout_height=20dp / /TableRow I need to interact with each of the elements, so the first element might be a spinner to select and item code and then fill in the Description based on the spinner value etc... Thanks in advance -- 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
Re: [android-developers] Re: RadioGroup listener won't listen when buttons are not direct children
13.03.2011 18:14, Aisthesis пишет: to drop the RadioGroup but keep the RadioButtons and manage their states by setting an onCheckedChangeListener? You will need something that implements OnCheckedChangeListener, might as well be your activity. Also something to store the currently selected radio button (e.g. private CompoundButton mCurrentButton). Then in onCreate, find all the radio buttons, and call button.setOnCheckedChangeListener for each. Finally, in the thing that implements OnCheckedChangeListener, something like this: @Override public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { if (isChecked mCurrentButton != button) { mCurrentButton .setChecked(false); mCurrentButton = button; } } With the above you don't need a RadioGroup, and the currently selected option is always in mCurrentButton. -- Kostya -- Kostya Vasilyev -- http://kmansoft.wordpress.com -- 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
Re: [android-developers] Re: How to share data among different devices
On Sun, Mar 13, 2011 at 11:41 AM, ez qzh...@gmail.com wrote: I am looking for out of box solution from Google. There is none. The closest thing is BackupEngine, but that is not a sync solution. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android 3.0 Programming Books: http://commonsware.com/books -- 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] Making Views the Same Width
Is there a standard idiom for an Activity to enforce that two of it's child views have the same width in cases where a LinearLayout won't do it (like two horizontally adjacent buttons)? I assume it would involve something like overriding onDraw, but perhaps there is another entry point that is more appropriate. Jay -- 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: How to share data among different devices
I am looking for out of box solution from Google. Anyone knows if any of Google services can do this without setting up my own web application. Thanks On Mar 10, 11:27 am, Greg Donald gdon...@gmail.com wrote: On Thu, Mar 10, 2011 at 11:11 AM, ez qzh...@gmail.com wrote: We don't have a remote server and are looking for Google Cloud solution. Any ideas? Do you just not know the URL? http://code.google.com/appengine/ -- Greg Donald destiney.com | gregdonald.com -- 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: RadioGroup listener won't listen when buttons are not direct children
awesome, tx Kostya! On Mar 13, 10:49 am, Kostya Vasilyev kmans...@gmail.com wrote: 13.03.2011 18:14, Aisthesis пишет: to drop the RadioGroup but keep the RadioButtons and manage their states by setting an onCheckedChangeListener? You will need something that implements OnCheckedChangeListener, might as well be your activity. Also something to store the currently selected radio button (e.g. private CompoundButton mCurrentButton). Then in onCreate, find all the radio buttons, and call button.setOnCheckedChangeListener for each. Finally, in the thing that implements OnCheckedChangeListener, something like this: @Override public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { if (isChecked mCurrentButton != button) { mCurrentButton .setChecked(false); mCurrentButton = button; } } With the above you don't need a RadioGroup, and the currently selected option is always in mCurrentButton. -- Kostya -- Kostya Vasilyev --http://kmansoft.wordpress.com -- 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] Yarrr the pirates be on facebook sharin' yer paid apps
http://www.facebook.com/profile.php?id=1113885654 using site http://mobilesat.blogspot.com/ to syndicate files from mediafire. He's posting to all of the device fan pages with links to his site which is full of commercial APKs for free. Please report this person for spam/scam if it affects you and also report the blogspot violation if possible. Thanks -- 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] ANN: Mock Objects on Android with Borachio
One of my biggest frustrations with writing code for Android has been the fact that none of the current Java mocking frameworks work on Android’s Dalvik VM. I recently released Borachio a native Scala mocking framework which does work on Android. Because Borachio is written in Scala, you’ll need to write your tests in Scala. But it can be used to test code written in Java. There's a description of how to use Borachio on Android on my blog: http://www.paulbutcher.com/2011/03/mock-objects-on-android-with-borachio-part-1/ http://www.paulbutcher.com/2011/03/mock-objects-on-android-with-borachio-part-2/ http://www.paulbutcher.com/2011/03/mock-objects-on-android-with-borachio-part-3/ I'd be very interested in any feedback! -- paul.butcher-msgCount++ Snetterton, Castle Combe, Cadwell Park... Who says I have a one track mind? http://www.paulbutcher.com/ LinkedIn: http://www.linkedin.com/in/paulbutcher MSN: p...@paulbutcher.com AIM: paulrabutcher Skype: paulrabutcher -- 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: Global Variables
I think Java still has a variant of the GOTO, but I have never seen it used once in about 18 years of java development! - Brill Pappin On Mar 9, 6:01 pm, Kostya Vasilyev kmans...@gmail.com wrote: Oh, come on, guys, it's not that bad :) Sometimes I even miss a good old-fashioned goto. -- Kostya 10.03.2011 0:26, TreKing ?: On Wed, Mar 9, 2011 at 3:15 PM, David Williams dwilli...@dtw-consulting.com mailto:dwilli...@dtw-consulting.com wrote: That said, why avoid them like the plague? Global variables are one of those things, like Singletons, that on the surface seem to make life easier, then get abused like a step-child to the point of making everything worse. Used correctly, in moderation, it's often the fastest, easiest, cleanest, and most straightforward way of doing something. Like a simple flag indicating DEBUG vs RELEASE, for example. --- -- TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- 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 -- Kostya Vasilyev --http://kmansoft.wordpress.com -- 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: Global Variables
public static final apiKey = xxx; now you can access it as: String key = globalVars.apiKey; However, not that this is not a variable, its a constant. According to convention, it should be in upper case: public static final API_KEY = xxx; - Brill Pappin On Mar 9, 8:11 pm, David Williams dwilli...@dtw-consulting.com wrote: Ok, trying to do this but struggling. I created a class as follows: package com.dtwconsulting.golfcaddie; import android.app.Application; public class globalVars extends Application{ public String apiKey = ; public String getApiKey() { return apiKey; } } Now, how do I get the value of the apiKey from somewhere else? Sorry, this is just my lack of knowledge on Java here. I was hoping it was something like globalVars.getApiKey(), but that doesn't seem to work. David Williams Check out our WebOS mobile phone app for the Palm Pre and Pixi: http://www.dtw-consulting.com/GolfCaddie Golf Caddie http://www.dtw-consulting.com/GolfCaddie | Golf Caddie Forum http://www.dtw-consulting.com/GolfCaddie/forum | Golf Caddie FAQ http://www.dtw-consulting.com/GolfCaddie/faq.html by DTW-Consulting, Inc. On 3/9/2011 3:24 PM, Chris Stewart wrote: I tend to do what TreKing suggested. I have a class called CommonVariables that really holds static strings for Flurry event names, the year parameter for my app (it's seasonal and changes once a year) which is used all over the place, and things like that. -- Chris Stewart http://chriswstewart.com On Wed, Mar 9, 2011 at 3:53 PM, TreKing treking...@gmail.com mailto:treking...@gmail.com wrote: On Wed, Mar 9, 2011 at 2:41 PM, David Williams dwilli...@dtw-consulting.com mailto:dwilli...@dtw-consulting.com wrote: What is the best way of going about setting up global variables? IDK about best, but easy: public static values somewhere that you set up in a custom Application class. --- -- TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- 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 mailto:android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com mailto:android-developers%2bunsubscr...@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 -- 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] Rooting your device
HI everyone, Does anyone know if my rooting my LG Optimus P500 void its warranty? I live in India and have bought the device here. Thanks -- Raghav Sood http://www.raghavsood.com/ -- 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: Global Variables
That is a very good article and entertaining to read.. every one of us should be reading it and understanding it before we're allowed to call ourselves programmers :) - Brill Pappin On Mar 9, 8:35 pm, fadden fad...@android.com wrote: On Mar 9, 2:13 pm, TreKing treking...@gmail.com wrote: On Wed, Mar 9, 2011 at 4:10 PM, Kenny Riddile kfridd...@gmail.com wrote: Singletons are global variables. Uh ... no ... no they're not. I think this about covers it: http://sites.google.com/site/steveyegge2/singleton-considered-stupid -- 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: Yarrr the pirates be on facebook sharin' yer paid apps
mediafire will take it down, but you need to send them a DMCA takedown notice. I'm sure someone here has some template notice that can be used. - Brill Pappin -- 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: Status Bar Notifications
Why is the analytics library mixed up with a UI library like that? Sounds like a maintenance nightmare. - Brill Pappin -- 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
Re: [android-developers] Re: Log every action/event to an external file
On Sun, Mar 13, 2011 at 9:42 AM, Pedro Teixeira pedroteixeir...@gmail.comwrote: I found a really helpufll class that helps me easilly to Log into a a .log file on the SDCARD and all I have to do is to call it whenever I need it during my application. Er ... what did you find and where did you find it ? :-) - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- 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: Buyer’s Currency
Yah, for some reason Google doesn't take Canadian developers very seriously. Likely they simply forgot the dog (us canucks) when they went on vacation (turned on the feature)! We seem to have some kind of special place in the Google world where we have partial everything. /rant -- 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
Re: [android-developers] Re: Install % drop again?
Wow, I was worried about one of my keyboards dropping from 65% to 60%, but if others are seeing a 35%-40% average, I guess I should be happy! - Brill Pappin -- 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: Question about registering for location updates
Thank you very much! I'll do this ;-) An other and my last question is: if I have set the distance AND time interval - must both conditions be true that onLocationChanged() is called, or only one? (AND or OR?) Thanks a lot! -Danny On 13 Mrz., 13:16, lbendlin l...@bendlin.us wrote: You have to unregister. Otherwise you end up with multiple listeners for the same provider. On Mar 12, 4:05 pm, DannyS. danny.schi...@googlemail.com wrote: Hi, I have to register my locationListener for location updates using the LocationManager. Now the user have the change to set values in the preferences that should set for gestitration. mLocationManager.requestLocationUpdates(GPS_PROVIDER, PreferenceHelper.getLocationFixInterval(mPrefs), PreferenceHelper.getLocationFixDistance(mPrefs), locationListener); mLocationManager.requestLocationUpdates(NETWORK_PROVIDER, PreferenceHelper.getLocationFixInterval(mPrefs), PreferenceHelper.getLocationFixDistance(mPrefs), locationListener); If the preferences for the fix distance or fix interval changes, I need to call requestLocationUpdates again with the new values. Do I have to unregister from the listener first or is it overridden by the new request call? Thanks a lot! -Danny -- 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
Re: [android-developers] Re: Buyer’s Currency
On Sun, Mar 13, 2011 at 12:51 PM, Brill Pappin br...@pappin.ca wrote: Yah, for some reason Google doesn't take Canadian developers very seriously. You say that as if they take the rest of us very seriously ... =P - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- 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
Re: [android-developers] passing arrays between classes using intent
On Sun, Mar 13, 2011 at 7:49 AM, Chetan Singh Bisht chetanbish...@gmail.com wrote: now i need to pass these values from an activity class to map activity class..i have used bundle to pass variables but i have no clue how to pass integer and string arrays and how to retrieve them in the second class using bundle... can anyone please provide codes or relevant links which may be helpful in solving this problem using bundle Um ... have you looked at the Bundle class documentation? There are functions that are literally called putXArray and getXArray, where X is some type. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- 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
Re: [android-developers] Dynamic rows in a TableLayout
On Sun, Mar 13, 2011 at 10:35 AM, New Developer secur...@isscp.com wrote: Thanks in advance I did not see a question. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- 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
Re: [android-developers] Rooting your device
Raghav, On Sun, Mar 13, 2011 at 11:02 PM, Raghav Sood raghavs...@gmail.com wrote: Does anyone know if my rooting my LG Optimus P500 void its warranty? I live in India and have bought the device here. This mailing list is for android development, not device support. Please read your device's warranty coverage terms and conditions to find the answer to that.You can find better answers at relevant threads on various android support forums, general boards at xda-devs, etc.. Besides, rooting isn't a permanent operation in most cases. -- Harsh J www.harshj.com -- 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
Re: [android-developers] Re: Question about registering for location updates
On Sun, Mar 13, 2011 at 12:56 PM, Danny S. danny.schi...@googlemail.comwrote: An other and my last question is: if I have set the distance AND time interval - must both conditions be true that onLocationChanged() is called, or only one? (AND or OR?) http://groups.google.com/group/android-developers/browse_thread/thread/6783f9d429510852/153019563e0a0ede - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- 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
Re: [android-developers] Rooting your device
Thanks Harsh, I know that this is a development list but I used it as a last resort. I have previously checked the manuals and written LG a mail without effect. Even their customer support couldn't answer me. On Sun, Mar 13, 2011 at 11:49 PM, Harsh J qwertyman...@gmail.com wrote: Raghav, On Sun, Mar 13, 2011 at 11:02 PM, Raghav Sood raghavs...@gmail.com wrote: Does anyone know if my rooting my LG Optimus P500 void its warranty? I live in India and have bought the device here. This mailing list is for android development, not device support. Please read your device's warranty coverage terms and conditions to find the answer to that.You can find better answers at relevant threads on various android support forums, general boards at xda-devs, etc.. Besides, rooting isn't a permanent operation in most cases. -- Harsh J www.harshj.com -- 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 -- Raghav Sood http://www.raghavsood.com/ -- 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] MediaPlayer.isPlaying() question
Will android.media.MediaPlayer.isPlaying() return true if the MediaPlayer is paused? Ken -- 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] Installation unsuccesfull messages
I've have a few people report that that my app won't install on their phones, and they are just getting an Installation unsuccesful message. That isn't very helpful. I do have ACRA installed, and haven't received any reports from that. Any suggestions on where to look? -- 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
Re: [android-developers] Making Views the Same Width
On Sun, Mar 13, 2011 at 11:09 AM, Jay Bloodworth johnabloodwor...@gmail.com wrote: Is there a standard idiom for an Activity to enforce that two of it's child views have the same width in cases where a LinearLayout won't do it (like two horizontally adjacent buttons)? If you have to horizontally adjacent button in a LinearLayout, you can set their weights to 1 each, so they both occupy the same amount of space and collectively use up all the space their parent provides. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- 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
Re: [android-developers] Rooting your device
13.03.2011 21:24, Raghav Sood пишет: I know that this is a development list but I used it as a last resort. I have previously checked the manuals and written LG a mail without effect. Even their customer support couldn't answer me. You could try asking in a different way: Does making modifications to the device's pre-installed software, that were not developed or approved by LG, have any effect on the warranty? -- Kostya Vasilyev -- http://kmansoft.wordpress.com -- 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
Re: [android-developers] Installation unsuccesfull messages
On Sun, Mar 13, 2011 at 1:27 PM, John Lussmyer johnlussm...@gmail.comwrote: Any suggestions on where to look? This may shock you, but it's an issue with the Android Market. I would direct your users here: http://www.google.com/support/androidmarket/bin/search.py?ctx=en%3Asearchboxforum=1query=installation+unsuccessful+more+forum - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- 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: Installation unsuccesfull messages
Any suggestions on where to look? A possible quick fix, tell your users to: 1. Go to Settings 2. Select Applications 3. Select Manage Applications 4. Select the Market app 5. Select clear cache clear data uninstall updates 6. Back out and select Download Manager 7. Select clear data This might help, but like TreKing said, it's an ongoing issue. Ken -- 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: Mapview ArrayIndexOutOfBoundsException in java.util.Vector.elementAt
You might have to do some catching of exceptions in your ItemizedOverlay and/or LocationOverlay classes. There are some bugs eg on Motorola phones that lead to unexpected exceptions on some phones/ versions of phones/versions of Android. I can't find the links at the moment, there is a discussion of this on stackoverflow... Greetings from Lucerne, Stephan On Mar 13, 4:17 pm, Ricky arsenickiss7...@gmail.com wrote: I really need some help. I have a report of a force close with this stack trace, and I cant find any information on how to prevent this type of error. java.util.Vector.elementAt(Vector.java:331) com.google.googlenav.map.Map.drawTile(Unknown Source) -- 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
Re: [android-developers] Renderscript vs WebGL
On Sun, Mar 13, 2011 at 6:17 AM, John Davis unicom...@gmail.com wrote: Anyone know the strategy for 3D on Android? Is the primary platform going to be Renderscript or WebGL? That question makes no sense. Those two things have nothing to do with each other, except they have GL involved. Also as far as Android is concerned, neither is a platform let alone primary. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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
Re: [android-developers] resources directory for 320x400 and 800x854
Don't. Raw resolutions are fragile. You will need to do something to take care of resizing or cropping the image at run time to work on whatever screen you find yourself on. On Sun, Mar 13, 2011 at 1:00 AM, lruck lruckha...@gmx.de wrote: resource handling: how can iam add resources for the resolution of 320x400 and 800x854? the image can't be resize or crop at realtime from device until they looks not good. all images are fullscreen background images or splash picture. the directorys drawable-l/m/h dpi only support the default resolutions. brgds lars -- 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 -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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: MediaPlayer.isPlaying() question
What I'm really asking is for a way to test if the MediaPlayer was paused. I think my app is being paused by the OS for maybe a notification or something. It drives me up the wall when it just...stops. On Mar 13, 11:25 am, Ken H hunt1...@gmail.com wrote: Will android.media.MediaPlayer.isPlaying() return true if the MediaPlayer is paused? Ken -- 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
Re: [android-developers] Renderscript vs WebGL
Dianne, My perception is that WebGL support isn't even being considered on Android, is this true? Forward progress on this front has been minimal. For no touch deployment of 3D apps on Android, what should we as developers expect to see in the future? OES2.0 support in the PNaCl sandbox? A Renderscript sandbox? Does this make sense? JD On Sun, Mar 13, 2011 at 2:00 PM, Dianne Hackborn hack...@android.comwrote: On Sun, Mar 13, 2011 at 6:17 AM, John Davis unicom...@gmail.com wrote: Anyone know the strategy for 3D on Android? Is the primary platform going to be Renderscript or WebGL? That question makes no sense. Those two things have nothing to do with each other, except they have GL involved. Also as far as Android is concerned, neither is a platform let alone primary. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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] Any idea for Augmented Reality??
Hey guys can anyone guide me to the path of augmented reality some nice tutorials, books ,special tips, platforms/sdk video links which can do the magic,.. Thanks -- 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: Question about registering for location updates
That was really helpful! Thanks a lot! -Danny S. On 13 Mrz., 19:20, TreKing treking...@gmail.com wrote: On Sun, Mar 13, 2011 at 12:56 PM, Danny S. danny.schi...@googlemail.comwrote: An other and my last question is: if I have set the distance AND time interval - must both conditions be true that onLocationChanged() is called, or only one? (AND or OR?) http://groups.google.com/group/android-developers/browse_thread/threa... --- -- TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- 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: ANR keyDispatchingTimedOut on android/com.android.internal.app.RingtonePickerActivity
I've seen these when running monkey when with the version of my app that has market licensing. Monkey would stop and dump reporting a crash but nothing is showing on the emulator and the app continues to run just fine. What I've read but not dug into yet is that the thread needs to be set up differently than the code in the market licensing does. Apparently they need to update it. Much more rarely I've seen it without any licensing but ignored it since it didn't pop up a crash dialog and the app continued to run fine. In the dump above the stack trace appears to be connected to the app code (unlike mine case) and look up what is happening at that point in your code if you find anything at all. On Mar 13, 4:03 am, San Zhang dahua007...@gmail.com wrote: Today, I got a ANR error, too. I want to know how to read this error message. 2011/3/1 Sven sirdarthna...@googlemail.com Hello! Today I got a error report in my market account for my application. It is listed under Freeze. I use the RingtonePicker in my preferences. Any chance I can do something on this error? Whats the reason for this? Following the stack trace: v1.5.3 Mar 1, 2011 7:34:38 AM OTHER DALVIK THREADS: main prio=5 tid=1 NATIVE | group=main sCount=1 dsCount=0 s=N obj=0x40020ba0 self=0xcdd0 | sysTid=24486 nice=0 sched=0/0 cgrp=unknown handle=-1345025984 at android.graphics.Canvas.native_drawRect(Native Method) at android.graphics.Canvas.drawRect(Canvas.java:870) at android.view.View.draw(View.java:6866) at android.widget.AbsListView.draw(AbsListView.java:2257) at android.view.ViewGroup.drawChild(ViewGroup.java:1640) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367) at android.view.View.draw(View.java:6743) at android.view.ViewGroup.drawChild(ViewGroup.java:1640) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367) at android.view.ViewGroup.drawChild(ViewGroup.java:1638) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367) at android.view.ViewGroup.drawChild(ViewGroup.java:1638) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367) at android.view.View.draw(View.java:6743) at android.widget.FrameLayout.draw(FrameLayout.java:352) at com.android.internal.policy.impl.PhoneWindow $DecorView.draw(PhoneWindow.java:1846) at android.view.ViewRoot.draw(ViewRoot.java:1407) at android.view.ViewRoot.performTraversals(ViewRoot.java:1163) at android.view.ViewRoot.handleMessage(ViewRoot.java:1727) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:123) at android.app.ActivityThread.main(ActivityThread.java:4627) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:521) at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:860) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) at dalvik.system.NativeStart.main(Native Method) Binder Thread #2 prio=5 tid=6 NATIVE | group=main sCount=1 dsCount=0 s=N obj=0x44a4ee80 self=0x126178 | sysTid=24491 nice=0 sched=0/0 cgrp=unknown handle=1234816 at dalvik.system.NativeStart.run(Native Method) Binder Thread #1 prio=5 tid=5 NATIVE | group=main sCount=1 dsCount=0 s=N obj=0x44a4e840 self=0x139220 | sysTid=24490 nice=0 sched=0/0 cgrp=unknown handle=1239728 at dalvik.system.NativeStart.run(Native Method) Compiler daemon prio=5 tid=4 VMWAIT | group=system sCount=1 dsCount=0 s=N obj=0x44a482a0 self=0x12e938 | sysTid=24489 nice=0 sched=0/0 cgrp=unknown handle=1183528 at dalvik.system.NativeStart.run(Native Method) Signal Catcher daemon prio=5 tid=3 RUNNABLE | group=system sCount=0 dsCount=0 s=N obj=0x44a481e8 self=0x125dd8 | sysTid=24488 nice=0 sched=0/0 cgrp=unknown handle=1203608 at dalvik.system.NativeStart.run(Native Method) HeapWorker daemon prio=5 tid=2 VMWAIT | group=system sCount=1 dsCount=0 s=N obj=0x43347ce8 self=0x126938 | sysTid=24487 nice=0 sched=0/0 cgrp=unknown handle=1206520 at dalvik.system.NativeStart.run(Native Method) Thanks for your help! -- 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: Any idea for Augmented Reality??
On Mar 13, 3:59 pm, Abhishek Talwar r.o.b.i.n.abhis...@gmail.com wrote: can anyone guide me to the path of augmented reality some nice tutorials, books ,special tips, platforms/sdk video links which can do the magic,.. Here you go: http://tinyurl.com/663pdl2 -- 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
Re: [android-developers] ANR keyDispatchingTimedOut on android/com.android.internal.app.RingtonePickerActivity
It is just the stacks of all of the Dalvik threads in your process at the time of the ANR. The ANR happens because the main thread of the process is not responding to messages, so generally you look at the main (first) thread in the list and see what it is doing. On Sun, Mar 13, 2011 at 4:03 AM, San Zhang dahua007...@gmail.com wrote: Today, I got a ANR error, too. I want to know how to read this error message. 2011/3/1 Sven sirdarthna...@googlemail.com Hello! Today I got a error report in my market account for my application. It is listed under Freeze. I use the RingtonePicker in my preferences. Any chance I can do something on this error? Whats the reason for this? Following the stack trace: v1.5.3 Mar 1, 2011 7:34:38 AM OTHER DALVIK THREADS: main prio=5 tid=1 NATIVE | group=main sCount=1 dsCount=0 s=N obj=0x40020ba0 self=0xcdd0 | sysTid=24486 nice=0 sched=0/0 cgrp=unknown handle=-1345025984 at android.graphics.Canvas.native_drawRect(Native Method) at android.graphics.Canvas.drawRect(Canvas.java:870) at android.view.View.draw(View.java:6866) at android.widget.AbsListView.draw(AbsListView.java:2257) at android.view.ViewGroup.drawChild(ViewGroup.java:1640) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367) at android.view.View.draw(View.java:6743) at android.view.ViewGroup.drawChild(ViewGroup.java:1640) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367) at android.view.ViewGroup.drawChild(ViewGroup.java:1638) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367) at android.view.ViewGroup.drawChild(ViewGroup.java:1638) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367) at android.view.View.draw(View.java:6743) at android.widget.FrameLayout.draw(FrameLayout.java:352) at com.android.internal.policy.impl.PhoneWindow $DecorView.draw(PhoneWindow.java:1846) at android.view.ViewRoot.draw(ViewRoot.java:1407) at android.view.ViewRoot.performTraversals(ViewRoot.java:1163) at android.view.ViewRoot.handleMessage(ViewRoot.java:1727) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:123) at android.app.ActivityThread.main(ActivityThread.java:4627) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:521) at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:860) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) at dalvik.system.NativeStart.main(Native Method) Binder Thread #2 prio=5 tid=6 NATIVE | group=main sCount=1 dsCount=0 s=N obj=0x44a4ee80 self=0x126178 | sysTid=24491 nice=0 sched=0/0 cgrp=unknown handle=1234816 at dalvik.system.NativeStart.run(Native Method) Binder Thread #1 prio=5 tid=5 NATIVE | group=main sCount=1 dsCount=0 s=N obj=0x44a4e840 self=0x139220 | sysTid=24490 nice=0 sched=0/0 cgrp=unknown handle=1239728 at dalvik.system.NativeStart.run(Native Method) Compiler daemon prio=5 tid=4 VMWAIT | group=system sCount=1 dsCount=0 s=N obj=0x44a482a0 self=0x12e938 | sysTid=24489 nice=0 sched=0/0 cgrp=unknown handle=1183528 at dalvik.system.NativeStart.run(Native Method) Signal Catcher daemon prio=5 tid=3 RUNNABLE | group=system sCount=0 dsCount=0 s=N obj=0x44a481e8 self=0x125dd8 | sysTid=24488 nice=0 sched=0/0 cgrp=unknown handle=1203608 at dalvik.system.NativeStart.run(Native Method) HeapWorker daemon prio=5 tid=2 VMWAIT | group=system sCount=1 dsCount=0 s=N obj=0x43347ce8 self=0x126938 | sysTid=24487 nice=0 sched=0/0 cgrp=unknown handle=1206520 at dalvik.system.NativeStart.run(Native Method) Thanks for your help! -- 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 -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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
Re: [android-developers] Renderscript vs WebGL
On Sun, Mar 13, 2011 at 12:28 PM, John Davis jda...@pcprogramming.com wrote: My perception is that WebGL support isn't even being considered on Android, is this true? Forward progress on this front has been minimal. Isn't even considered? I don't even know what that means. I don't think WebGL is currently supported in the browser (it is a pretty new standard), but I doubt there has been any statement about it not ever being supported or something like that. That said, I don't work on the browser, I can't say much about it. For no touch deployment of 3D apps on Android, what should we as developers expect to see in the future? OES2.0 support in the PNaCl sandbox? A Renderscript sandbox? I don't know. Renderscript sandbox? Are you just making stuff up? :) -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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: Making Views the Same Width
Thanks. I should have been more clear. I don't want them to have to take up the whole space. I want them both to essentially wrap_content as if both had the same (wider of the two) labels. More generally, knowing how to do this kind of spacing by hand would make a RelativeLayout more useful in many cases. Jay On Mar 13, 1:28 pm, TreKing treking...@gmail.com wrote: On Sun, Mar 13, 2011 at 11:09 AM, Jay Bloodworth johnabloodwor...@gmail.com wrote: Is there a standard idiom for an Activity to enforce that two of it's child views have the same width in cases where a LinearLayout won't do it (like two horizontally adjacent buttons)? If you have to horizontally adjacent button in a LinearLayout, you can set their weights to 1 each, so they both occupy the same amount of space and collectively use up all the space their parent provides. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- 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
Re: [android-developers] Re: Making Views the Same Width
You'll need to write your own layout manager that implements the layout algorithm you want. Writing a layout manager to accomplish a specific layout is not hard; the ones that are built into the platform look complicated because they try to handle anything reasonable you throw at them and tend to have lots of options. Doing this is not related to an Activity at all. On Sun, Mar 13, 2011 at 2:47 PM, Jay johnabloodwor...@gmail.com wrote: Thanks. I should have been more clear. I don't want them to have to take up the whole space. I want them both to essentially wrap_content as if both had the same (wider of the two) labels. More generally, knowing how to do this kind of spacing by hand would make a RelativeLayout more useful in many cases. Jay On Mar 13, 1:28 pm, TreKing treking...@gmail.com wrote: On Sun, Mar 13, 2011 at 11:09 AM, Jay Bloodworth johnabloodwor...@gmail.com wrote: Is there a standard idiom for an Activity to enforce that two of it's child views have the same width in cases where a LinearLayout won't do it (like two horizontally adjacent buttons)? If you have to horizontally adjacent button in a LinearLayout, you can set their weights to 1 each, so they both occupy the same amount of space and collectively use up all the space their parent provides. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- 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 -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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
Re: [android-developers] Renderscript vs WebGL
I'm curious, if you don't know anything, why are you posting on Google's behalf? On Sun, Mar 13, 2011 at 4:19 PM, Dianne Hackborn hack...@android.comwrote: On Sun, Mar 13, 2011 at 12:28 PM, John Davis jda...@pcprogramming.com wrote: My perception is that WebGL support isn't even being considered on Android, is this true? Forward progress on this front has been minimal. Isn't even considered? I don't even know what that means. I don't think WebGL is currently supported in the browser (it is a pretty new standard), but I doubt there has been any statement about it not ever being supported or something like that. That said, I don't work on the browser, I can't say much about it. For no touch deployment of 3D apps on Android, what should we as developers expect to see in the future? OES2.0 support in the PNaCl sandbox? A Renderscript sandbox? I don't know. Renderscript sandbox? Are you just making stuff up? :) -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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
Re: [android-developers] Renderscript vs WebGL
On Sun, Mar 13, 2011 at 6:21 PM, John Davis jda...@pcprogramming.com wrote: I'm curious, if you don't know anything, why are you posting on Google's behalf? Please understand that Google makes few forward thinking statements regarding what is in and not in future versions of Android. We all find out when the stuff ships. This has been the case for the better part of three years. If you are interested in contributing code towards whatever 3D solution you wish to see, there are more relevant groups on http://source.android.com for that. Otherwise, please sit back, relax, and wait for the future to arrive. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android 3.0 Programming Books: http://commonsware.com/books -- 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
Re: [android-developers] Renderscript vs WebGL
Fair enough, where's the webgl section? On Sun, Mar 13, 2011 at 5:38 PM, Mark Murphy mmur...@commonsware.comwrote: On Sun, Mar 13, 2011 at 6:21 PM, John Davis jda...@pcprogramming.com wrote: I'm curious, if you don't know anything, why are you posting on Google's behalf? Please understand that Google makes few forward thinking statements regarding what is in and not in future versions of Android. We all find out when the stuff ships. This has been the case for the better part of three years. If you are interested in contributing code towards whatever 3D solution you wish to see, there are more relevant groups on http://source.android.com for that. Otherwise, please sit back, relax, and wait for the future to arrive. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android 3.0 Programming Books: http://commonsware.com/books -- 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] peculiar or undocumented behavior of ExifInterface?
I have been trying to use ExifInterface and am either doing something very wrong or my subject line is correct. If I run the following code ExifInterface hoohaa; hoohaa = new ExifInterface(filename); hoohaa.saveAttributes(); on a photograph taken by the standard android Camera application, a whole bunch of exif fields previously defined have disappeared (as evidenced by inspection with Exiftool (Phil Harvey) and other such programs). I find this very peculiar. On a much less important issue, if a photograph with a JPEG comment (NOT an exif UserComment) is the object of ExifInterface hoohaa; hoohaa = new ExifInterface(filename); String haahoo=hoohaa.getAttribute(UserComment); the JPEG comment will be returned as if it were an exif UserComment. I find this friendly in a way, but unwarranted and undocumented... Have I got this all wrong? Bernard Higonnet -- 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
Re: [android-developers] Renderscript vs WebGL
Note that you replied to me directly. I am redirecting this response to the list. On Sun, Mar 13, 2011 at 7:29 PM, John Davis jda...@pcprogramming.com wrote: How do I find out if someone else is already working on the same thing? Search the archives of [android-contrib] and [android-platform]. If you don't see anything, post to [android-contrib], saying you are interested in contributing XYZ related to WebGL, and you're wondering if anyone is working on this and if contributions in this area would be welcome. You might also want to cite the existing work in the area that you presumably uncovered via a Google search and how your contribution will relate to it, such as: http://blogs.sonyericsson.com/developerworld/2011/02/24/webgl-support-in-the-android-web-browser/ http://code.google.com/p/android/issues/detail?id=11012 I would also recommend that you be very precise about what you are planning to contribute. Just saying um, yeah, I wanna have WebGL, what can I do? probably won't get you terribly far. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android 3.0 Programming Books: http://commonsware.com/books -- 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] Creating SQLite DB
All, I am trying to create an SQLite DB but for some reason it's not working. My logic performs the following. db.openDatabase(GlobalVars.DATABASE_NAME, null, 0); This simply tries to open my DB. If the DB doesn't exist it will throw an exception, which I can check, but I would suspect that if the DB can't be opened it doesn't exist, therefore my assumption then is that this is a new install of my app and I need to create my DB. So, in my exception I am doing the following: db.openOrCreateDatabase(GlobalVars.DATABASE_NAME, null); I'd expect the above command to create the database regardless, but it isn't. The exception I am getting for both of the above commands is: *unable to open database file. *I am surprised am I getting this in the second exception as I would expect it to create the DB. DATABASE_NAME = golfcaddie.db What am I doing wrong? -- David Williams Check out our WebOS mobile phone app for the Palm Pre and Pixi: http://www.dtw-consulting.com/GolfCaddie Golf Caddie http://www.dtw-consulting.com/GolfCaddie | Golf Caddie Forum http://www.dtw-consulting.com/GolfCaddie/forum | Golf Caddie FAQ http://www.dtw-consulting.com/GolfCaddie/faq.html by DTW-Consulting, Inc. -- 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=eninline: GClogo.png
[android-developers] RSSI values
Hi, I trying to make a wifi meter and to get wifi signal strength I'm using the following code: WifiManager wifi = (WifiManager) context.getSystemService(Context.WIFI_SERVICE); int rssi = wifi.getConnectionInfo().getRssi(); I get values between -40 and -90 when connection is established and -248 when it's not and I'm using a Samsung Galaxy S for testing. Is -40 and -90 the max and min values for RSSI or will it change in different terminals? Is -248 also a constant? Are they available on the API? Thanks, Pedro Duque -- 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] Background Service
Hi All, I am writing an Android background service. I want it to become active when my another application is started. Any idea how do I detect the activation of another application? Should I package the application and service together? Thanks In Advance, Perumal -- 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
Re: [android-developers] Background Service
On Sun, Mar 13, 2011 at 8:25 PM, perumal316 perumal...@gmail.com wrote: I want it to become active when my another application is started. Any idea how do I detect the activation of another application? You don't detect another application. You start your service from your Activity. Should I package the application and service together? A Service has to be packaged with *some* application - particularly the one that is going to be starting it. So yeah. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- 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: bitmap returning null
hi, I tested this in Android 2.2 emulator. it is ok. On 3月12日, 下午4时24分, vani reddy vani.redd...@gmail.com wrote: Hi, I used the below links,but still bitmap is null. I am using the below iamge url,in browser it is opening. http://beemediahive.sitesystems.ca/~/media/Images/Ads/320x50/banner_a... I have attached my code also using the below links On Fri, Mar 11, 2011 at 8:51 PM, Kunju Vava android...@gmail.com wrote: hi This may help u http://en.androidwiki.com/wiki/Loading_images_from_a_remote_server http://getablogger.blogspot.com/2008/01/android-download-image-from-s... thnks -- 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 -- Regards, Vani Reddy ImageRemote.rar 55K查看下载- 隐藏被引用文字 - - 显示引用的文字 - -- 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
Re: [android-developers] Renderscript vs WebGL
It is also worth pointing out that it may be difficult to be able to contribute in this kind of area. The engineers responsible for different parts of the system also have obligations they need to deliver for upcoming releases; if someone wants to make a contribution that deeply impacts their code and will require a fair amount of time to review and integrate then they may need to prioritize it accordingly. Not to mention needing to account for its impact on QA, documentation, and other parts of the release process. Anyway, android-contrib is the correct place for this kind of discussion. On Sun, Mar 13, 2011 at 4:40 PM, Mark Murphy mmur...@commonsware.comwrote: Note that you replied to me directly. I am redirecting this response to the list. On Sun, Mar 13, 2011 at 7:29 PM, John Davis jda...@pcprogramming.com wrote: How do I find out if someone else is already working on the same thing? Search the archives of [android-contrib] and [android-platform]. If you don't see anything, post to [android-contrib], saying you are interested in contributing XYZ related to WebGL, and you're wondering if anyone is working on this and if contributions in this area would be welcome. You might also want to cite the existing work in the area that you presumably uncovered via a Google search and how your contribution will relate to it, such as: http://blogs.sonyericsson.com/developerworld/2011/02/24/webgl-support-in-the-android-web-browser/ http://code.google.com/p/android/issues/detail?id=11012 I would also recommend that you be very precise about what you are planning to contribute. Just saying um, yeah, I wanna have WebGL, what can I do? probably won't get you terribly far. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android 3.0 Programming Books: http://commonsware.com/books -- 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 -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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
Re: [android-developers] Re: marketbilling project closed?
Hi Dalvinder, Thanks for the answer. I am interested in the market billing of Android and want to read the source code, and I want to know if there will be big changes before I use it. I am wandering if there will be changes due to the close of the project. James 2011/3/11 Dalvinder Singh singh.dal...@gmail.com What is your objective ? As far as I can understand following link might be of your interest. http://developer.android.com/guide/market/billing/index.html Thanks Dalvinder Singh http://developer.android.com/guide/market/billing/index.html On Fri, Mar 11, 2011 at 1:55 PM, Zhihong GUO gzhh...@gmail.com wrote: anyone can give me help? thank a lot 2011/3/10 Zhihong GUO gzhh...@gmail.com Hi all, why the download and source code is not available on page http://code.google.com/p/marketbilling/ . Is there any changes on the project? -- 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 -- 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: Log every action/event to an external file
I was thinking about that whole process some more, and in order to make it easier for users I thought I could immediately bring up the email chooser when the crash report is ready. But it looks like startActivity(Intent.createChooser(intent, Send crash report via:)); is not possible from within UncaughtExceptionHandler. Is there a way around that? Lutz On Mar 13, 1:48 pm, TreKing treking...@gmail.com wrote: On Sun, Mar 13, 2011 at 9:42 AM, Pedro Teixeira pedroteixeir...@gmail.comwrote: I found a really helpufll class that helps me easilly to Log into a a .log file on the SDCARD and all I have to do is to call it whenever I need it during my application. Er ... what did you find and where did you find it ? :-) - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- 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: RSSI values
Hi Perdo, As per I know these min and max values for RSSI is decided by the operator/Manufacturer generally. So it is not universal constant. And there is no API for these values. -- Rahul -- 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
Re: [android-developers] Re: Log every action/event to an external file
On Sun, Mar 13, 2011 at 9:28 PM, lbendlin l...@bendlin.us wrote: I was thinking about that whole process some more, and in order to make it easier for users I thought I could immediately bring up the email chooser when the crash report is ready. But it looks like startActivity(Intent.createChooser(intent, Send crash report via:)); is not possible from within UncaughtExceptionHandler. Is there a way around that? In the uncaught exception handler you can set a SharedPreference flag and check on main activity start. If it's set, the app crashed and you can do your thing. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- 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] NullPointerException onCreate for a small number of users
I have a relatively successful app in the android market that a very small amount of users experience force close on start up of the app. It is not happening on a specific device, im not sure if it's something these users have installed that is interfering with the app. I've tried to troubleshoot with a few users having the problem, but cannot get to the bottom of it. it happens on both rooted and non-rooted phones I keep getting a NullPointerException for a small number of users who use a variety of phones that normally work. anyone know what may be causing this, or how to get around this? I can't figure this one out and cannot replicate the problem, please help. below are the stack traces from the market (package name changed to not spam the board) java.lang.RuntimeException: Unable to start activity ComponentInfo{com.myco.myappfree/com.myco.myappfree.myapp}: java.lang.NullPointerException at android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 2663) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java: 2679) at android.app.ActivityThread.access$2300(ActivityThread.java:125) at android.app.ActivityThread$H.handleMessage(ActivityThread.java: 2033) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:123) at android.app.ActivityThread.main(ActivityThread.java:4627) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:521) at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:858) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.NullPointerException at com.myco.myappfree.myapp.onCreate(myapp.java:53) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java: 1047) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 2627) ... 11 more -- 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
Re: [android-developers] NullPointerException onCreate for a small number of users
Given this: Caused by: java.lang.NullPointerException at com.myco.myappfree.myapp.onCreate(myapp.java:53) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627) What is on line 53 of your app? On Sun, Mar 13, 2011 at 8:03 PM, acr acr...@gmail.com wrote: I have a relatively successful app in the android market that a very small amount of users experience force close on start up of the app. It is not happening on a specific device, im not sure if it's something these users have installed that is interfering with the app. I've tried to troubleshoot with a few users having the problem, but cannot get to the bottom of it. it happens on both rooted and non-rooted phones I keep getting a NullPointerException for a small number of users who use a variety of phones that normally work. anyone know what may be causing this, or how to get around this? I can't figure this one out and cannot replicate the problem, please help. below are the stack traces from the market (package name changed to not spam the board) java.lang.RuntimeException: Unable to start activity ComponentInfo{com.myco.myappfree/com.myco.myappfree.myapp}: java.lang.NullPointerException at android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 2663) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java: 2679) at android.app.ActivityThread.access$2300(ActivityThread.java:125) at android.app.ActivityThread$H.handleMessage(ActivityThread.java: 2033) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:123) at android.app.ActivityThread.main(ActivityThread.java:4627) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:521) at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:858) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.NullPointerException at com.myco.myappfree.myapp.onCreate(myapp.java:53) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java: 1047) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 2627) ... 11 more -- 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 -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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: NullPointerException onCreate for a small number of users
sorry for got to add this.. 53:howtoplayButton.setOnClickListener(this); this works on 99.9 percent of devices here's a larger snippet: @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); setVolumeControlStream(AudioManager.STREAM_MUSIC); //Get Screen Width Panel.screenWidth = getWindowManager().getDefaultDisplay().getWidth(); // Set up click listeners for all the buttons //View continueButton = findViewById(R.id.continue_button); //continueButton.setOnClickListener(this); View newButton = findViewById(R.id.new_button); newButton.setOnClickListener(this); View aboutButton = findViewById(R.id.about_button); aboutButton.setOnClickListener(this); View howtoplayButton = findViewById(R.id.howtoplay_button); howtoplayButton.setOnClickListener(this); View exitButton = findViewById(R.id.exit_button); exitButton.setOnClickListener(this); View buyButton = findViewById(R.id.buy_full); buyButton.setOnClickListener(this); newButton.startAnimation(AnimationUtils.loadAnimation(this, R.anim.shake)); .. On Mar 13, 11:30 pm, Dianne Hackborn hack...@android.com wrote: Given this: Caused by: java.lang.NullPointerException at com.myco.myappfree.myapp.onCreate(myapp.java:53) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627) What is on line 53 of your app? On Sun, Mar 13, 2011 at 8:03 PM, acr acr...@gmail.com wrote: I have a relatively successful app in the android market that a very small amount of users experience force close on start up of the app. It is not happening on a specific device, im not sure if it's something these users have installed that is interfering with the app. I've tried to troubleshoot with a few users having the problem, but cannot get to the bottom of it. it happens on both rooted and non-rooted phones I keep getting a NullPointerException for a small number of users who use a variety of phones that normally work. anyone know what may be causing this, or how to get around this? I can't figure this one out and cannot replicate the problem, please help. below are the stack traces from the market (package name changed to not spam the board) java.lang.RuntimeException: Unable to start activity ComponentInfo{com.myco.myappfree/com.myco.myappfree.myapp}: java.lang.NullPointerException at android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 2663) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java: 2679) at android.app.ActivityThread.access$2300(ActivityThread.java:125) at android.app.ActivityThread$H.handleMessage(ActivityThread.java: 2033) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:123) at android.app.ActivityThread.main(ActivityThread.java:4627) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:521) at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:858) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.NullPointerException at com.myco.myappfree.myapp.onCreate(myapp.java:53) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java: 1047) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 2627) ... 11 more -- 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 -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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: Background Service
Hi TreKing, I already have my own webview application that will load a custom webpage. I need to get user inputs from the data field in the webpage to do some computation and insert back the result into the webpage. I am thinking of writing a background service and couple it with this application. But I am not sure how to do the interaction with the webpage. Getting and inserting into the data field. Is this possible to be done through a background service? Regards, Perumal On Mar 14, 9:34 am, TreKing treking...@gmail.com wrote: On Sun, Mar 13, 2011 at 8:25 PM, perumal316 perumal...@gmail.com wrote: I want it to become active when my another application is started. Any idea how do I detect the activation of another application? You don't detect another application. You start your service from your Activity. Should I package the application and service together? A Service has to be packaged with *some* application - particularly the one that is going to be starting it. So yeah. ----- TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- 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: NullPointerException onCreate for a small number of users
Do you have howtoplay_button defined in your layout-port/main.xml and not in your layout-land/main.xml ? (Or in general if you have multiple main.xml files, for different screen sizes or whatever, and forgot to update one of them, this can happen) -Kevin On Mar 13, 11:40 pm, acr acr...@gmail.com wrote: sorry for got to add this.. 53: howtoplayButton.setOnClickListener(this); this works on 99.9 percent of devices here's a larger snippet: @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); setVolumeControlStream(AudioManager.STREAM_MUSIC); //Get Screen Width Panel.screenWidth = getWindowManager().getDefaultDisplay().getWidth(); // Set up click listeners for all the buttons //View continueButton = findViewById(R.id.continue_button); //continueButton.setOnClickListener(this); View newButton = findViewById(R.id.new_button); newButton.setOnClickListener(this); View aboutButton = findViewById(R.id.about_button); aboutButton.setOnClickListener(this); View howtoplayButton = findViewById(R.id.howtoplay_button); howtoplayButton.setOnClickListener(this); View exitButton = findViewById(R.id.exit_button); exitButton.setOnClickListener(this); View buyButton = findViewById(R.id.buy_full); buyButton.setOnClickListener(this); newButton.startAnimation(AnimationUtils.loadAnimation(this, R.anim.shake)); .. On Mar 13, 11:30 pm, Dianne Hackborn hack...@android.com wrote: Given this: Caused by: java.lang.NullPointerException at com.myco.myappfree.myapp.onCreate(myapp.java:53) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627) What is on line 53 of your app? On Sun, Mar 13, 2011 at 8:03 PM, acr acr...@gmail.com wrote: I have a relatively successful app in the android market that a very small amount of users experience force close on start up of the app. It is not happening on a specific device, im not sure if it's something these users have installed that is interfering with the app. I've tried to troubleshoot with a few users having the problem, but cannot get to the bottom of it. it happens on both rooted and non-rooted phones I keep getting a NullPointerException for a small number of users who use a variety of phones that normally work. anyone know what may be causing this, or how to get around this? I can't figure this one out and cannot replicate the problem, please help. below are the stack traces from the market (package name changed to not spam the board) java.lang.RuntimeException: Unable to start activity ComponentInfo{com.myco.myappfree/com.myco.myappfree.myapp}: java.lang.NullPointerException at android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 2663) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java: 2679) at android.app.ActivityThread.access$2300(ActivityThread.java:125) at android.app.ActivityThread$H.handleMessage(ActivityThread.java: 2033) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:123) at android.app.ActivityThread.main(ActivityThread.java:4627) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:521) at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:858) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.NullPointerException at com.myco.myappfree.myapp.onCreate(myapp.java:53) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java: 1047) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 2627) ... 11 more -- 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 -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because
[android-developers] Re: Using Eclipse write monkeyrunner
Some hints to use monkeyrunner from eclipse can be found at http://dtmilano.blogspot.com/2011/03/using-android-monkeyrunner-from-eclipse.html On Mar 11, 6:06 am, c j techandroid@gmail.com wrote: I need using monkeyrunner do some easy auto test but have some problem. Eclipse SDK 3.6.2 (Pydev 1.6.5 + Jython 2.5.2 + Python 2.7.1 + monkeyrunner.jar + google-collect-1.0-rc1.jar) jdk1.6.0_24 android-sdk-windows i try this example in second line have wrong http://developer.android.com/guide/developing/tools/MonkeyRunner.html # Imports the monkeyrunner modules used by this program from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice # Connects to the current device, returning a MonkeyDevice object device = MonkeyRunner.waitForConnection() error msg device = MonkeyRunner.waitForConnection() at com.android.monkeyrunner.MonkeyRunner.waitForConnection(MonkeyRunner.java: 74) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) java.lang.NullPointerException: java.lang.NullPointerException Please tell know where setting wrong. thanks! -- 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: Install % drop again?
Hi, Be interested if they do eventually provide an explanation whether the install % jumps back to before. Regards On Mar 12, 10:52 am, Zsolt Vasvari zvasv...@gmail.com wrote: I finally got a response from Google that they are looking into the problem, but no change in the install %. My sales are down 75% from the norm, though. On Mar 12, 2:15 am, Doug beafd...@gmail.com wrote: Today I noticed my active install %, which had gapped down lately, has gapped back up by 4% overnight. No change in ranking, though. If these trends have any validity at all, it must mean my users are an extremely fickle bunch! Doug -- 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: NullPointerException onCreate for a small number of users
Well its pretty clear from your stack trace and code that sometimes the howtoplayButton is null. If its working most of the time, are you sure you don't have multiple layouts of the same view? Double check that *all* versions of R.layout.main in your app contain the button. in fact, search for howtoplayButton in main.xml and see what you come up with... every one will need that button, or you need to handle cases when it doesn't. - Brill Pappin On Mar 13, 11:40 pm, acr acr...@gmail.com wrote: sorry for got to add this.. 53: howtoplayButton.setOnClickListener(this); this works on 99.9 percent of devices here's a larger snippet: @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); setVolumeControlStream(AudioManager.STREAM_MUSIC); //Get Screen Width Panel.screenWidth = getWindowManager().getDefaultDisplay().getWidth(); // Set up click listeners for all the buttons //View continueButton = findViewById(R.id.continue_button); //continueButton.setOnClickListener(this); View newButton = findViewById(R.id.new_button); newButton.setOnClickListener(this); View aboutButton = findViewById(R.id.about_button); aboutButton.setOnClickListener(this); View howtoplayButton = findViewById(R.id.howtoplay_button); howtoplayButton.setOnClickListener(this); View exitButton = findViewById(R.id.exit_button); exitButton.setOnClickListener(this); View buyButton = findViewById(R.id.buy_full); buyButton.setOnClickListener(this); newButton.startAnimation(AnimationUtils.loadAnimation(this, R.anim.shake)); .. On Mar 13, 11:30 pm, Dianne Hackborn hack...@android.com wrote: Given this: Caused by: java.lang.NullPointerException at com.myco.myappfree.myapp.onCreate(myapp.java:53) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627) What is on line 53 of your app? On Sun, Mar 13, 2011 at 8:03 PM, acr acr...@gmail.com wrote: I have a relatively successful app in the android market that a very small amount of users experience force close on start up of the app. It is not happening on a specific device, im not sure if it's something these users have installed that is interfering with the app. I've tried to troubleshoot with a few users having the problem, but cannot get to the bottom of it. it happens on both rooted and non-rooted phones I keep getting a NullPointerException for a small number of users who use a variety of phones that normally work. anyone know what may be causing this, or how to get around this? I can't figure this one out and cannot replicate the problem, please help. below are the stack traces from the market (package name changed to not spam the board) java.lang.RuntimeException: Unable to start activity ComponentInfo{com.myco.myappfree/com.myco.myappfree.myapp}: java.lang.NullPointerException at android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 2663) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java: 2679) at android.app.ActivityThread.access$2300(ActivityThread.java:125) at android.app.ActivityThread$H.handleMessage(ActivityThread.java: 2033) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:123) at android.app.ActivityThread.main(ActivityThread.java:4627) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:521) at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:858) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.NullPointerException at com.myco.myappfree.myapp.onCreate(myapp.java:53) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java: 1047) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 2627) ... 11 more -- 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 -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide
Re: [android-developers] Reasoning behind disabling certain ProGuard optimizations?
When using Proguard I was getting a VerifyError on SDK 3 when trying to access the Version.SDK_INT field. With proguard disabled, everything worked fine because I was using the standard approach of using a wrapper class to prevent VerifyErrors: public static int getSdkInt() { int sdkInt = getSdkIntSafely(); if (sdkInt 4) { return sdkInt; } else { return VersionSdkIntWrapperForDonut.getValue(); } } private static int getSdkIntSafely() { try { return Integer.parseInt(VERSION.SDK); } catch (Throwable t) { return -1; } } private static class VersionSdkIntWrapperForDonut { private static int getValue() { return VERSION.SDK_INT; } } However, it appears that (using the default Android Proguard config), the wrapper class was being optimized in such a way that this technique no longer worked. My current workaround is to specify -dontoptimize which works fine. Is there a more specific flag to use? -- 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