[android-developers] Programmatically publishing app in GooglePlay / Way to automate???
Dear All, Publication of App to the Google play app store has massively an positively evolve in past 3 years. Part of it was the result of management of app and content payment, support for device configuration or integration of advertisement (all good goals I suppose). I've already released 5 apps in multiple languages now in the Market now and for every upgrade, it take longer and longer to submit a new revision. Is there a way to programmatically submit app updates at least, with a command line error-code that would suggest human attention for resolution? 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] Change in behavior of dialog windows since Android 4.x
Dear All, Since the arrival of Android 4.x, it looks like dialog windows that are opened just before an activity goes into the pause state don't respond to button anymore (i.e., OnClickListener does nothing after the activity is paused while displaying a dialog). IS there anyone else experiencing this? 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] How to toggle the display of an activity dynamically
Hello, I'd like my activity to start without any display and, based on some criteria/user preference, revert back to displaying a UI/dialogue when onCreate() is called. After some research on the web, I found that the application manifest can be easily set to force a none display theme with ' android:theme=@android:style/Theme.NoDisplay ' - and effectively, my activity starts and nothing gets displayed. What is not obvious is how to force a theme from onCreate() that will allow me to see dialogues. I've tried forcing a time with setTheme() from onCreate() with an opaque background but it did not work. It's as if there's is no window manager that was ever initialized when the manifest is set to Theme.NoDisplay. I'd appreciate if anyone could help! Regards, -- 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] Prevent garbage collection for Broadcast receiver that are dynamically registered
Thank you Mark - this was never very clear in any of the books I've bought regarding Android programming or on Android website unfortunately. My next question is as follows: I've listed a receiver in the manifest as suggested pointing to the following definition: public class TESTWAKEUP extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { Intent rerun=new Intent(context,MyApp.class); rerun.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); rerun.putExtra(fromstaticreceiver, parameter); context.startActivity(rerun); } } } Now, for some reason, when my activity is brought back to the foreground by the about receiver (which is triggered by a Service), it does not seem that the extra parameter is ever receiver: @Override public void onCreate(Bundle savedInstanceState) //this is for MyApp { Intent argv=getIntent(); Bundle bundle = argv.getExtras(); String fromstaticreceiver=null; if (bundle != null) fromstaticreceiver = bundle.getString(fromstaticreceiver); Log.d(here:, fromstaticreceiver= + fromstaticreceiver); //always shows null for fromstaticreceiver My question is:does getIntent() represent the argument of the intent that originally started the activity or does it reflect intent in the system that are forcing an activity to come to the foreground? Many thanks for any feedback on this front. Rdgs, On Wed, Aug 15, 2012 at 9:43 AM, Mark Murphy mmur...@commonsware.comwrote: On Wed, Aug 15, 2012 at 12:34 PM, frantz lohier floh...@gmail.com wrote: Question: is there a way to ensure that receiver are programmatically registered at run-time are not deallocated when an app goes in background? IMHO, a better implementation would be to register the receiver in the manifest, then use PackageManager and setComponentEnabledSetting() to control when it should and should not receive broadcasts. IMHO, a receiver registered via registerReceiver() from an activity should only be used for broadcasts while the activity is in the foreground. -- 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.0 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 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] Prevent garbage collection for Broadcast receiver that are dynamically registered
Dear All, I've developed an app that registers a receiver in the onResume() constructor. This receiver need not to be deallocated as it processes intent even when my app is not running on the foreground. For that reason, the receiver is not deregistered by onPause(). Now, when the app goes in background mode, I get a warning that the receiver has leaked and, since the 4.1 update, the receiver seems to be deallocated from memory (was not the case before). Question: is there a way to ensure that receiver are programmatically registered at run-time are not deallocated when an app goes in background? 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] Picking up contacts: difference in behaviour between HTC and NexusOne - SDK 2.1-update1
Hi, I wrote an app that invokes the contact manager in the following way: Intent pickcontact = new Intent(Intent.ACTION_PICK, People.CONTENT_URI); startActivityForResult(pickcontact, CONTACTPICKED); I am experiencing 2 different behavior between HTC phones and the NexusOne, all with firmware 2.1-update1. Thanks work properly on the NexusOne (i.e., my application is getting access to all my contact along the primary phone number of that contact list). On HTC phones however (incredible and the hero), the list of contact I get represents some sort of index as opposed to the actual contact name/phone number. Am I missing anything ? 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] Problem using the audiorecord API
Hi All, I'm writing an Activity that attempts to use the AudioRecord API. When I invoke the setNotificationMarkerPosition, my activity crashes with the following error message: *java.lang.IllegalStateException: Unable to retrieve AudioRecord pointer for setPositionUpdatePeriod()* E/AndroidRuntime( 4543):at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2401) E/AndroidRuntime( 4543):at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2417) E/AndroidRuntime( 4543):at android.app.ActivityThread.access$2100(ActivityThread.java:116) E/AndroidRuntime( 4543):at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794) E/AndroidRuntime( 4543):at android.os.Handler.dispatchMessage(Handler.java:99) E/AndroidRuntime( 4543):at android.os.Looper.loop(Looper.java:123) E/AndroidRuntime( 4543):at android.app.ActivityThread.main(ActivityThread.java:4203) E/AndroidRuntime( 4543):at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime( 4543):at java.lang.reflect.Method.invoke(Method.java:521) E/AndroidRuntime( 4543):at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791) E/AndroidRuntime( 4543):at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549) E/AndroidRuntime( 4543):at dalvik.system.NativeStart.main(Native Method) E/AndroidRuntime( 4543): *Caused by: java.lang.IllegalStateException: Unable to retrieve AudioRecord pointer for setPositionUpdatePeriod()* E/AndroidRuntime( 4543):at android.media.AudioRecord.native_set_pos_update_period(Native Method) E/AndroidRuntime( 4543):at android.media.AudioRecord.setPositionNotificationPeriod(AudioRecord.java:650) E/AndroidRuntime( 4543):at com.intentionis.ambulabilis.android.ambu.full.AmBuMain.onStart(AmBuMain.java:2069) E/AndroidRuntime( 4543):at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1205) E/AndroidRuntime( 4543):at android.app.Activity.performStart(Activity.java:3519) E/AndroidRuntime( 4543):at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2373) The code snippet that triggers this bug is as follows: AudioRecord audiorec = new AudioRecord( MediaRecorder.AudioSource.MIC, 11025, AudioFormat.CHANNEL_CONFIGURATION_MONO, AudioFormat.ENCODING_PCM_16BIT, 11025*20); //No exception is thrown and audiorec seems to be valid //THIS CALL CAUSES THE CRASH (THIS HAPPENS EVEN WHEN I PLACE THE LINE BELOW THE NEXT SENTENCE audiorec.setPositionNotificationPeriod(4000); audiorec.setRecordPositionUpdateListener(new AudioRecord.OnRecordPositionUpdateListener() { public void onMarkerReached(AudioRecord rec) { ; } public void onPeriodicNotification(AudioRecord rec) { ; } }); Thanks for anyone's feedback. PS: the above code also fails when I try different sampling rate, channel configuration. -- 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] Problem using the AudioRecord API
Hi All, I'm writing an Activity that attempts to use the AudioRecord API. When I invoke the setNotificationMarkerPosition, my activity crashes with the following error message: *java.lang.IllegalStateException: Unable to retrieve AudioRecord pointer for setPositionUpdatePeriod()* E/AndroidRuntime( 4543):at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2401) E/AndroidRuntime( 4543):at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2417) E/AndroidRuntime( 4543):at android.app.ActivityThread.access$2100(ActivityThread.java:116) E/AndroidRuntime( 4543):at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794) E/AndroidRuntime( 4543):at android.os.Handler.dispatchMessage(Handler.java:99) E/AndroidRuntime( 4543):at android.os.Looper.loop(Looper.java:123) E/AndroidRuntime( 4543):at android.app.ActivityThread.main(ActivityThread.java:4203) E/AndroidRuntime( 4543):at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime( 4543):at java.lang.reflect.Method.invoke(Method.java:521) E/AndroidRuntime( 4543):at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791) E/AndroidRuntime( 4543):at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549) E/AndroidRuntime( 4543):at dalvik.system.NativeStart.main(Native Method) E/AndroidRuntime( 4543): *Caused by: java.lang.IllegalStateException: Unable to retrieve AudioRecord pointer for setPositionUpdatePeriod()* E/AndroidRuntime( 4543):at android.media.AudioRecord.native_set_pos_update_period(Native Method) E/AndroidRuntime( 4543):at android.media.AudioRecord.setPositionNotificationPeriod(AudioRecord.java:650) E/AndroidRuntime( 4543):at com.intentionis.ambulabilis.android.ambu.full.AmBuMain.onStart(AmBuMain.java:2069) E/AndroidRuntime( 4543):at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1205) E/AndroidRuntime( 4543):at android.app.Activity.performStart(Activity.java:3519) E/AndroidRuntime( 4543):at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2373) The code snippet that triggers this bug is as follows: AudioRecord audiorec = new AudioRecord( MediaRecorder.AudioSource.MIC, 11025, AudioFormat.CHANNEL_CONFIGURATION_MONO, AudioFormat.ENCODING_PCM_16BIT, 11025*20); //No exception is thrown and audiorec seems to be valid //THIS CALL CAUSES THE CRASH (THIS HAPPENS EVEN WHEN I PLACE THE LINE BELOW THE NEXT SENTENCE audiorec.setPositionNotificationPeriod(4000); audiorec.setRecordPositionUpdateListener(new AudioRecord.OnRecordPositionUpdateListener() { public void onMarkerReached(AudioRecord rec) { ; } public void onPeriodicNotification(AudioRecord rec) { ; } }); Thanks for anyone's help (my thirst for noetic stimulation has some limits and I am giving up :) ). PS: the above code also fails when I try different sampling rate, channel configuration. -- 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] Invoking the default Alarm clock app as ways for Apps to receive a intent at scheduled time
Dear All, Is there a way for an App to invoke the default Alarm Clock application and receive a intent at a given time for specific functions to be activated. I understand the the AlarmManager can be used for this sort of purpose but I'm trying to leverage the complete alarmclock GUI framework that allows users to set the time of an alarm, activate/deactivate them, etc (as implemented in the default alarmclock application package and the setalarm.java file for example). Any body know if this is 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] Continous Audio recording in memory
Dear All, I'm writing an App that needs to continuously record audio in memory and email the last 30 seconds of audio when required. Much of the mediarecorder API is designed to store linear audio in files. Could anybody point me towards a way to continously record audio in memory, using a circular buffer using the SDK ? 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
Re: [android-developers] Re: continuous audio recording in memory
Ok thanks. Do you think there's a way to do that purely in Java/Using the framework ? Thanks, On Wed, Jan 6, 2010 at 11:27 AM, HeHe cnm...@gmail.com wrote: a look at .../framework/base/media/.../AudioRecord.cpp should be helpful~ On Jan 6, 10:11 am, frantz lohier floh...@gmail.com wrote: Dear All, I'm trying to write an App that continuously record audio in memory (in a circular buffer). Could anyone point me towards a piece of code (perhaps in the kernel) that shows how to best to this ? 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.comandroid-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
[android-developers] Retrieving the phone maker and phone model
Does anybody know a way for an Activity to retrieve the name of the phone (maker/model) ? 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
Re: [android-developers] Retrieving the phone maker and phone model
Great, thanks Mark (by the way, your books are great). One quick more: how do I know the min/max resolution of a screen offered by a given device ? Thanks, On Sat, Jan 9, 2010 at 10:04 AM, Mark Murphy mmur...@commonsware.comwrote: frantz lohier wrote: Does anybody know a way for an Activity to retrieve the name of the phone (maker/model) ? Look at android.os.Build for those sorts of details. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, $35/Year -- 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.comandroid-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
[android-developers] continuous audio recording in memory
Dear All, I'm trying to write an App that continuously record audio in memory (in a circular buffer). Could anyone point me towards a piece of code (perhaps in the kernel) that shows how to best to this ? 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] Pickup a phone contact under the emulator
Dear All, Quick question; - When running the 2.0 emulator, my application can’t pick-up a phonebook contact anymore: o (1) when invoking an ACTION_PICK intent and when the agenda is empty, I get a menu suggesting that when pressing the MENU key, I be able to select a account. No menu ever appears when I select the menu button … o (2) when an account is properly provisioned under the emulator and after that a phone number is populated, if I invoke the Menu button and select “Accounts” , I immediately get the following crash (without even using my application): W/UsageStats( 52): Failed to persist new stats I/ContactsListActivity( 102): Called with action: com.android.contacts.action.LIST_DEFAULT I/ActivityManager( 52): Displayed activity com.android.contacts/.DialtactsContactsEntryActivity: 1311 ms (total 1311 ms) W/UsageStats( 52): Failed to persist new stats W/KeyCharacterMap( 102): No keyboard for id 0 W/KeyCharacterMap( 102): Using default keymap: /system/usr/keychars/qwerty.kcm.bin I/ActivityManager( 52): Starting activity: Intent { act=android.settings.SYNC_SETTINGS (has extras) } D/AndroidRuntime( 102): Shutting down VM W/dalvikvm( 102): threadid=3: thread exiting with uncaught exception (group=0x4001b188) E/AndroidRuntime( 102): Uncaught handler: thread main exiting due to uncaught exception E/AndroidRuntime( 102): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.settings.SYNC_SETTINGS (has extras) } E/AndroidRuntime( 102):at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1408) E/AndroidRuntime( 102):at android.app.Instrumentation.execStartActivity(Instrumentation.java:1378) E/AndroidRuntime( 102):at android.app.Activity.startActivityFromChild(Activity.java:2989) E/AndroidRuntime( 102):at android.app.Activity.startActivityForResult(Activity.java:2769) E/AndroidRuntime( 102):at android.app.Activity.startActivity(Activity.java:2855) E/AndroidRuntime( 102):at com.android.contacts.ContactsListActivity.onOptionsItemSelected(ContactsListActivity.java:889) E/AndroidRuntime( 102):at android.app.Activity.onMenuItemSelected(Activity.java:2170) E/AndroidRuntime( 102):at com.android.internal.policy.impl.PhoneWindow.onMenuItemSelected(PhoneWindow.java:730) E/AndroidRuntime( 102):at com.android.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:139) E/AndroidRuntime( 102):at com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:855) E/AndroidRuntime( 102):at com.android.internal.view.menu.IconMenuView.invokeItem(IconMenuView.java:525) E/AndroidRuntime( 102):at com.android.internal.view.menu.IconMenuItemView.performClick(IconMenuItemView.java:122) E/AndroidRuntime( 102):at android.view.View.onTouchEvent(View.java:4179) E/AndroidRuntime( 102):at android.widget.TextView.onTouchEvent(TextView.java:6532) E/AndroidRuntime( 102):at android.view.View.dispatchTouchEvent(View.java:3709) E/AndroidRuntime( 102):at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:882) E/AndroidRuntime( 102):at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:882) E/AndroidRuntime( 102):at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1643) E/AndroidRuntime( 102):at android.view.ViewRoot.handleMessage(ViewRoot.java:1690) E/AndroidRuntime( 102):at android.os.Handler.dispatchMessage(Handler.java:99) E/AndroidRuntime( 102):at android.os.Looper.loop(Looper.java:123) E/AndroidRuntime( 102):at android.app.ActivityThread.main(ActivityThread.java:4310) E/AndroidRuntime( 102):at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime( 102):at java.lang.reflect.Method.invoke(Method.java:521) E/AndroidRuntime( 102):at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860) E/AndroidRuntime( 102):at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) E/AndroidRuntime( 102):at dalvik.system.NativeStart.main(Native Method) I/Process ( 52): Sending signal. PID: 102 SIG: 3 I/dalvikvm( 102): threadid=7: reacting to signal 3 E/dalvikvm( 102): Unable to open stack trace file '/data/anr/traces.txt': Permission denied E/ActivityThread( 52): Failed to find provider info for android.server.checkin E/Checkin ( 52): Error reporting crash: java.lang.IllegalArgumentException: Unknown URL content://android.server.checkin/crashes Van somebody take a look at this on the Android team and also suggest what Intent an application needs to fire for a user to (A) enter a proper sync account and (B) retrieve a phone contact from a phone-entry associated with this account. I don’t think that this burden should be handle by end-user apps and
Re: [android-developers] Re: Picking up a PhoneBook entry under Android 2.0 !!!
Thank you Dmitri for the code. I've reviewed it and don't see any interaction with the AccountManager. One of the problem with SDK 2.0 is that pickup contacts is condition by having a user login with a proper account. My application crashes under the emulator because I cannot profile a Gmail account for instance from which to browse the phonebook. There seem to be a new AccountManager APIs. Can you or anybody highlight how this API works. For instance, when Starting an activity to pick up a contact, an app would want to make sure that the user has picked up an account and logged to it (if not, defaulting to the SIm contact list seems appropriate). Would it be possible for you to update your very good businesscardacitivity to reflect this ? Thanks, On Tue, Nov 3, 2009 at 1:44 PM, Dmitri Plotnikov dplotni...@google.comwrote: I just published some sample code illustrating this use of both legacy and new Contacts APIs in the same app. See http://code.google.com/p/android-business-card Cheers, - Dmitri On Mon, Nov 2, 2009 at 9:31 AM, Mark Murphy mmur...@commonsware.comwrote: jarkman wrote: int sdkVersion = Integer.parseInt(Build.VERSION.SDK); Note that if you are using API version 4 (1.6 and newer), there is Build.VERSION.SDK_INT, which already converts this to an integer. If you are still using API version 3, you'll need to parse the String as shown above. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android 1.6 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.comandroid-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.comandroid-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
Re: [android-developers] Re: Picking up a PhoneBook entry under Android 2.0 !!!
Thanks Jarkman. 2 questions: 1) Does: int sdkVersion = Integer.parseInt(Build.VERSION.SDK); if (sdkVersion Build.VERSION_CODES.ECLAIR) Return the OS/SDK version currently run by the underlying platform or does it return the target SDK level the APP was compiled for ? 2) Is there a way for an App to learn what is the current language (input/display) being used ? Thanks, On Mon, Nov 2, 2009 at 9:23 AM, jarkman jark...@gmail.com wrote: On Nov 2, 5:02 pm, frantz lohier floh...@gmail.com wrote: + in the Market, should we upload different app versions compiled for different SDK/OS configuration ? Can the market app offer a specific version of an app to an end-user depending on what OS version is used ? It would certainly make our lives easier if the Market supported alternative binaries for different OS versions. + how does an app know what OS version is currently used ? + how can an app dynamically make use of new SDK feature with the same executable ? (for example, how can I activate TTS if it is supported). Backward compatibility is discussed here: http://android-developers.blogspot.com/2009/04/backward-compatibility Unfortunatly, this link does not tell me how to selectively do an import android.speech.tts.TextToSpeech for my code to compile. What you can do is build against the 2.0 SDK, but wrap up all your 2.0 stuff in a class which you only instantiate if you are on a 2.0 device. Build a base class which is mostly abstract, and a 1.6 version of the same class which implements the same functionality but with 1.6 APIs. Then use this trick to instantiate the right subclass: int sdkVersion = Integer.parseInt(Build.VERSION.SDK); if (sdkVersion Build.VERSION_CODES.ECLAIR) { className = com.foo.ContactAccessorSdk3_4; // one subclass of ContactAccessorBase } else { className = com.foo.ContactAccessorSdk5; // another subclass of ContactAccessorBase } /* * Find the required class by name and instantiate it. */ try { Class? extends ContactAccessor clazz = Class.forName(className).asSubclass (ContactAccessor.class); ContactAccessorBase sInstance = clazz.newInstance(); } catch (Exception e) { throw new IllegalStateException(e); } (thanks, Dmitri!) On Mon, Nov 2, 2009 at 8:54 AM, frantz lohier floh...@gmail.com wrote: Thanks Jarkman for your perspectives on this. 2 additional questions; - can the emulator simulate accessing a gmail account ? (as ways to avoid dealing with the Accountmanager APIs) - A more general and critical question; if apps start to have to behave differently based on the Android OS version they run on, there are a lot of implications; On Mon, Nov 2, 2009 at 2:33 AM, jarkman jark...@gmail.com wrote: On Nov 2, 1:57 am, frantz lohier floh...@gmail.com wrote: When running the same code (compiled with SDK 1.6) and a target emulator at 2.0 level, the above code never return the entries I have populated in my the phone book. It's as if the phonebook was always empty. My (hazy) understanding is that the 1.6 APIs will only show you the contacts in the primary gmail-syncing account on the device. As the emulator doesn't have one of those accounts, your newly-entered contacts are in a different account (or in some kind of no-account limbo), so they are invisible to the 1.6 APIs. I think that on a real device with a real account the situation will be better, though you still need to move to the 2.0 APIs to support users who have multiple accounts. It may be possible to use the AccountManager APIs to manufacture an account of the right sort in the emulator, which would make it possible to enter new contacts who would show up in the 1.6 APIs, but I don't think there are enough clues in the published docs to tell us how to do that. - When running the emulator in 2.0 mode, the default local input type is Japaneese. Any way to change this ? Yes, you can fiddle with the IME settings in the Settings app, in 'Language Keyboard'. Richard -- 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.comandroid-developers%2bunsubscr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@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
[android-developers] How can an app dynamically what is the current display language set
Dear All, I have a quick 2 questions; - is there a way for an App to understand what is the current display language ? - is there a way for an App to understand if the current country the phone operates should report speed in miles per hour as opposed to km/hour ? Many 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] Localization awareness
Dear All, I have a quick 2 questions; - is there a way for an App to understand what is the current display language ? - is there a way for an App to understand if the current country the phone operates should report speed in miles per hour as opposed to km/hour ? Many 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] Picking up a PhoneBook entry under Android 2.0 !!!
Happy Halloween All ! The party is over and Google suddenly released the much anticipated Android 2.0 SDK. Much improvement for sure ! That said, the party is over and I came to have to deal with the following Ghost; I've released an app in the market (Ambu) - so far qualified under SDK 1.5 1.6. Using the emulator for Android 2.0, things don't work anymore. This is what I'd like to share; - my app invokes an ACTION.PICK intent as way to extract phone contact from the phone book and populate a database. When compiling my app using the SDK version 1.6 and a target emulator configured at 1.6 level, the following code WORKS: Intent pickcontact = new Intent(Intent.ACTION_PICK, People.CONTENT_URI); startActivityForResult(pickcontact, CALL_CONTACTPICKED); When running the same code (compiled with SDK 1.6) and a target emulator at 2.0 level, the above code never return the entries I have populated in my the phone book. It's as if the phonebook was always empty. A couple of additional observations; - When running the emulator in 2.0 mode, the default local input type is Japaneese. Any way to change this ? - Under the 2.0 emulator, and setting a clean AVD image, if you launch the dial button, press menu and select account, you'll probably immediatly get a android.process.acore error ... - In the most recent SDK document, I can read that People.CONTENT_URI was deprecated after SDK 1.6. Therefore, I've changed the above code to: Intent pickcontact = new Intent(Intent.ACTION_PICK, AUTHORITY_URI); StartActivityForResult(pickcontact, CALL_CONTACTPICKED); Unfortunatly, with the above, I get a crash right away when invoking ACTION_PICK. Question to the Google Folks (dear dianne and others, please !); How to we properly pick a phonebook contact under the 2.0 OS using 1.6 or 2.0 compiled apps ? 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: server error when trying to buy my own app
Thanks, I did not know that (I'm curious to know how Google knows I'm the one buying though). I've used my wife's Google phone and ran into the same problem ... If you search in the market, you you find ambu and ambu-trial (the later being a 2 day free version of the app). I did not restrict the app to a given country and people in Europe were able to purchase it. I'd love to confirm that someone can buy it in the US. Your help is very much appreciated. On Sun, Oct 25, 2009 at 5:20 PM, Lance Nanek lna...@gmail.com wrote: I published my first app recently and ran into the same problem when I tried purchasing it to test the process. Looks like it isn't allowed: Please note that it is against Google Checkout's policies to purchase your own application. You will receive an error message when you try to purchase your own application. http://market.android.com/support/bin/answer.py?hl=enanswer=141659 I was going to buy a copy of yours to test for you just now, but all I see when I search for ambu is a free one: http://imgur.com/9rvrd.png Do you have it set to only show up in certain countries? I'm in the US on T-Mobile running a G1 with the official OTA 1.6 firmware. On Oct 25, 7:39 pm, frantz lohier floh...@gmail.com wrote: Dear All, I'm a developper based in the US that recently released a pay-for app in the market called AmBu. Googlecheckout is the merchant account I am using (the only one approved by the market it seems). Two customers were able to purchase my app from a foreign country (Europe). However, when I'm trying to buy my own application from the US (using my G1 phone) using a valid debit or credit card number, I consistantly get a server error during the purchase process. I suspect I'm not the only one and I'm losing customers. What is the right structure at google to help resolve this ? In the market blogs, I've seen few posts of people facing the same issue but nothing to help resolve this was detailed. Anyone ? --~--~-~--~~~---~--~~ 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] server error when trying to buy my own app
Dear All, I'm a developper based in the US that recently released a pay-for app in the market called AmBu. Googlecheckout is the merchant account I am using (the only one approved by the market it seems). Two customers were able to purchase my app from a foreign country (Europe). However, when I'm trying to buy my own application from the US (using my G1 phone) using a valid debit or credit card number, I consistantly get a server error during the purchase process. I suspect I'm not the only one and I'm losing customers. What is the right structure at google to help resolve this ? In the market blogs, I've seen few posts of people facing the same issue but nothing to help resolve this was detailed. Anyone ? --~--~-~--~~~---~--~~ 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: Application compatibility between SDK 1.5 and 1.6
Thanks Mark. Could you elaborate on what you mean by reflection ? Thanks, On Mon, Oct 12, 2009 at 9:40 AM, Mark Murphy mmur...@commonsware.comwrote: flohier wrote: What is the recommended approach to have currently shipping 1.5-SDK compliant apps to start offering 1.6 features (such as TTL) in the Market ? Publish one app, using reflection to access 1.6 APIs. Can we just publish 2 versions of the same package name each compiled with a different SDK level No. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android Development Wiki: http://wiki.andmob.org --~--~-~--~~~---~--~~ 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: activity stak
Thanks Dianne. I don't think it's necessary true. My activity is actually alive but not visible (I have a periodic timer thread that wakes up some function of my activity). My activity called the phone dialer, the phone dialer is on top of the stack and my activity is still runiing but is not visible. Any other idea ? FL On Mon, Jul 27, 2009 at 8:37 PM, Dianne Hackborn hack...@android.comwrote: onResume() tells you when you are at the top. On Mon, Jul 27, 2009 at 8:18 PM, flohier floh...@gmail.com wrote: Hi, Is there a way for an running activity to know if it is on top of the stack (= visible) ? Thanks, -- 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 -~--~~~~--~~--~--~---