[android-developers] Re: code to uninstall applications
I don't know if this is the one you meant about launching uninstaller activity but I found something which might be the same... http://android.amberfog.com/ I put this in the manifest... then this one in the source... Uri packageURI = Uri.parse("package:com.android.myapp"); Intent uninstallIntent = new Intent(Intent.ACTION_DELETE, packageURI); startActivity(uninstallIntent); It redirected me to the uninstall confirmation... How about before the uninstaller activity... the window where it shows the information of the applications you selected... Whats the name of that activity?? How do I redirect to that activity?? On Jul 6, 11:01 am, aljo wrote: > Hmmm... that's why I can't see the deletePackage method when I type > getPackageManager(). What do you mean I need to launch the uninstaller > activity? Is that the uninstaller app when you go to Settings/ > Applications/ManageApplications in the phone?? > > If that's the case, is it not possible yet to uninstall apps using our > own applications? > > Is there a way or code to just redirect to the ManageApplications > window using my application? > > On Jul 6, 9:32 am, Dianne Hackborn wrote: > > > > > The deletePackage method is not available to third party apps. To uninstall > > an app you need to launch the uninstaller activity to have the user confirm > > what is going on. > > > On Sat, Jul 4, 2009 at 10:43 AM, Roman > > wrote: > > > > Check out the UninstallAppProgress.java source in packages/apps/ > > > PackageInstaller/src/com/android/packageinstaller > > > > Have a look at the method and follow the flow of deletePackage. You > > > should be able to find out what exactly is called. > > > > public void initView() { > > > requestWindowFeature(Window.FEATURE_NO_TITLE); > > > setContentView(R.layout.op_progress); > > > //initialize views > > > PackageUtil.initAppSnippet(this, mAppInfo, R.id.app_snippet); > > > TextView installTextView = (TextView)findViewById > > > (R.id.center_text); > > > installTextView.setText(R.string.uninstalling); > > > final ProgressBar progressBar = (ProgressBar) findViewById > > > (R.id.progress_bar); > > > progressBar.setIndeterminate(true); > > > PackageDeleteObserver observer = new PackageDeleteObserver(); > > > getPackageManager().deletePackage(mAppInfo.packageName, > > > observer, 0); > > > } > > > > -- > > > Roman Baumgaertner > > > Sr. SW Engineer-OSDC > > > ·T· · ·Mobile· stick together > > > The views, opinions and statements in this email are those of the > > > author solely in their individual capacity, and do not necessarily > > > represent those of T-Mobile USA, Inc. > > > > On Jul 2, 7:54 pm, aljo wrote: > > > > I wan't to uninstall applications using my application... I can > > > > retrieve the list of packages installed but I don't know how to remove > > > > them... I used the PackageManager class, getInstalledApplications() > > > > method... I can't find any method like removeApplication() or > > > > uninstallApplication(). > > > > > the only method I saw in this class is the removePackageFromPreferred > > > > (String packageName) method... It retrieves a list of preferred > > > > packages.. I don't exactly know what preferred packages means or > > > > somehow how to retrieve them... I tried to put a package name in the > > > > method "removePackageFromPreferred (com.dev5.fivegame)" but it gives > > > > an error... > > > > > I'm kinda new to these stuffs so pardon me for my questions... > > > -- > > 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.- Hide quoted text - > > > - Show quoted text -- Hide quoted text - > > - Show quoted text - --~--~-~--~~~---~--~~ 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: SeekBar
Hi Jack, I have implemented the Vertical SeekBar. But when i am setring the progress using setProgress() . Progress is ok(means yellow shadow is working right) but Thumb also should move along with Yellow shadow.. But it is not moving properly. I am not getting what should i do.. Thanks, Peeyush On Mon, Jul 6, 2009 at 11:26 AM, Jack Ha wrote: > > Hi Peeyush, > > Not sure exactly what you would like to do but you might want to take > a look at the SeekBar.setProgress(position) function. > > -- > Jack Ha > Open Source Development Center > ・T・ ・ ・Mobile・ stick together > > The views, opinions and statements in this email are those of > the author solely in their individual capacity, and do not > necessarily represent those of T-Mobile USA, Inc. > > > > On Jul 5, 10:22 pm, peeyush varshney > wrote: > > Hi, > > How to set the thumb position when progress has changed. > > > > -- > > Thank & Regards > > Peeyush Varshney > > > -- Thank & Regards Peeyush Varshney --~--~-~--~~~---~--~~ 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: invoke other apk file?
You must know the package name and activity name On Jul 6, 1:25 pm, tstanly wrote: > thanks. > > if i don't know the package name,class name.. > just knows names "xxx.apk" > > is it can work? > > On 7月6日, 下午12時30分, Piano Pan wrote: > > > Use this function: > > > public int startActivity(String packageName, String className) { > > Intent intent = new Intent("android.intent.action.MAIN"); > > > intent.setClassName(packageName, className); > > intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | > > Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT ); > > startActivity(intent); > > return 0; > > } > > > On Jul 6, 11:03 am, tstanly wrote: > > > > hi all, > > > > I design two apk for a.apk and b.apk, > > > but now I want to invoke b.apk from a.apk, > > > > to do that,I will put a Button in a.apk, > > > when user click the button,then goes to b.apk. > > > > how can I do that? > > > > 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: SeekBar
Hi Peeyush, Not sure exactly what you would like to do but you might want to take a look at the SeekBar.setProgress(position) function. -- Jack Ha Open Source Development Center ・T・ ・ ・Mobile・ stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Jul 5, 10:22 pm, peeyush varshney wrote: > Hi, > How to set the thumb position when progress has changed. > > -- > Thank & Regards > Peeyush Varshney --~--~-~--~~~---~--~~ 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 freeMemory(), totalMemory() & MaxMemory from other applications
Is there a way to retrieve the free memory, total memory and maximum memory of other applications/processes using my application? I use Runtime.getRuntime().freeMemory() but it can only retrieve your current application... If there's somehow a method where I can just input their PIDs or Package Names like "Runtime.getRuntime().freeMemory ().packageName" for example.. Here's my code... int availProc = Runtime.getRuntime().availableProcessors(); long total = Runtime.getRuntime().totalMemory(); long free = Runtime.getRuntime().freeMemory(); long max = Runtime.getRuntime().maxMemory(); Toast.makeText(getApplicationContext(),availProc + "\nTM " + Long.toString(total) + "\nFM " + Long.toString(free) + "\nMM" + Long.toString(max), Toast.LENGTH_SHORT).show(); } --~--~-~--~~~---~--~~ 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: invoke other apk file?
thanks. if i don't know the package name,class name.. just knows names "xxx.apk" is it can work? On 7月6日, 下午12時30分, Piano Pan wrote: > Use this function: > > public int startActivity(String packageName, String className) { > Intent intent = new Intent("android.intent.action.MAIN"); > > intent.setClassName(packageName, className); > intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | > Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT ); > startActivity(intent); > return 0; > } > > On Jul 6, 11:03 am, tstanly wrote: > > > > > hi all, > > > I design two apk for a.apk and b.apk, > > but now I want to invoke b.apk from a.apk, > > > to do that,I will put a Button in a.apk, > > when user click the button,then goes to b.apk. > > > how can I do that? > > > 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] SeekBar
Hi, How to set the thumb position when progress has changed. -- Thank & Regards Peeyush Varshney --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How do I access a URI such as content://drm/audio/2 (which is a ringtone)
To be more specific: ringtoneUri = Uri.parse(ringtoneUriText); mRingtone = mRingToneMgr.getRingtone(mRingToneMgr.getRingtonePosition(ringtoneUri)); where ringtoneUriText is content://drm/audio/2 And then mRingtone.play() thanks Rob On Mon, Jul 6, 2009 at 12:30 AM, Rob Franz wrote: > Hi Marco,Basically supplying the ringtone's URI to the RingtoneManager's > getRingtone function (returning a Ringtone) and then calling play() to > what's returned. > > Should i be doing it differently? > > Thanks > Rob > > > On Mon, Jul 6, 2009 at 12:25 AM, Marco Nelissen wrote: > >> >> On Sun, Jul 5, 2009 at 8:55 PM, Rob Franz wrote: >> > >> > Hi all, >> > I am trying to play a ringtone that is specified as the Default system >> > ringtone. Unfortunately when i get the actual URI I get the above >> > (content://drm/audio/2) and then when I try to play it, I hear the >> > fallback ringtone - the one that you'd hear if the default was >> > unavailable. >> >> How are you trying to play 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 -~--~~~~--~~--~--~---
[android-developers] Re: invoke other apk file?
Use this function: public int startActivity(String packageName, String className) { Intent intent = new Intent("android.intent.action.MAIN"); intent.setClassName(packageName, className); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT ); startActivity(intent); return 0; } On Jul 6, 11:03 am, tstanly wrote: > hi all, > > I design two apk for a.apk and b.apk, > but now I want to invoke b.apk from a.apk, > > to do that,I will put a Button in a.apk, > when user click the button,then goes to b.apk. > > how can I do that? > > 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: How do I access a URI such as content://drm/audio/2 (which is a ringtone)
Hi Marco,Basically supplying the ringtone's URI to the RingtoneManager's getRingtone function (returning a Ringtone) and then calling play() to what's returned. Should i be doing it differently? Thanks Rob On Mon, Jul 6, 2009 at 12:25 AM, Marco Nelissen wrote: > > On Sun, Jul 5, 2009 at 8:55 PM, Rob Franz wrote: > > > > Hi all, > > I am trying to play a ringtone that is specified as the Default system > > ringtone. Unfortunately when i get the actual URI I get the above > > (content://drm/audio/2) and then when I try to play it, I hear the > > fallback ringtone - the one that you'd hear if the default was > > unavailable. > > How are you trying to play 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 -~--~~~~--~~--~--~---
[android-developers] Re: How do I access a URI such as content://drm/audio/2 (which is a ringtone)
On Sun, Jul 5, 2009 at 8:55 PM, Rob Franz wrote: > > Hi all, > I am trying to play a ringtone that is specified as the Default system > ringtone. Unfortunately when i get the actual URI I get the above > (content://drm/audio/2) and then when I try to play it, I hear the > fallback ringtone - the one that you'd hear if the default was > unavailable. How are you trying to play 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 -~--~~~~--~~--~--~---
[android-developers] Re: error message with MediaPlayer
You're getting the same "not supported" failure? Then I guess whatever you're trying to stream is not in a supported format. 2009/7/5 tstanly : > > but i use rtsp like: > > myPlayer1.setDataSource("rtsp://"); > myPlayer1.prepare(); > myPlayer1.start(); > > > it still failure too...:( > > On 7月6日, 上午11時23分, Marco Nelissen wrote: >> mms streaming is not supported, only http and rtsp >> >> >> >> On Sun, Jul 5, 2009 at 7:38 PM, tstanly wrote: >> >> > hi all, >> >> > I try to recived rtsp or mms audio stream for a long time, >> > simply use the code to recive audio stream: >> >> > myPlayer1.setDataSource("mms://"); >> > myPlayer1.prepare(); >> > myPlayer1.start(); >> >> > I search for this topic for all discussions, >> > and get some conclusions from all discussions: >> >> > (a) sdk 1.1 not support for stream but sdk 1.5 could. >> >> > (b) someone says stream can't work on the emulator because the >> > firewall issue.But in fact,my computer without firewall,and i also try >> > in the htc G1 mobile but still can't work!(sdk 1.1) >> >> > (c)almost everyone got the same error from "prepare()" function.the >> > error message from "adb logcat" i post bellow >> >> > E/PlayerDriver( 542): Command PLAYER_SET_DATA_SOURCE completed with >> > an error or info PVMFErrNotSupported >> > E/MediaPlayer( 741): error (1, -4) >> >> > can someone or android engineer give some tips? >> > because i search for this topic long time,and no answer,no one can >> > success. >> >> > thanks a lot.- 隱藏被引用文字 - >> >> - 顯示被引用文字 - > > > --~--~-~--~~~---~--~~ 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 do I access a URI such as content://drm/audio/2 (which is a ringtone)
Hi all, I am trying to play a ringtone that is specified as the Default system ringtone. Unfortunately when i get the actual URI I get the above (content://drm/audio/2) and then when I try to play it, I hear the fallback ringtone - the one that you'd hear if the default was unavailable. Ringtones appear to get this URI when downloaded through sites such as Myxer and the like. Now it seems that when the default ringtone is on the SD card under a folder called 'ringtones' I do not run into this problem. I have tried to add the line: ...to the manifest but that doesn't seem to work either. If anyone has an idea as how I would be able to play this ringtone, I would be eternally grateful! I have been researching this and I can't seem to find anywhere any documentation on how to do this. Thank you, Rob --~--~-~--~~~---~--~~ 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: Intercepting bluetooth device buttons
Register your intent receiver at a higher priority, and call abortBroadcast() while handling the Intent. On Thu, Jul 2, 2009 at 2:19 PM, sktech wrote: > > Thanks, I have successfully implemented this thanks to your help. > > However, I have the following problem: > > I have an application that plays audio and I listen through my > bluetooth > headset. When I push the play/pause button on the headset, my > application > get the corresponding broadcast and pauses the audio. However, the > built-in Android music player also gets this broadcast and starts > playing > one of its audio files. How can I prevent this? > > On Jul 2, 11:53 am, Nick Pelly wrote: >> On Thu, Jul 2, 2009 at 4:36 AM, >> >> info.sktechnol...@gmail.com wrote: >> >> > Could someone point me to the documentation or example on how my >> > application can intercept button pushes on an already paired and >> > connected bluetooth device? >> >> AVRCP events are broadcast as media intent's if the foreground >> application does not consume them. >> For example, >> KEYCODE_MEDIA_PLAY_PAUSE >> KEYCODE_MEDIA_STOP >> etc. >> >> HFP events are consumed by the Handsfree services, and as Mark says >> there's no easy way to hook into those. >> >> Nick >> >> >> >> >> >> > 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: error message with MediaPlayer
but i use rtsp like: myPlayer1.setDataSource("rtsp://"); myPlayer1.prepare(); myPlayer1.start(); it still failure too...:( On 7月6日, 上午11時23分, Marco Nelissen wrote: > mms streaming is not supported, only http and rtsp > > > > On Sun, Jul 5, 2009 at 7:38 PM, tstanly wrote: > > > hi all, > > > I try to recived rtsp or mms audio stream for a long time, > > simply use the code to recive audio stream: > > > myPlayer1.setDataSource("mms://"); > > myPlayer1.prepare(); > > myPlayer1.start(); > > > I search for this topic for all discussions, > > and get some conclusions from all discussions: > > > (a) sdk 1.1 not support for stream but sdk 1.5 could. > > > (b) someone says stream can't work on the emulator because the > > firewall issue.But in fact,my computer without firewall,and i also try > > in the htc G1 mobile but still can't work!(sdk 1.1) > > > (c)almost everyone got the same error from "prepare()" function.the > > error message from "adb logcat" i post bellow > > > E/PlayerDriver( 542): Command PLAYER_SET_DATA_SOURCE completed with > > an error or info PVMFErrNotSupported > > E/MediaPlayer( 741): error (1, -4) > > > can someone or android engineer give some tips? > > because i search for this topic long time,and no answer,no one can > > success. > > > thanks a lot.- 隱藏被引用文字 - > > - 顯示被引用文字 - --~--~-~--~~~---~--~~ 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: error message with MediaPlayer
mms streaming is not supported, only http and rtsp On Sun, Jul 5, 2009 at 7:38 PM, tstanly wrote: > > hi all, > > > I try to recived rtsp or mms audio stream for a long time, > simply use the code to recive audio stream: > > myPlayer1.setDataSource("mms://"); > myPlayer1.prepare(); > myPlayer1.start(); > > I search for this topic for all discussions, > and get some conclusions from all discussions: > > (a) sdk 1.1 not support for stream but sdk 1.5 could. > > > (b) someone says stream can't work on the emulator because the > firewall issue.But in fact,my computer without firewall,and i also try > in the htc G1 mobile but still can't work!(sdk 1.1) > > (c)almost everyone got the same error from "prepare()" function.the > error message from "adb logcat" i post bellow > > E/PlayerDriver( 542): Command PLAYER_SET_DATA_SOURCE completed with > an error or info PVMFErrNotSupported > E/MediaPlayer( 741): error (1, -4) > > > can someone or android engineer give some tips? > because i search for this topic long time,and no answer,no one can > success. > > > thanks a lot. > > > > > --~--~-~--~~~---~--~~ 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] invoke other apk file?
hi all, I design two apk for a.apk and b.apk, but now I want to invoke b.apk from a.apk, to do that,I will put a Button in a.apk, when user click the button,then goes to b.apk. how can I do that? 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: code to uninstall applications
Hmmm... that's why I can't see the deletePackage method when I type getPackageManager(). What do you mean I need to launch the uninstaller activity? Is that the uninstaller app when you go to Settings/ Applications/ManageApplications in the phone?? If that's the case, is it not possible yet to uninstall apps using our own applications? Is there a way or code to just redirect to the ManageApplications window using my application? On Jul 6, 9:32 am, Dianne Hackborn wrote: > The deletePackage method is not available to third party apps. To uninstall > an app you need to launch the uninstaller activity to have the user confirm > what is going on. > > On Sat, Jul 4, 2009 at 10:43 AM, Roman wrote: > > > > > > > > > Check out the UninstallAppProgress.java source in packages/apps/ > > PackageInstaller/src/com/android/packageinstaller > > > Have a look at the method and follow the flow of deletePackage. You > > should be able to find out what exactly is called. > > > public void initView() { > > requestWindowFeature(Window.FEATURE_NO_TITLE); > > setContentView(R.layout.op_progress); > > //initialize views > > PackageUtil.initAppSnippet(this, mAppInfo, R.id.app_snippet); > > TextView installTextView = (TextView)findViewById > > (R.id.center_text); > > installTextView.setText(R.string.uninstalling); > > final ProgressBar progressBar = (ProgressBar) findViewById > > (R.id.progress_bar); > > progressBar.setIndeterminate(true); > > PackageDeleteObserver observer = new PackageDeleteObserver(); > > getPackageManager().deletePackage(mAppInfo.packageName, > > observer, 0); > > } > > > -- > > Roman Baumgaertner > > Sr. SW Engineer-OSDC > > ·T· · ·Mobile· stick together > > The views, opinions and statements in this email are those of the > > author solely in their individual capacity, and do not necessarily > > represent those of T-Mobile USA, Inc. > > > On Jul 2, 7:54 pm, aljo wrote: > > > I wan't to uninstall applications using my application... I can > > > retrieve the list of packages installed but I don't know how to remove > > > them... I used the PackageManager class, getInstalledApplications() > > > method... I can't find any method like removeApplication() or > > > uninstallApplication(). > > > > the only method I saw in this class is the removePackageFromPreferred > > > (String packageName) method... It retrieves a list of preferred > > > packages.. I don't exactly know what preferred packages means or > > > somehow how to retrieve them... I tried to put a package name in the > > > method "removePackageFromPreferred (com.dev5.fivegame)" but it gives > > > an error... > > > > I'm kinda new to these stuffs so pardon me for my questions... > > -- > 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.- Hide quoted text - > > - Show quoted text - --~--~-~--~~~---~--~~ 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: Can I calculate the user's moving speed by phone?
2009/7/6 guishenl...@gmail.com >I want to develope an application to calculate the user's moving > speed by an Android phone like G1(Is it feasible on hardware?). But I > don't know whether similar software exists already. If anyone know > such similar application please tell me, and it will help me a lot in > my design. > There is plenty of "speedometer" apps on Android Market that show the users speed, they use the GPS chip. --~--~-~--~~~---~--~~ 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] error message with MediaPlayer
hi all, I try to recived rtsp or mms audio stream for a long time, simply use the code to recive audio stream: myPlayer1.setDataSource("mms://"); myPlayer1.prepare(); myPlayer1.start(); I search for this topic for all discussions, and get some conclusions from all discussions: (a) sdk 1.1 not support for stream but sdk 1.5 could. (b) someone says stream can't work on the emulator because the firewall issue.But in fact,my computer without firewall,and i also try in the htc G1 mobile but still can't work!(sdk 1.1) (c)almost everyone got the same error from "prepare()" function.the error message from "adb logcat" i post bellow E/PlayerDriver( 542): Command PLAYER_SET_DATA_SOURCE completed with an error or info PVMFErrNotSupported E/MediaPlayer( 741): error (1, -4) can someone or android engineer give some tips? because i search for this topic long time,and no answer,no one can success. thanks a lot. --~--~-~--~~~---~--~~ 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: Memory leak in AudioTrack?
Ah, thanks for the hint. I assumed the same thing would happen on the device, but never checked it outside the emulator... Regards, Morne On Jul 3, 5:54 pm, blindfold wrote: > I should add that I only see the GREF count increasing with the > emulator, not when I run my app on the ADP (connected via USB). On the > ADP I did even after over 300AudioTrackcreations not get the message > that GREF count went above 101 or whatever. I use SDK 1.5 r2 and my > ADP has Cupcake. Curiously, I also found that GREF grows fast when > using some native code from the NDK 1.5 r1 on the SDK 1.5 r2 emulator, > and not when running the same native code on the ADP. Is the > emulatormemorymanagement somehow different from Cupcake on ADP? > > Regards > > On Jul 3, 12:25 pm, blindfold wrote: > > > > > Yes, I'm facing the exact same problem. It looks like a bug in > >AudioTrack. For me the GREF count seems to increase by 2 for every > > creation and use ofAudioTrack, and it never goes down. I do not see > > this problem when instead creating and using MediaPlayer (and writing > > synthesized sound to flashmemory), supporting the conclusion that the > > problem lies withAudioTrack. > > > Thanks > > > On Jun 27, 5:59 pm, Morné Pistorius wrote: > > > > Hi all, > > > > If I create and release multipleAudioTrackobjects, theGREFcount > > > continually increases which eventually causes an application crash. > > > This small test code snipped illustrates the problem: > > > > byte[] buffer = readAudioFile( "audio.raw" ); > > > for ( int n = 0; n < 10; ++n ) > > > { > > > for ( int i = 0; i < 100; ++i ) > > > { > > > Log.v("Info", "Track " + n + "," + i ); > > > AudioTracknewTrack = newAudioTrack > > > ( AudioManager.STREAM_MUSIC, 16000, > > > > > > AudioFormat.CHANNEL_CONFIGURATION_MONO, > > > > AudioFormat.ENCODING_PCM_16BIT, > > > > buffer.length,AudioTrack.MODE_STATIC ); > > > > newTrack.write( buffer, 0, buffer.length > > > ); > > > newTrack.flush(); > > > newTrack.release(); > > > } > > > > Runtime.getRuntime().gc(); > > > } > > > > Even with a forced garbage collection, I end up with the same > > > highGREFcount at the end of the loop. In my application, I continuously > > > create AudioTracks from variable lenght buffers. I guess I can try > > > and use a fixed size pool of AudioTracks each with a buffer large > > > enough to fit my longest sound, and try and reuse them. Is there a > > > better/correct way to completely clear resources used by an > > >AudioTrack? > > > > Any help will be greatly appreciated, > > > Thanks! > > > Morne --~--~-~--~~~---~--~~ 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 close the dialog when click on the button
Hi, I want to ask about dialog. when i clicked the Ok button with setPositiveButton("Ok", listener) i need to make a validation, and when not valid i don't want the dialog to be closed. how to make the dialog not closed when click on the button? thank you --~--~-~--~~~---~--~~ 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] Can I calculate the user's moving speed by phone?
Hi all, I want to develope an application to calculate the user's moving speed by an Android phone like G1(Is it feasible on hardware?). But I don't know whether similar software exists already. If anyone know such similar application please tell me, and it will help me a lot in my design. Thank you in advance! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: copy wiped/ raw data from android to sd-card (data recovery)
Uh wait... you want to recover data after it is wiped? That is not what I was talking about, I was just pointing out a command line tool you can use on phones with root to do backup/restore of the data partition. This tool is basically just there for developers, who often need to wipe and restore their data, and has lots of issues and limitations. But if someone wants to do something like it, the code is a code example to start from. On Sun, Jul 5, 2009 at 3:31 PM, Lexi Kern wrote: > So you say it is possible. any help how to find out how i extract the wiped > internal phone storage data, although it is wiped? where can i read and > learn about this and how to do it? (i mean the details, i know of course the > tutorials and everything...) that would be s amazingly cool...! > Unrealshade > > > On Sun, Jul 5, 2009 at 8:44 PM, Dianne Hackborn wrote: > >> If you have root you can do pretty much anything. >> >> Fwiw, if you build the Cupcake platform, there is a "backup" command that >> provides very simple backup/restore when running as root. The source is >> here: >> >> >> http://android.git.kernel.org/?p=platform/system/extras.git;a=tree;f=backup >> >> >> On Sun, Jul 5, 2009 at 7:55 AM, Unrealshade wrote: >> >>> >>> if i modify my android system and obtain root, is it possible to do >>> what i want then? >>> >>> >>> On Jul 1, 5:03 pm, "Justin (Google Employee)" wrote: >>> > This is not possible without modifying the Android system. Such a >>> > process would require root access in order to either change the >>> > filesystem permissions or get around them by reading them as root. >>> > Obtaining root is not possible on retail Android configurations. >>> > >>> > Cheers, >>> > Justin >>> > Android Team @ Google >>> > >>> > On Jun 30, 12:41 pm, Unrealshade wrote: >>> > >>> > > Hello Android Developers, >>> > >>> > > I wanted to know if it is possible tocopythe raw data of the >>> > > internal phone storage to the sd-card of the phone (or to some other >>> > > device, maybe through internet/ usb/ bluetooth connection). Maybe >>> even >>> > > further, could users then read the raw data, so they can recover what >>> > > they lost? >>> > >>> > > The reason for me to ask this is that i had to wipe my G1 and read >>> > > about recovering data, but there seems to be no way - not a the >>> moment >>> > > at least. Furthermore I found that quite a lot of people didn't make >>> a >>> > > backup of their data (for whatever reason) so they can't access it >>> > > anymore and have no hope to do so, even in future, which i find >>> pretty >>> > > sad and frustrating for the user. Probably there will be even more >>> > > people who want to recover internal phone storage data as Android >>> > > grows more popular and spreads wider (which i am very sure of). >>> > > Depending on the possibilities, I possibly will try very hard to >>> write >>> > > an application or programm (if the device is connected to a computer) >>> > > to get that data back and eventually maybe even, at least parts of >>> it, >>> > > readable. >>> > >>> > > I _don't_ want to simplycopythe internal storage data, but read >>> > > _all_ the internal storage content, even if it's not used by Android >>> > > anymore because the phone has beenwiped, andcopy_that_ so the user >>> > > may be able to decrypt (if it is encrypted) the data and read his old >>> > > "erased" data (like contacts, sms, application data, calender data, >>> > > etc.). >>> > >>> > > I don't know how hard it really is, but i know it's not going to be >>> > > easy and i won't get discouraged by some people who only say "it's >>> > > impossible" or think that I am not skilled enough to do this. >>> > >>> > > So let me hear your rating for the possiblities and tips, opinions, >>> > > help, maybe there are even some people here who would like to see >>> > > something like that. >>> > >>> > > Thanks in advance, >>> > > Unrealshade >>> >>> >> >> >> -- >> 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. >> >> >> >> >> > > > > -- 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-devel
[android-developers] Re: targeting broadcasts issue
Yeah currently notifications are very much owned by the app that created them, and there is no facility for other apps to interact with them. As you say, one could imagine a way for apps to replace handling of notifications, but it's not something we have defined support for at this point. On Sun, Jul 5, 2009 at 3:42 PM, Mark Murphy wrote: > > Seer wrote: > > My understanding of intents is that the whole point of them is so that > > you can have multiple applications providing similar or the same > > functionality and that those applications become interchangable via > > intents. > > That is generally correct. > > > Now when a new sms comes in there is a notification in the > > notification bar and that notification will allow any application > > implementing the correct intent ("action view and data of sms") to be > > triggered from the notification to display the sms. > > That is true, as far as it goes. However, as near as I can tell from the > Android source code, that notification was raised by the built-in > messaging application: > > http://tinyurl.com/o4t4cl > > Since the built-in messaging application raised the notification, it has > to clear it; no other application context can do so, AFAIK. > > What you may want to do is find a way, if there is one, to arrange to > consume the SMS message yourself and put up your own notification, > rather than let the built-in messaging application handle it. > > > It makes no sense to allow developers to offer alternative > > applications via intents with the notifications and then have the > > notification never go away. > > Intents are used in more places than notifications. The notion of having > alternative applications responding to the same Intent would appear to > be aimed more at things like startActivity() than notifications. > > That being said, I can imagine there being some way to enhance Android > to allow applications who handle the Intent sent from a Notification to > be able to cancel that same Notification. > > -- > Mark Murphy (a Commons Guy) > http://commonsware.com | http://twitter.com/commonsguy > > _Android Programming Tutorials_ Version 1.0 Available! > > > > -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: code to uninstall applications
The deletePackage method is not available to third party apps. To uninstall an app you need to launch the uninstaller activity to have the user confirm what is going on. On Sat, Jul 4, 2009 at 10:43 AM, Roman wrote: > > Check out the UninstallAppProgress.java source in packages/apps/ > PackageInstaller/src/com/android/packageinstaller > > Have a look at the method and follow the flow of deletePackage. You > should be able to find out what exactly is called. > > public void initView() { >requestWindowFeature(Window.FEATURE_NO_TITLE); >setContentView(R.layout.op_progress); >//initialize views >PackageUtil.initAppSnippet(this, mAppInfo, R.id.app_snippet); >TextView installTextView = (TextView)findViewById > (R.id.center_text); >installTextView.setText(R.string.uninstalling); >final ProgressBar progressBar = (ProgressBar) findViewById > (R.id.progress_bar); >progressBar.setIndeterminate(true); >PackageDeleteObserver observer = new PackageDeleteObserver(); >getPackageManager().deletePackage(mAppInfo.packageName, > observer, 0); > } > > > -- > Roman Baumgaertner > Sr. SW Engineer-OSDC > ·T· · ·Mobile· stick together > The views, opinions and statements in this email are those of the > author solely in their individual capacity, and do not necessarily > represent those of T-Mobile USA, Inc. > > On Jul 2, 7:54 pm, aljo wrote: > > I wan't to uninstall applications using my application... I can > > retrieve the list of packages installed but I don't know how to remove > > them... I used the PackageManager class, getInstalledApplications() > > method... I can't find any method like removeApplication() or > > uninstallApplication(). > > > > the only method I saw in this class is the removePackageFromPreferred > > (String packageName) method... It retrieves a list of preferred > > packages.. I don't exactly know what preferred packages means or > > somehow how to retrieve them... I tried to put a package name in the > > method "removePackageFromPreferred (com.dev5.fivegame)" but it gives > > an error... > > > > I'm kinda new to these stuffs so pardon me for my questions... > > > -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: code to uninstall applications
tnx for your help... i'll try to see the codes... On Jul 5, 1:43 am, Roman wrote: > Check out the UninstallAppProgress.java source in packages/apps/ > PackageInstaller/src/com/android/packageinstaller > > Have a look at the method and follow the flow of deletePackage. You > should be able to find out what exactly is called. > > public void initView() { > requestWindowFeature(Window.FEATURE_NO_TITLE); > setContentView(R.layout.op_progress); > //initialize views > PackageUtil.initAppSnippet(this, mAppInfo, R.id.app_snippet); > TextView installTextView = (TextView)findViewById > (R.id.center_text); > installTextView.setText(R.string.uninstalling); > final ProgressBar progressBar = (ProgressBar) findViewById > (R.id.progress_bar); > progressBar.setIndeterminate(true); > PackageDeleteObserver observer = new PackageDeleteObserver(); > getPackageManager().deletePackage(mAppInfo.packageName, > observer, 0); > > } > > -- > Roman Baumgaertner > Sr. SW Engineer-OSDC > ·T· · ·Mobile· stick together > The views, opinions and statements in this email are those of the > author solely in their individual capacity, and do not necessarily > represent those of T-Mobile USA, Inc. > > On Jul 2, 7:54 pm, aljo wrote: > > > > > I wan't to uninstall applications using my application... I can > > retrieve the list of packages installed but I don't know how to remove > > them... I used the PackageManager class, getInstalledApplications() > > method... I can't find any method like removeApplication() or > > uninstallApplication(). > > > the only method I saw in this class is the removePackageFromPreferred > > (String packageName) method... It retrieves a list of preferred > > packages.. I don't exactly know what preferred packages means or > > somehow how to retrieve them... I tried to put a package name in the > > method "removePackageFromPreferred (com.dev5.fivegame)" but it gives > > an error... > > > I'm kinda new to these stuffs so pardon me for my questions...- Hide quoted > > text - > > - Show quoted text - --~--~-~--~~~---~--~~ 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: targeting broadcasts issue
Seer wrote: > My understanding of intents is that the whole point of them is so that > you can have multiple applications providing similar or the same > functionality and that those applications become interchangable via > intents. That is generally correct. > Now when a new sms comes in there is a notification in the > notification bar and that notification will allow any application > implementing the correct intent ("action view and data of sms") to be > triggered from the notification to display the sms. That is true, as far as it goes. However, as near as I can tell from the Android source code, that notification was raised by the built-in messaging application: http://tinyurl.com/o4t4cl Since the built-in messaging application raised the notification, it has to clear it; no other application context can do so, AFAIK. What you may want to do is find a way, if there is one, to arrange to consume the SMS message yourself and put up your own notification, rather than let the built-in messaging application handle it. > It makes no sense to allow developers to offer alternative > applications via intents with the notifications and then have the > notification never go away. Intents are used in more places than notifications. The notion of having alternative applications responding to the same Intent would appear to be aimed more at things like startActivity() than notifications. That being said, I can imagine there being some way to enhance Android to allow applications who handle the Intent sent from a Notification to be able to cancel that same Notification. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _Android Programming Tutorials_ Version 1.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 -~--~~~~--~~--~--~---
[android-developers] Re: copy wiped/ raw data from android to sd-card (data recovery)
So you say it is possible. any help how to find out how i extract the wiped internal phone storage data, although it is wiped? where can i read and learn about this and how to do it? (i mean the details, i know of course the tutorials and everything...) that would be s amazingly cool...! Unrealshade On Sun, Jul 5, 2009 at 8:44 PM, Dianne Hackborn wrote: > If you have root you can do pretty much anything. > > Fwiw, if you build the Cupcake platform, there is a "backup" command that > provides very simple backup/restore when running as root. The source is > here: > > http://android.git.kernel.org/?p=platform/system/extras.git;a=tree;f=backup > > > On Sun, Jul 5, 2009 at 7:55 AM, Unrealshade wrote: > >> >> if i modify my android system and obtain root, is it possible to do >> what i want then? >> >> >> On Jul 1, 5:03 pm, "Justin (Google Employee)" wrote: >> > This is not possible without modifying the Android system. Such a >> > process would require root access in order to either change the >> > filesystem permissions or get around them by reading them as root. >> > Obtaining root is not possible on retail Android configurations. >> > >> > Cheers, >> > Justin >> > Android Team @ Google >> > >> > On Jun 30, 12:41 pm, Unrealshade wrote: >> > >> > > Hello Android Developers, >> > >> > > I wanted to know if it is possible tocopythe raw data of the >> > > internal phone storage to the sd-card of the phone (or to some other >> > > device, maybe through internet/ usb/ bluetooth connection). Maybe even >> > > further, could users then read the raw data, so they can recover what >> > > they lost? >> > >> > > The reason for me to ask this is that i had to wipe my G1 and read >> > > about recovering data, but there seems to be no way - not a the moment >> > > at least. Furthermore I found that quite a lot of people didn't make a >> > > backup of their data (for whatever reason) so they can't access it >> > > anymore and have no hope to do so, even in future, which i find pretty >> > > sad and frustrating for the user. Probably there will be even more >> > > people who want to recover internal phone storage data as Android >> > > grows more popular and spreads wider (which i am very sure of). >> > > Depending on the possibilities, I possibly will try very hard to write >> > > an application or programm (if the device is connected to a computer) >> > > to get that data back and eventually maybe even, at least parts of it, >> > > readable. >> > >> > > I _don't_ want to simplycopythe internal storage data, but read >> > > _all_ the internal storage content, even if it's not used by Android >> > > anymore because the phone has beenwiped, andcopy_that_ so the user >> > > may be able to decrypt (if it is encrypted) the data and read his old >> > > "erased" data (like contacts, sms, application data, calender data, >> > > etc.). >> > >> > > I don't know how hard it really is, but i know it's not going to be >> > > easy and i won't get discouraged by some people who only say "it's >> > > impossible" or think that I am not skilled enough to do this. >> > >> > > So let me hear your rating for the possiblities and tips, opinions, >> > > help, maybe there are even some people here who would like to see >> > > something like that. >> > >> > > Thanks in advance, >> > > Unrealshade >> >> > > > -- > Dianne Hackborn > Android framework engineer > hack...@android.com > > Note: please don't send private questions to me, as I don't have time to > provide private support, and so won't reply to such e-mails. All such > questions should be posted on public forums, where I and others can see and > answer them. > > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: targeting broadcasts issue
Dianne, I really don't want control over the notification at all. I beleive that i am either missing something or doing something the wrong way. maybe you can tell me what i am doing wrong or know someone that could point me in the wright direction. My understanding of intents is that the whole point of them is so that you can have multiple applications providing similar or the same functionality and that those applications become interchangable via intents. Now when a new sms comes in there is a notification in the notification bar and that notification will allow any application implementing the correct intent ("action view and data of sms") to be triggered from the notification to display the sms. This part works perfectly. The issues is that when the notification trigers my application instead of the default messaging application the notification never goes away. I have marked the sms as read and done everything i can think of to try to trigger it to update the notification to either the next sms or to remove the notification. I am happy to post my code if that helps as i have to be missing something. It makes no sense to allow developers to offer alternative applications via intents with the notifications and then have the notification never go away. I mean i have clicked th notification to trigger the intent and i have marked the sms as read when my app loads the intent. Is there something else i need to do? Fire some other intent or something? This is all just an atempt to work around the issue http://code.google.com/p/android/issues/detail?id=2261. All i want to do is allow my users to send sms over the internet. The issues is why you can implement an intent for a new sms half the sms my users send are replies and since reply is built into most sms apps unless the issue above is implemented you need to write an app to view sms so that you can capture the replies hence what i am trying to do above. I really want to keep this as simple as possible as this is only a small part of my application but it is turning out to be the bigest time consumer. Chris On Jul 6, 4:49 am, Dianne Hackborn wrote: > Sorry, if you want to have control over the notification, I think you will > need to implement it yourself. I'm not an expert on the telephony APIs, but > I don't know of anywhere we have something that allows one application to > dismiss a notification owned by another. > > > > On Fri, Jul 3, 2009 at 10:56 PM, Seer wrote: > > > Then maybe you can help me as all i want to do is something very > > simple but i can't find a way to do so apart from what i am talking > > about above. > > > I have an application reading and responding to sms. It is an > > application that is an option when you click onthe standard sms > > notification that is built into the phone. The issue is while this > > trigers my application correctly and my application displays the sms > > and marks it as read the notification on the notification bar never > > goes away. To make the notification go away the use has to open the > > built in sms client and the notification goes away instantly. All i > > want to do is triger the sms notification to update and to go away if > > there are no more un read sms. Currently the only way i have found to > > do this is the end the broadcast i was talking about which get shte > > builtin sms application to check and update its notifications. > > > I don't want to have to build an notification system and get users to > > disable built in notifications etc. firstly the built in one does > > exactly what i want and second it is complicated to get users to turn > > off notifications as they normally just complain thye get 2 > > notifications. I am not implementing the sms broadcast receiver just > > the Action.View for sms and mms. > > > Does that make sense? Do you understand what i am trying to do? Is > > there a better way to get the notifications to update? > > > Chris > > > On Jul 4, 2:04 pm, Dianne Hackborn wrote: > > > Um, don't do this. Whatever you are doing this for, you can be sure it > > will > > > break in the future. > > > > On Fri, Jul 3, 2009 at 8:55 PM, Seer wrote: > > > > > Guys, > > > > I am trying to get the intent "android.intent.action.BOOT_COMPLETED" > > > > sent only to the receiver > > > > "com.android.mms.transaction.MmsSystemEventReceiver" as this triggers > > > > the sms notification to be updated and removed if there is no longer > > > > any unread sms's. The issue i have is i need to make sure the > > > > broadcast is only sent to the class above. If it goes to other > > > > receivers the phone could end up in an unknown state or something > > > > strange. > > > > > The code below does not seem to work. > > > > > Intent intent = new Intent(); > > > > intent.setAction("android.intent.action.BOOT_COMPLETED"); > > > > intent.setClassName("com.android.mms", > > > > ".transaction.MmsSystemEventReceiver"); > > > > activity.sendBroadcast(intent); > > > >
[android-developers] Re: onSaveInstanceState() normally not called ?
Does it matter when it gets called? You can be sure that it has been called if your onCreate gets called after your app got killed. Maybe onSaveInstanceState sometimes gets called at onpause without the app being actually killed, as Dianne points out, then you'll never get the data back that you saved, but does it matter? On Jul 5, 8:41 pm, Dianne Hackborn wrote: > Also onSaveInstanceState() will definitely be called when your activity is > in the foreground and you press home. In that case the activity is not > being finished, so the user may return to the same instance later (in the > same state as they left it), so onSaveInstanceState() will be called before > onPause() in case its process gets kill any time after onPause() returns. > > > > On Sun, Jul 5, 2009 at 11:25 AM, Peli wrote: > > > > onSavedInstanceState() > > > First make sure you don't have a typo, because it is called > > onSaveInstanceState(...). > > > A case where it is definitely called is when you switch orientation > > (in the G1, slide out the keyboard). > > > Then onSaveInstanceState(..) is called 100%, and onCreate(...) in the > > newly created activity contains the bundle that you stored yourself. > > (provided you let the system handle the screen orientation change). > > > Does this work? It should. > > > If you call "finish()" or press "Back", then onSaveInstanceState() is > > NOT called, because it is assumed the user finishes the activity. If > > the user opens the activity again, a fresh instance is created. > > > If you think the current directory should be the same after you press > > finish() and launch the application again, then it is NOT a candidate > > for saving in the instance state. > > > If you only want to keep the current directory when changing screen > > orientation, or being interrupted by an incoming call, then > > saveInstanceState IS the correct thing for you. > > > Peli > >www.openintents.org > > > On 5 Jul., 15:32, sasq wrote: > > > The documentation makes it sound that it would normally BE called, > > > thats why I was wondering. > > > In my case I have a second Activty that I open from the Main Activity, > > > and regardess of wether I call finish() myself or use HOME to switch > > > to another application, onSavedInstanceState() is never called. > > > > I guess saving to a SharedPreference in onPause() would fit best in my > > > case (even though I dont need it shared). > > > > On Jul 5, 12:53 pm, Mark Murphy wrote: > > > > > sasq wrote: > > > > > Am I right to assume that onSaveInstanceState() is not normally > > called > > > > > (which my logging indicates) - but only when the system is forced to > > > > > kill an Activity. > > > > > To quote the documentation: > > > > > "...for those methods that are marked as being killable, after that > > > > method returns the process hosting the activity may killed by the > > system > > > > at any time without another line of its code being executed. Because of > > > > this, you should use the onPause() method to write any persistent data > > > > (such as user edits) to storage. In addition, the method > > > > onSaveInstanceState(Bundle) is called before placing the activity in > > > > such a background state, allowing you to save away any dynamic instance > > > > state in your activity into the given Bundle, to be later received in > > > > onCreate(Bundle) if the activity needs to be re-created... Note that it > > > > is important to save persistent data in onPause() instead of > > > > onSaveInstanceState(Bundle) because the later [sic] is not part of the > > > > lifecycle callbacks, so will not be called in every situation as > > > > described in its documentation." > > > > >http://developer.android.com/reference/android/app/Activity.html > > > > > > If so, since onPause() does not receive a bundle, what is the best > > way > > > > > to save state that should be restored the next time the Activity is > > > > > created ? > > > > > A database. > > > > > Or, in an ordinary file in the application's file storage area (e.g., > > > > openFileOutput()). > > > > > Or, inside of some SharedPreferences. > > > > > Or, in "the cloud" (i.e., store it out on the Internet somewhere, if > > you > > > > have connectivity). > > > > > Or, if all you are worried about is screen rotations, use > > > > onRetainNonConfigurationInstance(). > > > > > Or, if you don't need the state to be stored on-disk, have a local > > > > Service or custom Application object hold onto it. > > > > > Which of these (and any others I didn't think of off the top of my > > head) > > > > is "best" is really up to you, based upon your application and its > > > > requirements. > > > > > -- > > > > Mark Murphy (a Commons Guy)http://commonsware.com| > >http://twitter.com/commonsguy > > > > > Warescription: Three Android Books, Plus Updates, $35/Year > > -- > Dianne Hackborn > Android framework engineer > hack...@android.com > > Note: please don't send private questions to me, as I don't have time to >
[android-developers] Re: BroadCastReceiver Alternate
If you are just writing a self-contained application -- it is all running in the same process -- then you really don't need to do anything special. Just normal Java stuff -- define a callback interface that the second activity implements, and hands to your network thread for it to call back on when it is done. On Sun, Jul 5, 2009 at 1:02 PM, riz wrote: > > hi All , > > I m exploring Android SDK for ADC2 challenge. I need to know If my > application main activity calls > intent for doing some network activity (blocking call in separate > thread ) meanwhile it starts another activity . how can I BroadCast > network response to second activity I guess through extending > BroadCastReceiver class but is there any alternate ? any interface > that should I implement ? I just need to show on top of that activity > a dialog box with Commands OK and CANCEL. > > > > -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] BroadCastReceiver Alternate
hi All , I m exploring Android SDK for ADC2 challenge. I need to know If my application main activity calls intent for doing some network activity (blocking call in separate thread ) meanwhile it starts another activity . how can I BroadCast network response to second activity I guess through extending BroadCastReceiver class but is there any alternate ? any interface that should I implement ? I just need to show on top of that activity a dialog box with Commands OK and CANCEL. --~--~-~--~~~---~--~~ 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: Installing USB drivers on Vista 64 bit
mine says that sometimes but it still works anyways... On Jul 5, 8:50 am, "jrgraf...@googlemail.com" wrote: > Hey all, > > I am currently having issues installing my G1 in development mode on > Vista 64 Premium SP1. I have tried both installing the drivers that > come with the latest SDK and also the ones > here:http://forum.xda-developers.com/showthread.php?t=446274. > > Whenever I plug the phone in it comes up as an unknown USB device > under device manger. When I go to update driver and point the > installer at the correct driver location it either says 'the device > driver is up to date' or when using the have disk option it says 'the > folder specified does not contain a compatible software driver for > your device'. > > Any help would be really appreciated - I have been hitting Google for > about 2 hours now! > > Cheers, > > -James --~--~-~--~~~---~--~~ 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: copy wiped/ raw data from android to sd-card (data recovery)
If you have root you can do pretty much anything. Fwiw, if you build the Cupcake platform, there is a "backup" command that provides very simple backup/restore when running as root. The source is here: http://android.git.kernel.org/?p=platform/system/extras.git;a=tree;f=backup On Sun, Jul 5, 2009 at 7:55 AM, Unrealshade wrote: > > if i modify my android system and obtain root, is it possible to do > what i want then? > > > On Jul 1, 5:03 pm, "Justin (Google Employee)" wrote: > > This is not possible without modifying the Android system. Such a > > process would require root access in order to either change the > > filesystem permissions or get around them by reading them as root. > > Obtaining root is not possible on retail Android configurations. > > > > Cheers, > > Justin > > Android Team @ Google > > > > On Jun 30, 12:41 pm, Unrealshade wrote: > > > > > Hello Android Developers, > > > > > I wanted to know if it is possible tocopythe raw data of the > > > internal phone storage to the sd-card of the phone (or to some other > > > device, maybe through internet/ usb/ bluetooth connection). Maybe even > > > further, could users then read the raw data, so they can recover what > > > they lost? > > > > > The reason for me to ask this is that i had to wipe my G1 and read > > > about recovering data, but there seems to be no way - not a the moment > > > at least. Furthermore I found that quite a lot of people didn't make a > > > backup of their data (for whatever reason) so they can't access it > > > anymore and have no hope to do so, even in future, which i find pretty > > > sad and frustrating for the user. Probably there will be even more > > > people who want to recover internal phone storage data as Android > > > grows more popular and spreads wider (which i am very sure of). > > > Depending on the possibilities, I possibly will try very hard to write > > > an application or programm (if the device is connected to a computer) > > > to get that data back and eventually maybe even, at least parts of it, > > > readable. > > > > > I _don't_ want to simplycopythe internal storage data, but read > > > _all_ the internal storage content, even if it's not used by Android > > > anymore because the phone has beenwiped, andcopy_that_ so the user > > > may be able to decrypt (if it is encrypted) the data and read his old > > > "erased" data (like contacts, sms, application data, calender data, > > > etc.). > > > > > I don't know how hard it really is, but i know it's not going to be > > > easy and i won't get discouraged by some people who only say "it's > > > impossible" or think that I am not skilled enough to do this. > > > > > So let me hear your rating for the possiblities and tips, opinions, > > > help, maybe there are even some people here who would like to see > > > something like that. > > > > > Thanks in advance, > > > Unrealshade > > > -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: targeting broadcasts issue
Sorry, if you want to have control over the notification, I think you will need to implement it yourself. I'm not an expert on the telephony APIs, but I don't know of anywhere we have something that allows one application to dismiss a notification owned by another. On Fri, Jul 3, 2009 at 10:56 PM, Seer wrote: > > Then maybe you can help me as all i want to do is something very > simple but i can't find a way to do so apart from what i am talking > about above. > > I have an application reading and responding to sms. It is an > application that is an option when you click onthe standard sms > notification that is built into the phone. The issue is while this > trigers my application correctly and my application displays the sms > and marks it as read the notification on the notification bar never > goes away. To make the notification go away the use has to open the > built in sms client and the notification goes away instantly. All i > want to do is triger the sms notification to update and to go away if > there are no more un read sms. Currently the only way i have found to > do this is the end the broadcast i was talking about which get shte > builtin sms application to check and update its notifications. > > I don't want to have to build an notification system and get users to > disable built in notifications etc. firstly the built in one does > exactly what i want and second it is complicated to get users to turn > off notifications as they normally just complain thye get 2 > notifications. I am not implementing the sms broadcast receiver just > the Action.View for sms and mms. > > Does that make sense? Do you understand what i am trying to do? Is > there a better way to get the notifications to update? > > Chris > > > On Jul 4, 2:04 pm, Dianne Hackborn wrote: > > Um, don't do this. Whatever you are doing this for, you can be sure it > will > > break in the future. > > > > > > > > On Fri, Jul 3, 2009 at 8:55 PM, Seer wrote: > > > > > Guys, > > > I am trying to get the intent "android.intent.action.BOOT_COMPLETED" > > > sent only to the receiver > > > "com.android.mms.transaction.MmsSystemEventReceiver" as this triggers > > > the sms notification to be updated and removed if there is no longer > > > any unread sms's. The issue i have is i need to make sure the > > > broadcast is only sent to the class above. If it goes to other > > > receivers the phone could end up in an unknown state or something > > > strange. > > > > > The code below does not seem to work. > > > > > Intent intent = new Intent(); > > > intent.setAction("android.intent.action.BOOT_COMPLETED"); > > > intent.setClassName("com.android.mms", > > > ".transaction.MmsSystemEventReceiver"); > > > activity.sendBroadcast(intent); > > > > > This code does work but since it goes to all receivers i have noticed > > > some errors starting to show up in logs etc. > > > Intent intent = new Intent(); > > > intent.setAction("android.intent.action.BOOT_COMPLETED"); > > > activity.sendBroadcast(intent); > > > > > Chris > > > > -- > > 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. > > > -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Surface to Native
They are not using the SDK. This is a forum for discussing the SDK. If you are doing device development/customization work so not developing against the SDK, android-porting is the best place to ask questions. On Fri, Jul 3, 2009 at 11:07 PM, scs sek wrote: > Hey, > > How is the existing applications passing surface to their native libs? > > Example Media Player or recorder Java Application to Opencore? > > On Sat, Jul 4, 2009 at 9:38 AM, Dianne Hackborn wrote: > >> Sorry, there is currently no API in the NDK for working with surfaces. >> >> >> On Fri, Jul 3, 2009 at 12:08 PM, scs sek wrote: >> >>> Hi, >>> >>> I try to pass the surface which is created by Java Application to my >>> native lib. >>> While transferring at JNI layer >>> >>> When i use the GetIntField fundtion to get the surface object >>> (GetISurface) function, the object passed by app is becoimg null. >>> >>> Any suggestion is welcome. >>> >>> Thanks & Regards >>> SCSSEK >>> >>> >>> >>> >> >> >> -- >> 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. >> >> >> >> > > > > -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: onSaveInstanceState() normally not called ?
Also onSaveInstanceState() will definitely be called when your activity is in the foreground and you press home. In that case the activity is not being finished, so the user may return to the same instance later (in the same state as they left it), so onSaveInstanceState() will be called before onPause() in case its process gets kill any time after onPause() returns. On Sun, Jul 5, 2009 at 11:25 AM, Peli wrote: > > > onSavedInstanceState() > > First make sure you don't have a typo, because it is called > onSaveInstanceState(...). > > A case where it is definitely called is when you switch orientation > (in the G1, slide out the keyboard). > > Then onSaveInstanceState(..) is called 100%, and onCreate(...) in the > newly created activity contains the bundle that you stored yourself. > (provided you let the system handle the screen orientation change). > > Does this work? It should. > > If you call "finish()" or press "Back", then onSaveInstanceState() is > NOT called, because it is assumed the user finishes the activity. If > the user opens the activity again, a fresh instance is created. > > If you think the current directory should be the same after you press > finish() and launch the application again, then it is NOT a candidate > for saving in the instance state. > > If you only want to keep the current directory when changing screen > orientation, or being interrupted by an incoming call, then > saveInstanceState IS the correct thing for you. > > Peli > www.openintents.org > > On 5 Jul., 15:32, sasq wrote: > > The documentation makes it sound that it would normally BE called, > > thats why I was wondering. > > In my case I have a second Activty that I open from the Main Activity, > > and regardess of wether I call finish() myself or use HOME to switch > > to another application, onSavedInstanceState() is never called. > > > > I guess saving to a SharedPreference in onPause() would fit best in my > > case (even though I dont need it shared). > > > > On Jul 5, 12:53 pm, Mark Murphy wrote: > > > > > > > > > sasq wrote: > > > > Am I right to assume that onSaveInstanceState() is not normally > called > > > > (which my logging indicates) - but only when the system is forced to > > > > kill an Activity. > > > > > To quote the documentation: > > > > > "...for those methods that are marked as being killable, after that > > > method returns the process hosting the activity may killed by the > system > > > at any time without another line of its code being executed. Because of > > > this, you should use the onPause() method to write any persistent data > > > (such as user edits) to storage. In addition, the method > > > onSaveInstanceState(Bundle) is called before placing the activity in > > > such a background state, allowing you to save away any dynamic instance > > > state in your activity into the given Bundle, to be later received in > > > onCreate(Bundle) if the activity needs to be re-created... Note that it > > > is important to save persistent data in onPause() instead of > > > onSaveInstanceState(Bundle) because the later [sic] is not part of the > > > lifecycle callbacks, so will not be called in every situation as > > > described in its documentation." > > > > >http://developer.android.com/reference/android/app/Activity.html > > > > > > If so, since onPause() does not receive a bundle, what is the best > way > > > > to save state that should be restored the next time the Activity is > > > > created ? > > > > > A database. > > > > > Or, in an ordinary file in the application's file storage area (e.g., > > > openFileOutput()). > > > > > Or, inside of some SharedPreferences. > > > > > Or, in "the cloud" (i.e., store it out on the Internet somewhere, if > you > > > have connectivity). > > > > > Or, if all you are worried about is screen rotations, use > > > onRetainNonConfigurationInstance(). > > > > > Or, if you don't need the state to be stored on-disk, have a local > > > Service or custom Application object hold onto it. > > > > > Which of these (and any others I didn't think of off the top of my > head) > > > is "best" is really up to you, based upon your application and its > > > requirements. > > > > > -- > > > Mark Murphy (a Commons Guy)http://commonsware.com| > http://twitter.com/commonsguy > > > > > Warescription: Three Android Books, Plus Updates, $35/Year > > > -- 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 opt
[android-developers] Re: onSaveInstanceState() normally not called ?
> onSavedInstanceState() First make sure you don't have a typo, because it is called onSaveInstanceState(...). A case where it is definitely called is when you switch orientation (in the G1, slide out the keyboard). Then onSaveInstanceState(..) is called 100%, and onCreate(...) in the newly created activity contains the bundle that you stored yourself. (provided you let the system handle the screen orientation change). Does this work? It should. If you call "finish()" or press "Back", then onSaveInstanceState() is NOT called, because it is assumed the user finishes the activity. If the user opens the activity again, a fresh instance is created. If you think the current directory should be the same after you press finish() and launch the application again, then it is NOT a candidate for saving in the instance state. If you only want to keep the current directory when changing screen orientation, or being interrupted by an incoming call, then saveInstanceState IS the correct thing for you. Peli www.openintents.org On 5 Jul., 15:32, sasq wrote: > The documentation makes it sound that it would normally BE called, > thats why I was wondering. > In my case I have a second Activty that I open from the Main Activity, > and regardess of wether I call finish() myself or use HOME to switch > to another application, onSavedInstanceState() is never called. > > I guess saving to a SharedPreference in onPause() would fit best in my > case (even though I dont need it shared). > > On Jul 5, 12:53 pm, Mark Murphy wrote: > > > > > sasq wrote: > > > Am I right to assume that onSaveInstanceState() is not normally called > > > (which my logging indicates) - but only when the system is forced to > > > kill an Activity. > > > To quote the documentation: > > > "...for those methods that are marked as being killable, after that > > method returns the process hosting the activity may killed by the system > > at any time without another line of its code being executed. Because of > > this, you should use the onPause() method to write any persistent data > > (such as user edits) to storage. In addition, the method > > onSaveInstanceState(Bundle) is called before placing the activity in > > such a background state, allowing you to save away any dynamic instance > > state in your activity into the given Bundle, to be later received in > > onCreate(Bundle) if the activity needs to be re-created... Note that it > > is important to save persistent data in onPause() instead of > > onSaveInstanceState(Bundle) because the later [sic] is not part of the > > lifecycle callbacks, so will not be called in every situation as > > described in its documentation." > > >http://developer.android.com/reference/android/app/Activity.html > > > > If so, since onPause() does not receive a bundle, what is the best way > > > to save state that should be restored the next time the Activity is > > > created ? > > > A database. > > > Or, in an ordinary file in the application's file storage area (e.g., > > openFileOutput()). > > > Or, inside of some SharedPreferences. > > > Or, in "the cloud" (i.e., store it out on the Internet somewhere, if you > > have connectivity). > > > Or, if all you are worried about is screen rotations, use > > onRetainNonConfigurationInstance(). > > > Or, if you don't need the state to be stored on-disk, have a local > > Service or custom Application object hold onto it. > > > Which of these (and any others I didn't think of off the top of my head) > > is "best" is really up to you, based upon your application and its > > requirements. > > > -- > > 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.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: copy wiped/ raw data from android to sd-card (data recovery)
if i modify my android system and obtain root, is it possible to do what i want then? On Jul 1, 5:03 pm, "Justin (Google Employee)" wrote: > This is not possible without modifying the Android system. Such a > process would require root access in order to either change the > filesystem permissions or get around them by reading them as root. > Obtaining root is not possible on retail Android configurations. > > Cheers, > Justin > Android Team @ Google > > On Jun 30, 12:41 pm, Unrealshade wrote: > > > Hello Android Developers, > > > I wanted to know if it is possible tocopythe raw data of the > > internal phone storage to the sd-card of the phone (or to some other > > device, maybe through internet/ usb/ bluetooth connection). Maybe even > > further, could users then read the raw data, so they can recover what > > they lost? > > > The reason for me to ask this is that i had to wipe my G1 and read > > about recovering data, but there seems to be no way - not a the moment > > at least. Furthermore I found that quite a lot of people didn't make a > > backup of their data (for whatever reason) so they can't access it > > anymore and have no hope to do so, even in future, which i find pretty > > sad and frustrating for the user. Probably there will be even more > > people who want to recover internal phone storage data as Android > > grows more popular and spreads wider (which i am very sure of). > > Depending on the possibilities, I possibly will try very hard to write > > an application or programm (if the device is connected to a computer) > > to get that data back and eventually maybe even, at least parts of it, > > readable. > > > I _don't_ want to simplycopythe internal storage data, but read > > _all_ the internal storage content, even if it's not used by Android > > anymore because the phone has beenwiped, andcopy_that_ so the user > > may be able to decrypt (if it is encrypted) the data and read his old > > "erased" data (like contacts, sms, application data, calender data, > > etc.). > > > I don't know how hard it really is, but i know it's not going to be > > easy and i won't get discouraged by some people who only say "it's > > impossible" or think that I am not skilled enough to do this. > > > So let me hear your rating for the possiblities and tips, opinions, > > help, maybe there are even some people here who would like to see > > something like that. > > > Thanks in advance, > > Unrealshade --~--~-~--~~~---~--~~ 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] Installing USB drivers on Vista 64 bit
Hey all, I am currently having issues installing my G1 in development mode on Vista 64 Premium SP1. I have tried both installing the drivers that come with the latest SDK and also the ones here: http://forum.xda-developers.com/showthread.php?t=446274. Whenever I plug the phone in it comes up as an unknown USB device under device manger. When I go to update driver and point the installer at the correct driver location it either says 'the device driver is up to date' or when using the have disk option it says 'the folder specified does not contain a compatible software driver for your device'. Any help would be really appreciated - I have been hitting Google for about 2 hours now! Cheers, -James --~--~-~--~~~---~--~~ 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: onSaveInstanceState() normally not called ?
Although that seems pretty overkill for just saving the current directory... On Jul 5, 3:32 pm, sasq wrote: > The documentation makes it sound that it would normally BE called, > thats why I was wondering. > In my case I have a second Activty that I open from the Main Activity, > and regardess of wether I call finish() myself or use HOME to switch > to another application, onSavedInstanceState() is never called. > > I guess saving to a SharedPreference in onPause() would fit best in my > case (even though I dont need it shared). > > On Jul 5, 12:53 pm, Mark Murphy wrote: > > > sasq wrote: > > > Am I right to assume that onSaveInstanceState() is not normally called > > > (which my logging indicates) - but only when the system is forced to > > > kill an Activity. > > > To quote the documentation: > > > "...for those methods that are marked as being killable, after that > > method returns the process hosting the activity may killed by the system > > at any time without another line of its code being executed. Because of > > this, you should use the onPause() method to write any persistent data > > (such as user edits) to storage. In addition, the method > > onSaveInstanceState(Bundle) is called before placing the activity in > > such a background state, allowing you to save away any dynamic instance > > state in your activity into the given Bundle, to be later received in > > onCreate(Bundle) if the activity needs to be re-created... Note that it > > is important to save persistent data in onPause() instead of > > onSaveInstanceState(Bundle) because the later [sic] is not part of the > > lifecycle callbacks, so will not be called in every situation as > > described in its documentation." > > >http://developer.android.com/reference/android/app/Activity.html > > > > If so, since onPause() does not receive a bundle, what is the best way > > > to save state that should be restored the next time the Activity is > > > created ? > > > A database. > > > Or, in an ordinary file in the application's file storage area (e.g., > > openFileOutput()). > > > Or, inside of some SharedPreferences. > > > Or, in "the cloud" (i.e., store it out on the Internet somewhere, if you > > have connectivity). > > > Or, if all you are worried about is screen rotations, use > > onRetainNonConfigurationInstance(). > > > Or, if you don't need the state to be stored on-disk, have a local > > Service or custom Application object hold onto it. > > > Which of these (and any others I didn't think of off the top of my head) > > is "best" is really up to you, based upon your application and its > > requirements. > > > -- > > 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.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: onSaveInstanceState() normally not called ?
sasq wrote: > In my case I have a second Activty that I open from the Main Activity, > and regardess of wether I call finish() myself or use HOME to switch > to another application, onSavedInstanceState() is never called. It won't necessarily be called in either of those cases. In particular, in the case of pressing HOME, your activity is still running and hasn't gone anywhere, except being paused and stopped since it is no longer on-screen. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _Android Programming Tutorials_ Version 1.0 In Print! --~--~-~--~~~---~--~~ 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: onSaveInstanceState() normally not called ?
The documentation makes it sound that it would normally BE called, thats why I was wondering. In my case I have a second Activty that I open from the Main Activity, and regardess of wether I call finish() myself or use HOME to switch to another application, onSavedInstanceState() is never called. I guess saving to a SharedPreference in onPause() would fit best in my case (even though I dont need it shared). On Jul 5, 12:53 pm, Mark Murphy wrote: > sasq wrote: > > Am I right to assume that onSaveInstanceState() is not normally called > > (which my logging indicates) - but only when the system is forced to > > kill an Activity. > > To quote the documentation: > > "...for those methods that are marked as being killable, after that > method returns the process hosting the activity may killed by the system > at any time without another line of its code being executed. Because of > this, you should use the onPause() method to write any persistent data > (such as user edits) to storage. In addition, the method > onSaveInstanceState(Bundle) is called before placing the activity in > such a background state, allowing you to save away any dynamic instance > state in your activity into the given Bundle, to be later received in > onCreate(Bundle) if the activity needs to be re-created... Note that it > is important to save persistent data in onPause() instead of > onSaveInstanceState(Bundle) because the later [sic] is not part of the > lifecycle callbacks, so will not be called in every situation as > described in its documentation." > > http://developer.android.com/reference/android/app/Activity.html > > > If so, since onPause() does not receive a bundle, what is the best way > > to save state that should be restored the next time the Activity is > > created ? > > A database. > > Or, in an ordinary file in the application's file storage area (e.g., > openFileOutput()). > > Or, inside of some SharedPreferences. > > Or, in "the cloud" (i.e., store it out on the Internet somewhere, if you > have connectivity). > > Or, if all you are worried about is screen rotations, use > onRetainNonConfigurationInstance(). > > Or, if you don't need the state to be stored on-disk, have a local > Service or custom Application object hold onto it. > > Which of these (and any others I didn't think of off the top of my head) > is "best" is really up to you, based upon your application and its > requirements. > > -- > 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.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: traceview on 64bit computer
For the 64bits SWT, make sure you download the right file from here: http://download.eclipse.org/eclipse/downloads/drops/R-3.4.2-200902111700/index.php#swt On Jul 5, 1:40 pm, Christine wrote: > Thanks. > > Actually, I found another solution. In the android_sdk tools/lib > directory I replaced swt.jar by the64bits version of swt.jar. Then, > there's 4 .so files in that directory with the number 3236 in it (that > depends on the version of swt that's included in the distribution, > different versions of the sdk may have files with different numbers). > Replace those by the same files with the number 3448 in it - again, a > different version of SWT may have a different number. Make sure it's > the files from the64bits SWT. These files are in the SWT.jar. > > SWT.jar can be downloaded fromwww.eclipse.org/swt. > > On Jul 5, 1:50 am, Jeff Boody wrote: > > > To maketraceviewwork on64-bit Ubuntu > > 1) sudo apt-get install ia32-sun-java6-bin > > 2) Determine the path of the ia32-sun-java6-bin java binary > > > update-java-alternatives -l > > > 3) Replace javaCmd="java" in > > android-sdk-linux_x86-/tools/traceviewwith the following > > > # javaCmd="java" > > javaCmd="/usr/lib/jvm/ia32-java-6-sun/bin/java" > > > --Jeff --~--~-~--~~~---~--~~ 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: traceview on 64bit computer
For the 64bits SWT, make sure you download the right file from here: http://download.eclipse.org/eclipse/downloads/drops/R-3.4.2-200902111700/index.php#swt On Jul 5, 1:40 pm, Christine wrote: > Thanks. > > Actually, I found another solution. In the android_sdk tools/lib > directory I replaced swt.jar by the64bits version of swt.jar. Then, > there's 4 .so files in that directory with the number 3236 in it (that > depends on the version of swt that's included in the distribution, > different versions of the sdk may have files with different numbers). > Replace those by the same files with the number 3448 in it - again, a > different version of SWT may have a different number. Make sure it's > the files from the64bits SWT. These files are in the SWT.jar. > > SWT.jar can be downloaded fromwww.eclipse.org/swt. > > On Jul 5, 1:50 am, Jeff Boody wrote: > > > To maketraceviewwork on64-bit Ubuntu > > 1) sudo apt-get install ia32-sun-java6-bin > > 2) Determine the path of the ia32-sun-java6-bin java binary > > > update-java-alternatives -l > > > 3) Replace javaCmd="java" in > > android-sdk-linux_x86-/tools/traceviewwith the following > > > # javaCmd="java" > > javaCmd="/usr/lib/jvm/ia32-java-6-sun/bin/java" > > > --Jeff --~--~-~--~~~---~--~~ 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: traceview on 64bit computer
For the 64bits SWT, make sure you download the right file from here: http://download.eclipse.org/eclipse/downloads/drops/R-3.4.2-200902111700/index.php#swt On Jul 5, 1:40 pm, Christine wrote: > Thanks. > > Actually, I found another solution. In the android_sdk tools/lib > directory I replaced swt.jar by the64bits version of swt.jar. Then, > there's 4 .so files in that directory with the number 3236 in it (that > depends on the version of swt that's included in the distribution, > different versions of the sdk may have files with different numbers). > Replace those by the same files with the number 3448 in it - again, a > different version of SWT may have a different number. Make sure it's > the files from the64bits SWT. These files are in the SWT.jar. > > SWT.jar can be downloaded fromwww.eclipse.org/swt. > > On Jul 5, 1:50 am, Jeff Boody wrote: > > > To maketraceviewwork on64-bit Ubuntu > > 1) sudo apt-get install ia32-sun-java6-bin > > 2) Determine the path of the ia32-sun-java6-bin java binary > > > update-java-alternatives -l > > > 3) Replace javaCmd="java" in > > android-sdk-linux_x86-/tools/traceviewwith the following > > > # javaCmd="java" > > javaCmd="/usr/lib/jvm/ia32-java-6-sun/bin/java" > > > --Jeff --~--~-~--~~~---~--~~ 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: traceview on 64bit computer
For the 64bits SWT, make sure you download the right file from here: http://download.eclipse.org/eclipse/downloads/drops/R-3.4.2-200902111700/index.php#swt On Jul 5, 1:40 pm, Christine wrote: > Thanks. > > Actually, I found another solution. In the android_sdk tools/lib > directory I replaced swt.jar by the64bits version of swt.jar. Then, > there's 4 .so files in that directory with the number 3236 in it (that > depends on the version of swt that's included in the distribution, > different versions of the sdk may have files with different numbers). > Replace those by the same files with the number 3448 in it - again, a > different version of SWT may have a different number. Make sure it's > the files from the64bits SWT. These files are in the SWT.jar. > > SWT.jar can be downloaded fromwww.eclipse.org/swt. > > On Jul 5, 1:50 am, Jeff Boody wrote: > > > To maketraceviewwork on64-bit Ubuntu > > 1) sudo apt-get install ia32-sun-java6-bin > > 2) Determine the path of the ia32-sun-java6-bin java binary > > > update-java-alternatives -l > > > 3) Replace javaCmd="java" in > > android-sdk-linux_x86-/tools/traceviewwith the following > > > # javaCmd="java" > > javaCmd="/usr/lib/jvm/ia32-java-6-sun/bin/java" > > > --Jeff --~--~-~--~~~---~--~~ 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: traceview on 64bit computer
For the 64bits SWT, make sure you download the right file from here: http://download.eclipse.org/eclipse/downloads/drops/R-3.4.2-200902111700/index.php#swt On Jul 5, 1:40 pm, Christine wrote: > Thanks. > > Actually, I found another solution. In the android_sdk tools/lib > directory I replaced swt.jar by the64bits version of swt.jar. Then, > there's 4 .so files in that directory with the number 3236 in it (that > depends on the version of swt that's included in the distribution, > different versions of the sdk may have files with different numbers). > Replace those by the same files with the number 3448 in it - again, a > different version of SWT may have a different number. Make sure it's > the files from the64bits SWT. These files are in the SWT.jar. > > SWT.jar can be downloaded fromwww.eclipse.org/swt. > > On Jul 5, 1:50 am, Jeff Boody wrote: > > > To maketraceviewwork on64-bit Ubuntu > > 1) sudo apt-get install ia32-sun-java6-bin > > 2) Determine the path of the ia32-sun-java6-bin java binary > > > update-java-alternatives -l > > > 3) Replace javaCmd="java" in > > android-sdk-linux_x86-/tools/traceviewwith the following > > > # javaCmd="java" > > javaCmd="/usr/lib/jvm/ia32-java-6-sun/bin/java" > > > --Jeff --~--~-~--~~~---~--~~ 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: traceview on 64bit computer
Thanks. Actually, I found another solution. In the android_sdk tools/lib directory I replaced swt.jar by the 64 bits version of swt.jar. Then, there's 4 .so files in that directory with the number 3236 in it (that depends on the version of swt that's included in the distribution, different versions of the sdk may have files with different numbers). Replace those by the same files with the number 3448 in it - again, a different version of SWT may have a different number. Make sure it's the files from the 64 bits SWT. These files are in the SWT.jar. SWT.jar can be downloaded from www.eclipse.org/swt. On Jul 5, 1:50 am, Jeff Boody wrote: > To maketraceviewwork on64-bit Ubuntu > 1) sudo apt-get install ia32-sun-java6-bin > 2) Determine the path of the ia32-sun-java6-bin java binary > > update-java-alternatives -l > > 3) Replace javaCmd="java" in > android-sdk-linux_x86-/tools/traceviewwith the following > > # javaCmd="java" > javaCmd="/usr/lib/jvm/ia32-java-6-sun/bin/java" > > --Jeff --~--~-~--~~~---~--~~ 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: Widget Unresponsive after Opening/Closing
I had the same problem. Jeff's solution worked for me. Thanks! On Jun 17, 1:27 am, Jeff Sharkey wrote: > Are you sending a full RemoteViews update each time? (The AppWidget > framework only keeps the last RemoteViews sent, and reapplies it when > needed, such as after a screen rotation.) > > For example, if you only set the PendingIntent once, and have a second > RemoteViews update that doesn't include it, the PendingIntent will be > lost when the screen is rotated. > > j > > On Tue, Jun 16, 2009 at 10:16 AM, d2dadd wrote: > > > I have a widget button that responds to user's clicks. My design is to > > assign the click event handler to calling a service in OnUpdate. It > > works fine when first created, but it stops responding after user has > > opened and closed the keyboard. How to fix this? > > Many thanks. > > -- > Jeff Sharkey > jshar...@android.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Received SMS in different language
far as i know, non-latin languages (such as Arabic) are not yet supported, i think you will have to wait for google's next updates. --~--~-~--~~~---~--~~ 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: traceview on 64bit computer
Thanks. Actually, I found another solution. In the android_sdk tools/lib directory I replaced swt.jar by the 64 bits version of swt.jar. Then, there's 4 .so files in that directory with the number 3236 in it (that depends on the version of swt that's included in the distribution, different versions of the sdk may have files with different numbers). Replace those by the same files with the number 3448 in it - again, a different version of SWT may have a different number. Make sure it's the files from the 64 bits SWT. These files are in the SWT.jar. SWT.jar can be downloaded from www.eclipse.org/swt. On Jul 5, 1:50 am, Jeff Boody wrote: > To maketraceviewwork on64-bit Ubuntu > 1) sudo apt-get install ia32-sun-java6-bin > 2) Determine the path of the ia32-sun-java6-bin java binary > > update-java-alternatives -l > > 3) Replace javaCmd="java" in > android-sdk-linux_x86-/tools/traceviewwith the following > > # javaCmd="java" > javaCmd="/usr/lib/jvm/ia32-java-6-sun/bin/java" > > --Jeff --~--~-~--~~~---~--~~ 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: onSaveInstanceState() normally not called ?
sasq wrote: > Am I right to assume that onSaveInstanceState() is not normally called > (which my logging indicates) - but only when the system is forced to > kill an Activity. To quote the documentation: "...for those methods that are marked as being killable, after that method returns the process hosting the activity may killed by the system at any time without another line of its code being executed. Because of this, you should use the onPause() method to write any persistent data (such as user edits) to storage. In addition, the method onSaveInstanceState(Bundle) is called before placing the activity in such a background state, allowing you to save away any dynamic instance state in your activity into the given Bundle, to be later received in onCreate(Bundle) if the activity needs to be re-created... Note that it is important to save persistent data in onPause() instead of onSaveInstanceState(Bundle) because the later [sic] is not part of the lifecycle callbacks, so will not be called in every situation as described in its documentation." http://developer.android.com/reference/android/app/Activity.html > If so, since onPause() does not receive a bundle, what is the best way > to save state that should be restored the next time the Activity is > created ? A database. Or, in an ordinary file in the application's file storage area (e.g., openFileOutput()). Or, inside of some SharedPreferences. Or, in "the cloud" (i.e., store it out on the Internet somewhere, if you have connectivity). Or, if all you are worried about is screen rotations, use onRetainNonConfigurationInstance(). Or, if you don't need the state to be stored on-disk, have a local Service or custom Application object hold onto it. Which of these (and any others I didn't think of off the top of my head) is "best" is really up to you, based upon your application and its requirements. -- 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.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] onSaveInstanceState() normally not called ?
Am I right to assume that onSaveInstanceState() is not normally called (which my logging indicates) - but only when the system is forced to kill an Activity. If so, since onPause() does not receive a bundle, what is the best way to save state that should be restored the next time the Activity is created ? --~--~-~--~~~---~--~~ 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: Questions on applications and how applications are to follow hardware limitations?
Thanks Mark for the answer. I posted my reply on Android Discuss too, but it haven't got in yet. Zod. On Jul 4, 8:41 pm, Mark Murphy wrote: > Zod wrote: > > I have a somewhat related question. > > I posted a reply over on [android-discuss], since this is not really a > question of how to use the Android SDK: > > http://groups.google.com/group/android-discuss/t/fdeeb01723432310 > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://twitter.com/commonsguy > > Need help for your Android OSS project?http://wiki.andmob.org/hado --~--~-~--~~~---~--~~ 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: switch between GPS and Networkprovider
Hi! If you want to monitor the availability of GPS signals you have to have a Listener constantly on the GPS_PROVIDER for status changes and set and remove a different NETWORK_PROVIDER listener on those changes, otherwise you won't get notified if gps signal is available again. However you have to solve data passing and synchronization between the two LocationListeners somehow. If you need further help you can contact me in private. Zod. On Jul 5, 12:56 am, mnish wrote: > Hi, > > I wanted to know how to switch beteen GPS and Network providers. > > Iam now busy with making a program that shows the location of the > phone holder on the google map. I want to make use of both the GPS > provider and the network provider. I prefer using gps. When gps is not > temporarily unavailable then the program chooses for the network > provider. But when the gps is available again I want the program to > use the gps again. > > At this moment my program is only able to switch to network provider > when gps is not available but it cant check whether gps is back again. > here is how it is done: > > @Override > public void onStatusChanged(String provider, int status, > Bundle b) { > if (status == LocationProvider.OUT_OF_SERVICE) { > > lm.requestLocationUpdates > (LocationManager.NETWORK_PROVIDER, > mInterval, 0, this); > > } > > else if(status == > LocationProvider.TEMPORARILY_UNAVAILABLE){ > > lm.requestLocationUpdates > (LocationManager.NETWORK_PROVIDER, > mInterval, 0, this); > } > } > > Could someone please tell me how to check the status of the gps while > the location manager is using the Network provider? > > thank you --~--~-~--~~~---~--~~ 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: Use own map layer in Google Maps
Hi John, After trying it in Chrome, I don't see an error. And that is exactly what I am looking for! Thanks, JP On 24 Jun., 06:09, "Maps.Huge.Info (Maps API Guru)" wrote: > What JavaScript error do you see? I get none. This is aMapsv3 demo > app, it should work well with any modern browser. > > The v3 API doesn't have a tilelayeryet but it does have an overlay > method. I wrote the one used in the demo. It handles whole image > overlays so if you can create a single image that contains all your > data then it works well. The v2 API has tile overlays which may work > better for your application. The v3 api is smaller and faster, better > for mobile apps. > > -John Coryat > > On Jun 23, 5:25 pm, JP wrote: > > > > > Hi John, > > > Thanks for your reply. Gonna look into that tomorrow for sure! > > > In your example you have added a point to themap, and I also get a > > javascript error. I am interested in adding a shape. Kind of like > > this: > > >http://www.weather.com/maps/activity/garden/index_large.html > > > I was trying to find a temperaturemap, but this will do ;-). There > > are shapes in red, yellow and green, and I have a similarmapwith a > > rating Iuse. I want to know which chape I am currently in. > > > But thanks for the pointer, I will look into it! > > > JP --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---