Re: [android-developers] Re: how to tell why Activity.onPause() is called
Do notice that in this instance onStop would NOT be called in Main activity, thus you can use onStop to stop the music instead of basing on the Pref activity On Wednesday, March 6, 2013 2:38:26 AM UTC+2, latimerius wrote: On Tue, Mar 5, 2013 at 11:19 PM, Kostya Vasilyev kman...@gmail.comjavascript: wrote: How about a PreferenceActivity with theme=@style/Theme.Dialog? I've tried that but it doesn't change the substance of the problem - the activity now *looks* like a dialog (not full-screen, dimmed background) but it's still an Activity, it still causes onPause()/onResume() on the main Activity. I also wonder what you do for when the screen is blanked -- which triggers onPause / onStop depending on Android version. I do a full release/clean-up of everything. I only do the light version if I know onPause() is due to my own prefs activity. -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Re: how to tell why Activity.onPause() is called
Forget about the whole preference stuff... just do it all manually, you'll have more control of the UI this way anyhow. Use write your own UI that just handles SharedPreferences on its own. On Tuesday, March 5, 2013 11:29:55 PM UTC+2, latimerius wrote: On Tue, Mar 5, 2013 at 6:25 PM, Latimerius l4t1m...@gmail.comjavascript: wrote: On Tue, Mar 5, 2013 at 5:41 PM, Piren gpi...@gmail.com javascript:wrote: - Dont use a different Activity to show Prefs (you can re-use your current one, i personally always disliked the PreferencesActivity class.. its ugly as fuck) you can either just replace your current contentView or use other containers like ViewSwitcher/ViewPager and etc to switch between the main app and the preferences view. Thanks for pointing this out, it never occurred to me that I could reuse my main activity instance... clever. :-) Now trying to figure out how to construct the preferences view. I'm also using PreferenceActivity.onSharedPreferenceChanged() so I'll have to have a replacement for that too. Alas, it doesn't seem to be easy to inflate a preferences XML into a View hierarchy (this link http://stackoverflow.com/questions/4642858/how-to-display-preferences-in-a-view even suggests it's not possible at all!), let alone get the whole preferences machinery working outside of PreferenceActivity. Have you actually done it, or are you just assuming it should be doable? -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Tapping the overflow button make the action mode finish.
Dear All: I have added some menu items to action mode of EditText, and two menu items gone to overflow. But when I tapped the overflow button, the action mode disappeared at once. Why? Thanks! Hilda -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Re: how to tell why Activity.onPause() is called
On Wed, Mar 6, 2013 at 7:48 AM, a1 arco...@gmail.com wrote: My minSdk is 7. Preserving GL context is a hint. You call it and pray it works. See the official docs at http://developer.android.** com/reference/android/opengl/**GLSurfaceView.html#** setPreserveEGLContextOnPause(**boolean)http://developer.android.com/reference/android/opengl/GLSurfaceView.html#setPreserveEGLContextOnPause(boolean) It's just works - EGL is only allowed to dispose context on power management events, OS may terminate application process if user navigate away but that's it. Anyway if you really want to play nice you can simply reaload everything when you catch EGL_CONTEXT_LOST. Please read the documentation I linked to - it's just a couple of lines, and clear and well-written too. For your reading comfort, here's the key sentence: Whether the EGL context is actually preserved or not depends upon whether the Android device that the program is running on can support an arbitrary number of EGL contexts or not. You'll also understand from this that the problem is a hardware/driver limitation (the same as known from other platforms) so no amount of hacking at the GLSurfaceView level will fix it. You're right that in EGL spec, the only reason for EGL_CONTEXT_LOST is a power management event but that's just wishful thinking unfortunately. (BTW the whole EGL implementation on Android conforms to the spec only very roughly at best.) I mean if it works for you use it by all means - I'm just saying you cannot *rely* on it working, and personally I'm not comfortable to go down that way (especially since when it does *not* work on an end user machine you'll unlikely to get clear reproducible symptoms - no crash stack etc., just doesn't work type of reports). if you are targeting older version simply back-port (or use one of existing back-ports eg. the one from Replica Island). That's a solution with its own set of problems. Check some of the comments in the RI version. In fact, I highly doubt it would work well across the spectrum of today's Android hardware. Why, current GLSurfaceView implementation is based on the one from RI. Actually, it's the other way around: http://replicaisland.blogspot.cz/2009/10/rendering-with-two-threads.html GLSurfaceView is just helper class, there is nothing HW specific (see: https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/opengl/java/android/opengl/GLSurfaceView.java ) Well the RI version does have HW-specific hacks, check its source. But the point is moot anyway, see above. While it's true that the older versions of the shipping GLSurfaceView were too eager to drop contexts, even if you fix that you apparently still cannot guarantee when context can or cannot be lost. Which is due to lower-level software or hardware, things out of our control. I agree it looks like it should be easy to make a Preference*Dialog* instead of PreferenceActivity. And yet, apparently it's not. Not _PreferenceDialog_, simply create layout that look's like PreferenceActivity, do not try to host actual preferences infrastructure inside dialog since it's not designed to be used that way. Ah yes, OK, I get it now, you're right. Still, it's a shame the pre-canned Preferences UI is not flexible enough - constructing it manually will take me quite some time I'm afraid as I'm not well-versed in those parts of Android API. -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Re: how to tell why Activity.onPause() is called
On Wed, Mar 6, 2013 at 8:16 AM, dnk dnkou...@gmail.com wrote: Use http://developer.android.com/reference/android/app/Activity.html#onUserLeaveHint() Gets called only when the user has decided to leave instead of another app coming in the foreground. Thanks, I had no idea this exists. Looked promising at first, however on second thought this won't help me probably as the tasks I need to perform (stop threads, music, save data, ...) must be done whether leaving the app is a user's decision or not. -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Re: how to tell why Activity.onPause() is called
On Wed, Mar 6, 2013 at 9:05 AM, Piren gpi...@gmail.com wrote: Forget about the whole preference stuff... just do it all manually, you'll have more control of the UI this way anyhow. Use write your own UI that just handles SharedPreferences on its own. OK, that makes sense then. Well I'm not sure how long this would take me to write and debug, but apparently my only options are either this, or employ an(other) ad-hoc hack to get out of this particular situation. -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Re: how to tell why Activity.onPause() is called
On Wed, Mar 6, 2013 at 9:04 AM, Piren gpi...@gmail.com wrote: Do notice that in this instance onStop would NOT be called in Main activity, thus you can use onStop to stop the music instead of basing on the Pref activity That's a good point, I'll consider it. -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Re: how to tell why Activity.onPause() is called
W dniu środa, 6 marca 2013 10:24:29 UTC+1 użytkownik latimerius napisał: On Wed, Mar 6, 2013 at 7:48 AM, a1 arc...@gmail.com javascript: wrote: My minSdk is 7. Preserving GL context is a hint. You call it and pray it works. See the official docs at http://developer.android.** com/reference/android/opengl/**GLSurfaceView.html#** setPreserveEGLContextOnPause(**boolean)http://developer.android.com/reference/android/opengl/GLSurfaceView.html#setPreserveEGLContextOnPause(boolean) It's just works - EGL is only allowed to dispose context on power management events, OS may terminate application process if user navigate away but that's it. Anyway if you really want to play nice you can simply reaload everything when you catch EGL_CONTEXT_LOST. Please read the documentation I linked to - it's just a couple of lines, and clear and well-written too. For your reading comfort, here's the key sentence: Whether the EGL context is actually preserved or not depends upon whether the Android device that the program is running on can support an arbitrary number of EGL contexts or not. But did you bother to read actual sources? This policy is enforced by hack in GLSurfaceView itself (there is a static ThreadManager that keep track of all rendering thread and if device properties file has limited GL context property set preserve on pause will be ignored, if you use your own implementation you will always preserve context on pause and all devices with GL ES 2.0 ( 90% of all android devices) are required to support multiple context. You're right that in EGL spec, the only reason for EGL_CONTEXT_LOST is a power management event but that's just wishful thinking unfortunately. (BTW the whole EGL implementation on Android conforms to the spec only very roughly at best.) I mean if it works for you use it by all means - I'm just saying you cannot *rely* on it working, and personally I'm not comfortable to go down that way (especially since when it does *not* work on an end user machine you'll unlikely to get clear reproducible symptoms - no crash stack etc., just doesn't work type of reports). It's not wishful thinking, this behavior is define by EGL specification, this is also how android works, anyway that was just an advice, so you are welcome to do whatever you wish. if you are targeting older version simply back-port (or use one of existing back-ports eg. the one from Replica Island). That's a solution with its own set of problems. Check some of the comments in the RI version. In fact, I highly doubt it would work well across the spectrum of today's Android hardware. Why, current GLSurfaceView implementation is based on the one from RI. Actually, it's the other way around: http://replicaisland.blogspot.cz/2009/10/rendering-with-two-threads.html Yeah, but maybe you should check dates: Replica Island - 2009 ICS - 2011 GLSurfaceView is just helper class, there is nothing HW specific (see: https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/opengl/java/android/opengl/GLSurfaceView.java ) Well the RI version does have HW-specific hacks, check its source. Workarounds - of course, when you are writing GL dependent code there will be workarounds, because opengl implementation has bugs (like ardeno 3xx shader compiler with buffer overruns, or mali-400 crashing when glDrawArray was called with VBO bound, or infamous deadlock in ardeno-200). But the point is moot anyway, see above. While it's true that the older versions of the shipping GLSurfaceView were too eager to drop contexts, even if you fix that you apparently still cannot guarantee when context can or cannot be lost. Which is due to lower-level software or hardware, things out of our control. I can guarantee that on GL ES 2.0 capable GPUs context will never be lost. -- Bart -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: [VideoEditor] android.view.InflateException: Binary XML file line #21: Error inflating class unknown
I am also getting same error try to find the way to optimize your memory foot prints in the application. On Wednesday, November 7, 2012 7:39:56 AM UTC+5:30, MYS wrote: Dear all: I meet the exception in my Android 4.1.1 device. Anybody can help for this? P.S if we don't change any codes in AP , how can we analyze for this? DPI or resolution ? My device is DPI:240 . Thanks. 01-05 00:00:08.887 E/AndroidRuntime( 5281): FATAL EXCEPTION: main 01-05 00:00:08.887 E/AndroidRuntime( 5281): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.google.android.videoeditor/com.android.videoeditor.ProjectsActivity}: android.view.InflateException: Binary XML file line #21: Error inflating class unknown 01-05 00:00:08.887 E/AndroidRuntime( 5281): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2064) 01-05 00:00:08.887 E/AndroidRuntime( 5281): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2089) 01-05 00:00:08.887 E/AndroidRuntime( 5281): at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:3523) 01-05 00:00:08.887 E/AndroidRuntime( 5281): at android.app.ActivityThread.access$700(ActivityThread.java:135) 01-05 00:00:08.887 E/AndroidRuntime( 5281): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1206) 01-05 00:00:08.887 E/AndroidRuntime( 5281): at android.os.Handler.dispatchMessage(Handler.java:99) 01-05 00:00:08.887 E/AndroidRuntime( 5281): at android.os.Looper.loop(Looper.java:137) 01-05 00:00:08.887 E/AndroidRuntime( 5281): at android.app.ActivityThread.main(ActivityThread.java:4791) 01-05 00:00:08.887 E/AndroidRuntime( 5281): at java.lang.reflect.Method.invokeNative(Native Method) 01-05 00:00:08.887 E/AndroidRuntime( 5281): at java.lang.reflect.Method.invoke(Method.java:511) 01-05 00:00:08.887 E/AndroidRuntime( 5281): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:797) 01-05 00:00:08.887 E/AndroidRuntime( 5281): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:564) 01-05 00:00:08.887 E/AndroidRuntime( 5281): at dalvik.system.NativeStart.main(Native Method) 01-05 00:00:08.887 E/AndroidRuntime( 5281): Caused by: android.view.InflateException: Binary XML file line #21: Error inflating class unknown 01-05 00:00:08.887 E/AndroidRuntime( 5281): at android.view.LayoutInflater.createView(LayoutInflater.java:613) 01-05 00:00:08.887 E/AndroidRuntime( 5281): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56) 01-05 00:00:08.887 E/AndroidRuntime( 5281): at android.view.LayoutInflater.onCreateView(LayoutInflater.java:660) 01-05 00:00:08.887 E/AndroidRuntime( 5281): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:685) 01-05 00:00:08.887 E/AndroidRuntime( 5281): at android.view.LayoutInflater.rInflate(LayoutInflater.java:746) 01-05 00:00:08.887 E/AndroidRuntime( 5281): at android.view.LayoutInflater.inflate(LayoutInflater.java:489) 01-05 00:00:08.887 E/AndroidRuntime( 5281): at android.view.LayoutInflater.inflate(LayoutInflater.java:396) 01-05 00:00:08.887 E/AndroidRuntime( 5281): at android.view.LayoutInflater.inflate(LayoutInflater.java:352) 01-05 00:00:08.887 E/AndroidRuntime( 5281): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:256) 01-05 00:00:08.887 E/AndroidRuntime( 5281): at android.app.Activity.setContentView(Activity.java:1867) 01-05 00:00:08.887 E/AndroidRuntime( 5281): at com.android.videoeditor.ProjectsActivity.onCreate(ProjectsActivity.java:92) 01-05 00:00:08.887 E/AndroidRuntime( 5281): at android.app.Activity.performCreate(Activity.java:5008) 01-05 00:00:08.887 E/AndroidRuntime( 5281): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079) 01-05 00:00:08.887 E/AndroidRuntime( 5281): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2028) 01-05 00:00:08.887 E/AndroidRuntime( 5281): ... 12 more 01-05 00:00:08.887 E/AndroidRuntime( 5281): Caused by: java.lang.reflect.InvocationTargetException 01-05 00:00:08.887 E/AndroidRuntime( 5281): at java.lang.reflect.Constructor.constructNative(Native Method) 01-05 00:00:08.887 E/AndroidRuntime( 5281): at java.lang.reflect.Constructor.newInstance(Constructor.java:417) 01-05 00:00:08.887 E/AndroidRuntime( 5281): at android.view.LayoutInflater.createView(LayoutInflater.java:587) 01-05 00:00:08.887 E/AndroidRuntime( 5281): ... 25 more 01-05 00:00:08.887 E/AndroidRuntime( 5281): Caused by: java.lang.UnsupportedOperationException: Can't convert to dimension: type=0x1 01-05 00:00:08.887 E/AndroidRuntime( 5281): at android.content.res.TypedArray.getDimensionPixelOffset(TypedArray.java:430) 01-05 00:00:08.887 E/AndroidRuntime( 5281): at android.widget.GridView.init(GridView.java:132) 01-05 00:00:08.887 E/AndroidRuntime( 5281): at
[android-developers] Emulator
Hello Everyone, I'm not sure if this is possible but I thought about it in a dream last night I know that at this point that I am not capable, but I thought with all you smart people out there and all the energy I see around Android, somebody might be able to design an app just for developers. I call it the Termulator (Emulator Terminator)! OK maybe it came to me in a nightmare not a dream. Probably due to weeks of testing my app with the Emulator on an under-powered PC. OK here it is: Would it be possible to design an app that runs on say a Nexus7 (or the largest device you are targeting) that allows testing of all the screen sizes/densities/orientations/version levels/resolutions/long/notlong/ etc.? I can only imagine that if the Emulator can do this on a PC then it ought to be possible on a native device such as a tablet. Imagine, testing all those configurations without the Emulator! Hey, I think the Emulator is a marvel in itself and I blame my PC performance for many of my woes. But after I got my Nexus7 and USB'd it to the SDK I started to really get frustrated with the performance of the old Emulator. Unfortunately, my largest audience is on the smaller devices and I certainly can't afford to keep all of those different sized devices on hand. Imagine testing with a real device; I'm dreaming quad-core 1.2 GHz CPU, GPU, all the sensors, multi-touch screen, a gig of RAM, WiFi, Bluetooth... well you get the idea... developers paradise! Please tell me this is possible! Even better please let me know when I can purchase it! Thanks for indulging... Ron -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: New SDK release for Egnos
Hello, me again! :) Today I wanted to remind you that the EGNOS SDK is particularly suitable to create applications where the reliability of the position is essential. The special prize of Galileo Masters 2012 for the most promising EGNOS application idea has been awarded to 3Sound. The system is a personal navigation system for visually impaired people, based on the integration of 3D sounds and GNSS to guide people along a predefined track. The system provides an acoustic track perception based on the integration of augmented acoustic reality app developed for smartphone and an accurate and reliable navigation solution based on GPS and EGNOS, thanks to the EGNOS SDK. You can find out more about the app and the Galileo Masters here: http://www.galileo-masters.eu/index.php?anzeige=gsa12.html while you can download the EGNOS SDK to build your own apps at the following address: http://egnos-portal.gsa.europa.eu/developer-platform/egnos-toolkits/egnos-sdk/download-egnos-sdk Any question please contact me or reply to this thread. Cheers, Leonardo On Tuesday, 31 July 2012 23:20:39 UTC+2, Leonardo Costa wrote: Hello, I'm posting this info on behalf of the European Commission, the new release of the EGNOS SDK for app developers is now available. This EGNOS SDK allows taking advantage of the European system that provides enhanced positioning accuracy and other features (e.g. information on the reliability of the position itself) directly towards the smartphones. It is available for free on the EGNOS Portal at http://egnos-portal.gsa.europa.eu/developer-platform/egnos-toolkits/egnos-sdk I am available for any further info, request, questions, you may have on this topic and will post reply here. I will also post further details in the next weeks, following up directly at this thread. Thanks and regards, Leonardo -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: Uninstall free version app after installing paid version
Any suggestion -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Reading Wi-Fi Tags using Android Device
Dear all, If aeroscout Wi-Fi tag is configured in beaconing mode, it will sends beacons. I need to know whether we can get RSSI value from these beacons by using Wi-Fi API on android phone same as RSSI value of Wi-Fi access points. I have Samsung SII mobile phone. -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Tapping the overflow button make the action mode finish.
Action modes and the overflow menu do not work together, last I tried. I have filed an issue on it: https://code.google.com/p/android/issues/detail?id=23381 On Wed, Mar 6, 2013 at 3:13 AM, Hilda Chen hilda.chen0...@gmail.com wrote: Dear All: I have added some menu items to action mode of EditText, and two menu items gone to overflow. But when I tapped the overflow button, the action mode disappeared at once. Why? Thanks! Hilda -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 4.6 Available! -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] SSL connection Android/Server using Apache Mina
Hello, I have problems on establishing SSL connection between server and android using Apache Mina (both on server and client); First of all I generated self signed keys. Bouncy Castle for Android and JKS for server: SERVER: keytool -genkey -dname cn=sslkey, o=test, c=RU -alias serverkey -keyalg RSA -keypass pass -storepass pass -keystore serverkey.jks -validity 1000 keytool -export -alias serverkey -storepass pass -file server.cer -keystore serverkey.jks keytool -import -alias serverkey -file server.cer -keypass pass -keystore trustclient.bks -storetype BKS -storepass pass -providerClass org.bouncycastle.jce.provider.BouncyCastleProvider -providerpath bcprov-jdk15on-148.jar CLIENT: keytool -genkey -dname cn=sslkey, o=test, c=RU -alias clientkey -keyalg RSA -keypass pass -storepass pass -keystore clientkey.jks -validity 1000 keytool -export -alias clientkey -storepass pass -file client.cer -keystore clientkey.jks keytool -import -alias clientkey -file client.cer -keypass pass -keystore clientkey.bks -storetype BKS -storepass pass -providerClass org.bouncycastle.jce.provider.BouncyCastleProvider -providerpath /Users/tabtrader/Workspace/tools/bcprov-jdk15on-148.jar keytool -import -v -trustcacerts -alias clientkey -file client.cer -keystore trustserver.jks -keypass pass -storepass pass Then modified SSLContext: SERVER: KeyStore keyStore = KeyStore.getInstance(JKS); InputStream in = null; try { in = FileUtil.open(SSLContextFactory.class, res/serverkey.jks); keyStore.load(in, keyStorePassword); } KeyManagerFactory kmf = KeyManagerFactory.getInstance(SunX509); kmf.init(keyStore, pass.toCharArray()); KeyStore trustStore = KeyStore.getInstance(JKS); InputStream in = null; try { in = FileUtil.open(SSLContextFactory.class, res/trustserver.jks); trustStore.load(in, keyStorePassword); } TrustManagerFactory tmf = TrustManagerFactory.getInstance(SunX509); tmf.init(trustStore); SSLContext sslContext = SSLContext.getInstance(PROTOCOL); sslContext.init(kmf.getKeyManagers(), null, new SecureRandom()); SSLFilter sslFilter = new SSLFilter(sslContext); sslFilter.setUseClientMode(false); sslFilter.setNeedClientAuth(false); CLIENT: KeyStore keyStore = KeyStore.getInstance(BKS); InputStream in = null; try { in = getResources().openRawResource(R.raw.clientkey); // clientkey.bks keyStore.load(in, keyStorePassword); } KeyManagerFactory kmf = KeyManagerFactory.getInstance(X509); kmf.init(keyStore, pass.toCharArray()); KeyStore trustStore = KeyStore.getInstance(BKS); in = null; try { in = getResources().openRawResource(R.raw.trustclient); // trustclient.bks trustStore.load(in, keyStorePassword); } TrustManagerFactory tmf = TrustManagerFactory.getInstance(X509); tmf.init(trustStore); SSLContext sslContext = SSLContext.getInstance(PROTOCOL); sslContext.init(kmf.getKeyManagers(), null, new SecureRandom()); SSLFilter sslFilter = new SSLFilter(sslContext); sslFilter.setUseClientMode(true); sslFilter.setNeedClientAuth(false); Using this code SLL Handshake finished without errors: DEBUG mina.acceptor.AcceptorIoHandler *handshakeStatus=FINISHED* DEBUG mina.acceptor.AcceptorIoHandler sslSession CipherSuite used * SSL_RSA_WITH_RC4_128_MD5* And get established Mina Session. But then nothing happened. Next messages from client are ignored without any logs. It is very strange. If set sslFilter.setNeedClientAuth(true) for server I got exception: SSLHandshakeException: null cert chain Haw can I create this SSL connection? Where is the problem? I found the same issue on stackoverflow, but there are no answers and I cant write to question's author: http://stackoverflow.com/questions/12527884/using-apache-mina-with-sslfilter-on-android/15222099 -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: Uninstall free version app after installing paid version
Don't go that route it has been discussed here many times - search is your friend. 1. There is no way to automatically remove a users application. 2. It is hard to get access from the paid app to any data you want to access from the free version (data migration). Instead use Google Play In-app Billing to unlock the paid content. http://developer.android.com/google/play/billing/index.html On Wednesday, March 6, 2013 11:33:45 AM UTC, Bajrang Asthana wrote: Any suggestion -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Uninstall free version app after installing paid version
On Wed, Mar 6, 2013 at 12:42 AM, Bajrang Asthana asthana.bajr...@gmail.comwrote: I am interested to know what could be the best way to remove free version app(if user has installed it) as soon as user install the paid version. Check the PackageManager class. It has methods for querying if an app exists and probably starting an uninstall (with user confirmation). - 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 --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] sample code req.
Hi frnds..., send me some sample source code android app for beginners... -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] sample code req.
http://ramsandroid4all.blogspot.in/ On Wed, Mar 6, 2013 at 10:06 PM, ramesh babu rameshbabu...@gmail.comwrote: Hi frnds..., send me some sample source code android app for beginners... -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Regards Rambabu Mareedu 9581411199 -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Emulator
The problem isn't that there are fundamental problems with this approach. The problem is all those flakey hardware vendors you've never even heard of. Essentially you want to test all of the bugs in other vendor ROMs, otherwise testing on the emulator with tons of configurations *does* work. It's easy enough to do, but the problem is that you physically don't have images for all of those other devices. (And since they're typically controlled and updated per vendor, it's a moving target to collect them all!) Kris On Wed, Mar 6, 2013 at 6:02 AM, Ronoli javat...@gmail.com wrote: Hello Everyone, I'm not sure if this is possible but I thought about it in a dream last night I know that at this point that I am not capable, but I thought with all you smart people out there and all the energy I see around Android, somebody might be able to design an app just for developers. I call it the Termulator (Emulator Terminator)! OK maybe it came to me in a nightmare not a dream. Probably due to weeks of testing my app with the Emulator on an under-powered PC. OK here it is: Would it be possible to design an app that runs on say a Nexus7 (or the largest device you are targeting) that allows testing of all the screen sizes/densities/orientations/version levels/resolutions/long/notlong/ etc.? I can only imagine that if the Emulator can do this on a PC then it ought to be possible on a native device such as a tablet. Imagine, testing all those configurations without the Emulator! Hey, I think the Emulator is a marvel in itself and I blame my PC performance for many of my woes. But after I got my Nexus7 and USB'd it to the SDK I started to really get frustrated with the performance of the old Emulator. Unfortunately, my largest audience is on the smaller devices and I certainly can't afford to keep all of those different sized devices on hand. Imagine testing with a real device; I'm dreaming quad-core 1.2 GHz CPU, GPU, all the sensors, multi-touch screen, a gig of RAM, WiFi, Bluetooth... well you get the idea... developers paradise! Please tell me this is possible! Even better please let me know when I can purchase it! Thanks for indulging... Ron -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] sample code req.
thank u bro.. -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] sample code req.
http://marakana.com/s/post/1017/android_bootcamp_series_2012_video_tutorial From: ramesh babu rameshbabu...@gmail.com To: android-developers@googlegroups.com Sent: Wednesday, March 6, 2013 11:36 AM Subject: [android-developers] sample code req. Hi frnds..., send me some sample source code android app for beginners... -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Android In-app billing v3 is not returning the correct localized price (getSkuDetails)
I am trying to test the getSkuDetails method in Android In-app billing v3 API with different local prices. I have used the sample application provided by Google (TrivialDrive), and modified it to display the price returned by Google in response to getSkuDetails: SkuDetails gasDetails = inventory.getSkuDetails(SKU_GAS); if (gasDetails != null){ alert(Gas Price is + gasDetails.getPrice()); } I have installed the app with an an account that has Google Wallet location set for Mexico. When the app runs, the alert incorrectly shows a Gas Price of $1.00, but when I try to purchase more Gas, it shows the correct price of MX$12.72 for purchase. Why isn't getSkuDetails returning the correct localized price of MX$12.72 instead of $1.00? Happy to provide more code snippets, but the above is all I have added to the sample app provided by Google. -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: Emulator
I was picturing an app that would scale the screen pixels to match all those standard emulator options i.e. QVGA, HVGA, WQVGA, WVGA etc. I'm thinking like skins or something. Not really trying to catch that moving target per se. More trying to utilize the performance of the native device with out emulation. I might be way off, but if Google can make your non- native PC emulate all those configurations??? I've got 15 AVD's set up right now and I know I'm not alone when I say it's excruciating. Testing with all the sensors sounds good to me too! I'm sure I over simplify because if I understood what it would take, I would be all over it! Needless to say back to the dungeon of pain! Thanks for replying! Ron On Wednesday, March 6, 2013 6:02:28 AM UTC-5, Ronoli wrote: Hello Everyone, I'm not sure if this is possible but I thought about it in a dream last night I know that at this point that I am not capable, but I thought with all you smart people out there and all the energy I see around Android, somebody might be able to design an app just for developers. I call it the Termulator (Emulator Terminator)! OK maybe it came to me in a nightmare not a dream. Probably due to weeks of testing my app with the Emulator on an under-powered PC. OK here it is: Would it be possible to design an app that runs on say a Nexus7 (or the largest device you are targeting) that allows testing of all the screen sizes/densities/orientations/version levels/resolutions/long/notlong/ etc.? I can only imagine that if the Emulator can do this on a PC then it ought to be possible on a native device such as a tablet. Imagine, testing all those configurations without the Emulator! Hey, I think the Emulator is a marvel in itself and I blame my PC performance for many of my woes. But after I got my Nexus7 and USB'd it to the SDK I started to really get frustrated with the performance of the old Emulator. Unfortunately, my largest audience is on the smaller devices and I certainly can't afford to keep all of those different sized devices on hand. Imagine testing with a real device; I'm dreaming quad-core 1.2 GHz CPU, GPU, all the sensors, multi-touch screen, a gig of RAM, WiFi, Bluetooth... well you get the idea... developers paradise! Please tell me this is possible! Even better please let me know when I can purchase it! Thanks for indulging... Ron -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: Emulator
Ronoli wrote: I was picturing an app that would scale the screen pixels to match all those standard emulator options i.e. QVGA, HVGA, WQVGA, WVGA etc. I'm thinking like skins or something. Not really trying to catch that moving target per se. More trying to utilize the performance of the native device with out [sic] emulation. I might be way off, but if Google can make your non- native [sic] PC emulate all those configurations??? I've got 15 AVD's [sic] set up right now and I know I'm not alone when I say it's excruciating. Testing It need not be excruciating. Scripts, or tools like Hudson/Jenkins or TestNG, can automate the excruciating parts. with all the sensors sounds good to me too! I'm sure I over simplify because if I understood what it would take, I would be all over it! Needless to say back to the dungeon of pain! Thanks for replying! Address the pain. -- Lew -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Make a one app appliance (prevent quitting app)
I am going to hand out Android phones with an app on it that is geared to a large event. I'd like to launch the app, and cause the user to be unable to quit it. I don't want them messing around with other software on the phone. We did this on our Blackberry app by making the program bring itself to the foreground every two seconds. It was cheesy, but worked. If the user quit the app, it would come right back up. Any ideas as to how to get an Android program to always be the focused program? Thanks! Tobiah -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Make a one app appliance (prevent quitting app)
You are welcome to make it be the home screen. There's the Home sample in the SDK that demonstrates the intent-filter you need on your activity: intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.HOME/ category android:name=android.intent.category.DEFAULT / /intent-filter Then, BACK and HOME lead to your app. However: - The user may be able to get to other things, depending on the device, by means such as the notification drawer - The user can simply reboot your phone in safe mode to nuke your app On Wed, Mar 6, 2013 at 6:36 PM, Tobiah t...@tobiah.org wrote: I am going to hand out Android phones with an app on it that is geared to a large event. I'd like to launch the app, and cause the user to be unable to quit it. I don't want them messing around with other software on the phone. We did this on our Blackberry app by making the program bring itself to the foreground every two seconds. It was cheesy, but worked. If the user quit the app, it would come right back up. Any ideas as to how to get an Android program to always be the focused program? Thanks! Tobiah -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 4.6 Available! -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] setAutoExposureLock method is not found in ICS
hi list I am working on a camera program where I want to call setAutoExposureLock() is supported. To make this backward compatible, I used some sample code I found online to check the presence of this method first. The code snippet is below: ... try{ Class c = Class.forName(android.hardware.Camera); Method spcwb = null; Method[] m = c.getMethods(); for (int i = 0; i m.length; i++) { if (m[i].getName().compareTo(setAutoExposureLock) == 0) { spcwb = m[i]; break; } } if (spcwb != null) { Object[] arglist = new Object[1]; arglist[0] = tf; spcwb.invoke(cm, arglist); Log.i(TAG, setAutoExposureLock: Called method); } else { Log.i(TAG, setAutoExposureLock: Did not find method); } }catch(...){...} however, I tried this on both Nexus S (ICS 4.1) and Nexus 4 (ICS 4.2), the above code returned not found. Shouldn't setAutoExposureLock be supported by 4.0.3 and newer? I directly called this method for my Nexus 4, it worked. But I'd like to make this work for older phones. I changed the class name to android.hardware.Camera.Parameters, it did not help. did I miss anything? Qianqian -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] setAutoExposureLock method is not found in ICS
Why not set your build target to API Level 14 and just call the method, wrapping your calls in a Build.VERSION.SDK_INT check? Why are you messing around with reflection games? On Wed, Mar 6, 2013 at 7:21 PM, Qianqian Fang fan...@gmail.com wrote: hi list I am working on a camera program where I want to call setAutoExposureLock() is supported. To make this backward compatible, I used some sample code I found online to check the presence of this method first. The code snippet is below: ... try{ Class c = Class.forName(android.hardware.Camera); Method spcwb = null; Method[] m = c.getMethods(); for (int i = 0; i m.length; i++) { if (m[i].getName().compareTo(setAutoExposureLock) == 0) { spcwb = m[i]; break; } } if (spcwb != null) { Object[] arglist = new Object[1]; arglist[0] = tf; spcwb.invoke(cm, arglist); Log.i(TAG, setAutoExposureLock: Called method); } else { Log.i(TAG, setAutoExposureLock: Did not find method); } }catch(...){...} however, I tried this on both Nexus S (ICS 4.1) and Nexus 4 (ICS 4.2), the above code returned not found. Shouldn't setAutoExposureLock be supported by 4.0.3 and newer? I directly called this method for my Nexus 4, it worked. But I'd like to make this work for older phones. I changed the class name to android.hardware.Camera.Parameters, it did not help. did I miss anything? Qianqian -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 4.6 Available! -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Enumerate sd cards
I am trying to develop an app which has a feature like FTP. So, at the beginning, I want to enumerate all sd card storages on the device, and ask user to pick where they want to store the data. Then if external sd card is removed, I want to change to internal storage if it set to external sd card. If external sd card is put back in, I want to prompt user to see if they want to change back to the external sd card. So, I want to know, first, how to enumerate all storage locations, second, monitor sdcard insert/eject events. Suggestions and, even better, sample codes? 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 --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Receiving Intent
I am trying to get the file path of the intent. Everything I find doesn't seem to work. This is what I have so far: Intent i = getIntent(); Uri uri = i.getData(); if (uri == null) { return; } String startFile = ; try { startFile = uri.getPath(); } catch (Exception ex) { Toast.makeText(this, Error:\n + ex.getMessage().toString(), Toast.LENGTH_LONG).show(); return; } if (startFile == null) { return; } StringBuilder text = new StringBuilder(); can = false; sel = false; try { file = new File(CurDir, startFile); reader = new BufferedReader(new FileReader(file)); String line; while ((line = reader.readLine()) != null) { text.append(line); text.append('\n'); } } catch (Exception e) { Toast.makeText(this, Error:\n + e.getMessage().toString(), Toast.LENGTH_LONG).show(); } TextEditor.setText(text); FileName.setText(startFile); However if I open a file in /mnt/sdcard/test.txt it tries to open /mnt/sdcard/mnt/sdcard/test.txt this is frustrating me to no end... Any help is appreciated. -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Enumerate sd cards
On Wed, Mar 6, 2013 at 10:29 PM, yves...@gmail.com yves...@gmail.comwrote: So, I want to know, first, how to enumerate all storage locations Did you check the documentation? http://developer.android.com/guide/topics/data/data-storage.html , second, monitor sdcard insert/eject events. See the various MEDIA broadcasts. http://developer.android.com/reference/android/content/Intent.html#ACTION_MEDIA_BAD_REMOVAL - 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 --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Receiving Intent
You need to provide more information. On Wed, Mar 6, 2013 at 10:33 PM, TWProgrammers ip.progra...@gmail.comwrote: I am trying to get the file path of the intent. What intent? Everything I find doesn't seem to work. Like what? However if I open a file in /mnt/sdcard/test.txt Open a file how? it tries to open /mnt/sdcard/mnt/sdcard/test.txt What is 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 --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] how to use wpa_supplicant in android app in order to support wifi 802.11r
Dear All, As for as my knowledge, android os doesn't support wifi 802.11r. What is the way to make it supported on android Mobile application. Is it possible to use wifi _supplicant http://code.metager.de/source/xref/android/4.1.1/external/wpa_supplicant_8/src/drivers/driver.h in application to support wifi 802.11r. -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Fwd: Notification from Google Play - removed apps
All, Please let me know what to do in this situation, last night i added some keyword, so please let me know what to do. --Rakesh -- Forwarded message -- From: Google Play Support googleplay-developer-supp...@google.com Date: Thu, Mar 7, 2013 at 11:41 AM Subject: Notification from Google Play To: rkjhaw1...@gmail.com This is a notification that your application, A P J Abdul Kalam, with package ID com.kt.APJKalam, has been removed from the Google Play Store. *REASON FOR REMOVAL*: Violation of the spamhttps://play.google.com/about/developer-content-policy.html#spamprovisions of the Content Policy. - Product descriptions should not be misleading or loaded with keywords in an attempt to manipulate ranking or relevancy in the store’s search results. All violations are tracked. Serious or repeated violations of any nature will result in the termination of your developer account, and investigation and possible termination of related Google accounts. If your account is terminated, payments will cease and Google may recover the proceeds of any past sales and the cost of any associated fees (such as chargebacks and payment transaction fees) from you. If your developer account is still in good standing, you may revise and upload a policy compliant version of your application as a new package name. Before uploading any new applications, please review the Developer Distribution Agreementhttp://www.android.com/us/developer-distribution-agreement.htmland Content Policy http://www.android.com/us/developer-content-policy.html. If you feel we have made this determination in error, you can visit the Google Play Help Center articlehttp://support.google.com/googleplay/android-developer/bin/answer.py?answer=2477981for additional information regarding this removal. The Google Play Team -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.