[android-developers] How to switch an Android TV in Bluetooth LE center mode ?
Hello I'd like to develop an app for Android TV that could control Bluetooth LE peripherals. Do you know if an Android TV can be used as a BLE center ? Are Android TVs in peripheral mode by default ? If yes, is it possible to switch an Android TV into center mode programmatically ? Best regards Mathias -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. To post to this group, send email to android-developers@googlegroups.com. Visit this group at https://groups.google.com/group/android-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/android-developers/2805e114-096c-465d-80ab-7f6a02e3b254%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[android-developers] Re: Pls help android webview isHardwareAccelerated() always false
Here is on SOF a question similar to yours : https://stackoverflow.com/questions/12119753/view-ishardwareaccelerated-is-always-false Le mercredi 7 mars 2018 03:45:01 UTC+1, Nero Gan a écrit : > > my android webview isHardwareAccelerated() always return false, and i had > make application, activity ,layer level all hardwaredaccerated . But it > still return fale > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. To post to this group, send email to android-developers@googlegroups.com. Visit this group at https://groups.google.com/group/android-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/android-developers/8fbfbf29-ac5e-4ed3-9221-c1be63203afa%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[android-developers] Re: Give a review as a beta tester on production version
Hey Chris, Unfortunately, i cannot help you. The problem is still present. I've no solution and i don't want to remove my testers from the list. (It was long to get them) If you find something, i will be really interested. Mathias Le dimanche 12 juin 2016 17:13:21 UTC+2, Forky a écrit : > > Hey Mathias, > > I'm seeing the same error. Did you hear back from google regarding this at > all? Or did you just have to remove all your testers from your beta list in > order to allow them to write reviews? > > Thanks, > > Chris > > > > On Thursday, 2 June 2016 13:47:29 UTC+1, mathia...@stootie.com wrote: >> >> Hi, >> >> I've my app in an open beta testing program. >> The app is currently only on production. (No beta test version running) >> >> Testers are facing a problem when they want to provide a review, on >> current production version : >> >> The following message in toast occurs : >> "Erreur lors de récupération des informations depuis le serveur >> ([RPC:S-9:AEC-9 B5NM-F2HJ-SWWBQ]).]" >> Which mean : "Error to retrieve data from server." >> >> After remove one of the accounts from besta testing program, this >> particular beta tester was able to post his review. >> >> I know beta testers cannot provide public review about the beta version. >> >> But for the production version, i think this should be possible and i do >> not see in the documentation any point about this case. >> >> Do you already meet this error? >> >> Thanks in Advance, >> Mathias >> > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. To post to this group, send email to android-developers@googlegroups.com. Visit this group at https://groups.google.com/group/android-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/android-developers/bd750ed7-0a2f-4452-8baa-dcc174baaef1%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[android-developers] Give a review as a beta tester on production version
Hi, I've my app in an open beta testing program. The app is currently only on production. (No beta test version running) Testers are facing a problem when they want to provide a review, on current production version : The following message in toast occurs : "Erreur lors de récupération des informations depuis le serveur ([RPC:S-9:AEC-9 B5NM-F2HJ-SWWBQ]).]" Which mean : "Error to retrieve data from server." After remove one of the accounts from besta testing program, this particular beta tester was able to post his review. I know beta testers cannot provide public review about the beta version. But for the production version, i think this should be possible and i do not see in the documentation any point about this case. Do you already meet this error? Thanks in Advance, Mathias -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. To post to this group, send email to android-developers@googlegroups.com. Visit this group at https://groups.google.com/group/android-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/android-developers/1e595016-32ec-4811-8995-1842df4446c6%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[android-developers] Re: Android download library does not find the remote expansion/.obb file if it's large
I tried another large upload today, and the remote file was found. So the issue is resolved for some reason. No changes to the code, just uploaded another version of apk and obb (without other changes). On Sunday, 2 November 2014 00:51:21 UTC+1, Mathias Lin wrote: I am implementing an app with an expansion file, and as recommended in the Android Developer docs, I am also doing a manual check when the app starts, whether the expansion file exists, and if not, download it manually via the Download Library, that comes with the Android SDK samples. https://developer.android.com/google/play/expansion-files.html#Preparing I have it running and it's working with my app and a relatively small expansion file (1.4 MB). When I upload my app to the Google Play store (Alpha test mode), the app is available after 2-3 hours, as usual. And at the same time, the download library is also able to find and download the expansion file in my app, if it's not there. (For testing purposes, I delete the expansion file manually on my sdcard, in order to test that the download check works correctly). *But when I use a much larger expansion file of around 340 MB size, the manual download from within my app does not find that file, even though the app is available in the Play store.* When I download the app from Google Play, it downloads the app including the large expansion file just fine. But when I then, for testing purposes, delete the expansion file from my sdcard, and restart my app, the app should check if the expansion file exists (it doesn't) and should download it. But this time, it cannot find the resource. Download failed because the resource could not be found. is the message I am getting when I run the (modified) sample app that comes with the Android SDK. (According to that message, the DownloadClient state seems to be in this: static final int STATE_FAILED_FETCHING_URL = 16;) I'm on Android 4.4.4 with a Nexus 4. Has anyone experienced this problem with large expansion files and those not being available via manual download (through the Android download library)? I checked the log, no errors, and no other changes in the app. Or is there a longer waiting time until a large expansion file gets available, beyond those regular 2-3 hours until an app update is available in Google Play? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[android-developers] Android download library does not find the remote expansion/.obb file if it's large
I am implementing an app with an expansion file, and as recommended in the Android Developer docs, I am also doing a manual check when the app starts, whether the expansion file exists, and if not, download it manually via the Download Library, that comes with the Android SDK samples. https://developer.android.com/google/play/expansion-files.html#Preparing I have it running and it's working with my app and a relatively small expansion file (1.4 MB). When I upload my app to the Google Play store (Alpha test mode), the app is available after 2-3 hours, as usual. And at the same time, the download library is also able to find and download the expansion file in my app, if it's not there. (For testing purposes, I delete the expansion file manually on my sdcard, in order to test that the download check works correctly). *But when I use a much larger expansion file of around 340 MB size, the manual download from within my app does not find that file, even though the app is available in the Play store.* When I download the app from Google Play, it downloads the app including the large expansion file just fine. But when I then, for testing purposes, delete the expansion file from my sdcard, and restart my app, the app should check if the expansion file exists (it doesn't) and should download it. But this time, it cannot find the resource. Download failed because the resource could not be found. is the message I am getting when I run the (modified) sample app that comes with the Android SDK. (According to that message, the DownloadClient state seems to be in this: static final int STATE_FAILED_FETCHING_URL = 16;) I'm on Android 4.4.4 with a Nexus 4. Has anyone experienced this problem with large expansion files and those not being available via manual download (through the Android download library)? I checked the log, no errors, and no other changes in the app. Or is there a longer waiting time until a large expansion file gets available, beyond those regular 2-3 hours until an app update is available in Google Play? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[android-developers] localStorage html5 feature not working in WebView on Android devices of some manufacturers
I have a html5 application that I wrap in a WebView. To store and retrieve user input values between pages, I use the *localStorage* html5 feature. It works fine on my Nexus 4 (Android 4.4.4), but it does not work on Samsung Galaxy Tab 2 (Android 4.3.x) (= nothing happens, but also no error in logcat). Or, to be more clear: *on Samsung, it does not work if the html pages are loaded from within the app's asset folder*. It does work though if I put the pages on a web server, as below in the outcommented line. However, on Nexus 4, loading from file:///android_asset/ and also if I load the pages on a desktop browser (Chrome, Firefox) from file:// path, it is also working. (I had another user reported the issue on a LG device, so it does not seem to be Samsung specific). Below are the settings of the web view. webView = (WebView)this.findViewById(R.id.webView); webViewClient = new MyWebViewClient(this); webViewClient.setSm(sm); webView.setWebViewClient(webViewClient); WebSettings webSettings = webView.getSettings(); webSettings.setJavaScriptEnabled(true); webSettings.setDomStorageEnabled(true); webView.getSettings().setJavaScriptEnabled(true); webView.getSettings().setDomStorageEnabled(true); webView.getSettings().setPluginState(WebSettings.PluginState.ON); webView.getSettings().setAppCacheEnabled(false); webView.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE); webView.getSettings().setUseWideViewPort(true); webView.getSettings().setLoadWithOverviewMode(true); webView.getSettings().setBuiltInZoomControls(false); webView.getSettings().setSupportZoom(false); webView.getSettings().setDefaultZoom(WebSettings.ZoomDensity.FAR); webView.loadUrl(file:///android_asset/01_home.html); // does NOT work! // webView.loadUrl(http://192.168.178.33/01_home.html;); // does work! Local storage code in the pages: // storingvar data = document.getElementById('data').value; window.localStorage.setItem((1), data); // reading document.getElementById('data').value = window.localStorage.getItem(1); -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[android-developers] Re: localStorage html5 feature not working in WebView on Android devices of some manufacturers
Update: Storing and loading the value from localStorage works fine on all devices while on the *same page*, however, not between different pages. In my example, I can store and retrieve the value on 01_home.html, but when I go to another page in the android_asset folder, I cannot retrieve it anymore (on LG and Samsung device). Works fine on Nexus 4 though. What is the reason for the different behaviour? Different WebKit version, different Android version, vendor? On Tuesday, 30 September 2014 11:56:11 UTC+2, Mathias Lin wrote: I have a html5 application that I wrap in a WebView. To store and retrieve user input values between pages, I use the *localStorage* html5 feature. It works fine on my Nexus 4 (Android 4.4.4), but it does not work on Samsung Galaxy Tab 2 (Android 4.3.x) (= nothing happens, but also no error in logcat). Or, to be more clear: *on Samsung, it does not work if the html pages are loaded from within the app's asset folder*. It does work though if I put the pages on a web server, as below in the outcommented line. However, on Nexus 4, loading from file:///android_asset/ and also if I load the pages on a desktop browser (Chrome, Firefox) from file:// path, it is also working. (I had another user reported the issue on a LG device, so it does not seem to be Samsung specific). Below are the settings of the web view. webView = (WebView)this.findViewById(R.id.webView); webViewClient = new MyWebViewClient(this); webViewClient.setSm(sm); webView.setWebViewClient(webViewClient); WebSettings webSettings = webView.getSettings(); webSettings.setJavaScriptEnabled(true); webSettings.setDomStorageEnabled(true); webView.getSettings().setJavaScriptEnabled(true); webView.getSettings().setDomStorageEnabled(true); webView.getSettings().setPluginState(WebSettings.PluginState.ON); webView.getSettings().setAppCacheEnabled(false); webView.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE); webView.getSettings().setUseWideViewPort(true); webView.getSettings().setLoadWithOverviewMode(true); webView.getSettings().setBuiltInZoomControls(false); webView.getSettings().setSupportZoom(false); webView.getSettings().setDefaultZoom(WebSettings.ZoomDensity.FAR); webView.loadUrl(file:///android_asset/01_home.html); // does NOT work! // webView.loadUrl(http://192.168.178.33/01_home.html;); // does work! Local storage code in the pages: // storingvar data = document.getElementById('data').value; window.localStorage.setItem((1), data); // reading document.getElementById('data').value = window.localStorage.getItem(1); -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [android-developers] Re: Making my app the only one that can run.
Thanks Envoyé de mon Android Excusez la brieveté. Mathias Seguy - Android2EE Le 20 mars 2013 15:55, bob b...@coolfone.comze.com a écrit : I used an app in Google Play called *SureLock Kiosk Lockdown*. On Tuesday, March 19, 2013 4:35:56 PM UTC-5, Tobiah wrote: I'm not being unfriendly to users. I need to hand out devices at an event so that people can walk around and use my app. I don't want them to use other apps on the phone. So I put this in my AndroidManifest.xml: intent-filter action android:name=android.intent.**action.MAIN / category android:name=android.intent.**category.LAUNCHER / category android:name=android.intent.**category.HOME / category android:name=android.intent.**category.DEFAULT / /intent-filter Then I get a choice of launchers from the home button. I choose my app 'Always' and everything is great. The only problem is that if I reboot the device, my app indeed comes up as the home screen, but it immediately crashes. Is there some event or Intent I need to handle to do this? I can't figure out how to debug this, because there are no logcat events, and when I restart my app it works fine. Also if there are any other thoughts on how to make a one app device, I'd love to have suggestions. Thanks! Tobiah -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to a topic in the Google Groups Android Developers group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/android-developers/h7t1vjkoF0w/unsubscribe?hl=en . To unsubscribe from this group and all its topics, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] sqlite3 on Android fails with: syntax error: unexpected “(”
I pushed sqlite3 (from my Android SDK tools folder) to my rooted device (*Galaxy S III, 4.0.3*), since it wasn't on there. But executing any query or even just entering sqlite3 fails with an error. via adb shell: ~ # sqlite3/system/xbin/sqlite3: line 1: syntax error: unexpected ( ~ # sqlite3 /data/system/accounts.db delete from grants;/system/xbin/sqlite3: line 1: syntax error: unexpected ( What's wrong? I also tried to use sqlite3 (with , as suggested by somebody on http://stackoverflow.com/questions/13696259/sqlite3-on-android-fails-with-syntax-error-unexpected), but it makes no difference. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] why is the account managed by AccountManager is delete automatically ?
Some of my users are experiencing the same issue. My suspicion is that the default install location changed from internal to external on 4.1.1. At least one user reported things are working with android:installLocation=internalOnly set in the manifest. This should be default behavior according to API-doc, but it seems like it isn't on 4.1.1. For more discussion, take a look at my related issue tickethttps://redmine.limun.org/issues/153 . Cheers, Mathias On Thursday, July 12, 2012 11:14:28 PM UTC+2, marten wrote: Am Mittwoch, 23. März 2011 07:50:56 UTC+1 schrieb Dianne Hackborn: Because when the SD card is unmounted the apps on it disappear, so things that have state associated with those apps will clean it up. This is why the documentation says you should not allow these kinds of apps to be placed on the SD card. Ok, but this also happens on the Galaxy Nexus (which doesn't feature a SD card slot). Afaik it didn't happen with Android 4.0.4, but it happens for users who upgraded to Jelly bean. What can I do to prevent this. Marten On Mon, Mar 21, 2011 at 8:22 PM, 琅琅 wuxiaojun2...@gmail.com wrote: My little App creates an account in AccountManager. But if i move the App from internal storage to SD card, the account is automatically delete by AccountManagerService if i unmounted the SD card or reboot the machine. does anyone have any idea about this ? does this mean we cannot move the App to SD card or is it because i am missing some config attributes in the config xml ? D/AccountManagerService( 245): deleting account XXX because type com.XXX no longer has a registered authenticator D/ ContactsProvider( 945): removing data for removed account Account {name=, type=com.XXX} -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Turn off screen but not hardware keys, catch input with screen off
I 've seen apps locking the hard keys and not the touchscreen but Do you mean the apps turn off the screen but still enable it to listen to touch events? Can you point me to the apps that you have seen? Because I am actually looking for a way to implement such. Thanks. On Friday, 1 July 2011 21:21:08 UTC+8, lousou76 wrote: Hi, I am new to android apps and I am trying to figure out a way to keep an application in foreground running, getting input from the hardware keys only (like volume up and down) but without turning on the screen or unlocking. I mean lets say you aquire a nice cpu partial wakelock to do your staff, you run an app for chating like a walkie talkie and you want the user to be able to respond to audio messages by pressing the volume up and talking. You can;t have the screen on all the time, it is draining the battery and you can;t have screen lighting or diming on every hard click. You also cant use the camera button if you don;t have one, and the media button is only available when using a handsfree. Still you have to open the screen, disable the keyguard, bring the app to foreground if not already and then receive input from the hard key pressed. So how can I protect the touchscreen or at least turn off the screen but disable the keyguard after the timeout to save battery? I 've seen apps locking the hard keys and not the touchscreen but there is no documentation or availability on turning off the screen light with keyguard locking only the touchscreen leaving the hard keys to the foreground application. Please note that many of the devices do not push buttons so easilly and are on pockets inside cases with holes that allow the user to press buttons but those are not easilly pressed in pocket. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Setting screen on/off
Why does the SDK not allow that for third party apps? Also, why does turning the brightness to 0 entirely turns the screen off and lock it? Why is there no way to just turn the screen off (entirely dim) without locking it, and also keep it listening to touch events? (So many limitations in the SDK, it forces the developers to use inofficial method calls, if there are any for the specific case.) On Friday, 8 April 2011 15:34:49 UTC+8, Dianne Hackborn wrote: Doing this kind of stuff from third party apps isn't really supported. You may be able to hack up a somewhat working solution, but I don't think you can actually implement a fully working robust solution with the SDK APIs. On Fri, Apr 8, 2011 at 12:24 AM, luiX_ lui...@gmail.com wrote: Hi, I'm trying to develop something similar to the proximity event of the dialer during a call, this is: when something is near the proxmity sensor turn off the screen and when there's not power it on again. I've had no problem making the sensor's events work, that was easy, but I'm having a lot of trouble trying to set the screen on/off, this is what I've got this far: - I can power the screen off by setting brightness to zero (using the WindowManager.LayoutParams), the problem is that it locks the screen instead of just setting it off. - I've tried using a PowerManager.WakeLock to several things: - using as flag PARTIAL_WAKE_LOCK which should keep the cpu running but allowing the screen and keyboard to go off (but not actually setting them off at the moment, it waits for the configured timeout) - using as flag SCREEN_DIM_WAKE_LOCK | ACQUIRE_CAUSES_WAKEUP and then setting the screen off using the brightness trick but I still do have to manually press the button to bring the screen up. Now, I'm playing with some flags in the Window, but still nothing, I always do have to bring the screen back by pressing the power button. Any ideas/snippets to make this work like when you're inside a call in Android's default dialer? 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 -- 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] Video (VideoView) flickering and/or doesn't display on ICS (but works fine on Android = 2.x)
I have an app with a VideoView, which works fine on all Android devices up to 2.x (Gingerbread), but has problems with devices running ICS. On some devices, the videos don't play, on other devices the video doesn't play when rotating the device. Instead, the screen starts flickering. (tested on: SGS2, HTC Desire, LG L7, Ainovo Paladium tablet, all running 4.0.x) I've already tried changing the manifest to android:hardwareAccelerated=false and also set the VideoView layer type to mVideoView.setLayerType(View.LAYER_TYPE_SOFTWARE, null); The code itself is very basic and just using the standard video view and media controller: setContentView(R.layout.act_video_player); mVideoView = (VideoView) findViewById(R.id.vw_player); mVideoView.setLayerType(View.LAYER_TYPE_SOFTWARE, null); Display display = ((WindowManager) getSystemService(WINDOW_SERVICE)).getDefaultDisplay(); MediaController mc = new MediaController(this); mVideoView.setMediaController(mc); Uri uri = Uri.parse(mVideoURI); mVideoView.setVideoURI(uri); mVideoView.requestFocus(); and the manifest: uses-sdk android:minSdkVersion=7 android:targetSdkVersion=15/ supports-screens android:largeScreens=true android:normalScreens=true android:smallScreens=false android:resizeable=true android:anyDensity=true/ application ... android:hardwareAccelerated=false/ Below is the complete log, of which I think the following lines are relevant: W/QCvdec ( 2751): get_config: unknown param 117440527 I/OMXCodec( 2751): [OMX.qcom.7x30.video.decoder.mpeg4] video dimensions are 960 x 560 W/QCvdec ( 2751): get_extension_index: Error, Not implemented E/OMXNodeInstance( 2751): OMX_GetExtensionIndex failed Anybody else having experienced issues with video playback on ICS? Complete log here: D/QCvdec ( 2751): VDEC Open with new H 560 and W 960 I/QC_CORE ( 2751): OMXCORE: qc_omx_component_get_parameter 675aec, 41804b60 , 33554433 D/QCvdec ( 2751): portDefn-nBufferSize 806400 m_height 560 m_width 960 I/QC_CORE ( 2751): OMXCORE: qc_omx_component_set_parameter 675aec, 41804b60 , 33554433 I/OMXCodec( 2751): [OMX.qcom.7x30.video.decoder.mpeg4] Enable frame by frame mode I/QC_CORE ( 2751): OMXCORE: qc_omx_component_set_parameter 675aec, 41804c6c , 2130706434 I/QC_CORE ( 2751): OMXCORE: qc_omx_component_get_parameter 675aec, 41804ba8 , 33554433 I/QC_CORE ( 2751): OMXCORE: qc_omx_component_set_parameter 675aec, 41804ba8 , 33554433 I/QC_CORE ( 2751): OMXCORE: qc_omx_component_get_parameter 675aec, 41804ba8 , 33554433 I/QC_CORE ( 2751): OMXCORE: qc_omx_component_get_parameter 675aec, 41804b1c , 33554433 D/QCvdec ( 2751): portDefn-nBufferSize 806400 m_height 560 m_width 960 I/QC_CORE ( 2751): OMXCORE: qc_omx_component_get_config 675aec W/QCvdec ( 2751): get_config: unknown param 117440527 I/OMXCodec( 2751): [OMX.qcom.7x30.video.decoder.mpeg4] video dimensions are 960 x 560 W/QCvdec ( 2751): get_extension_index: Error, Not implemented E/OMXNodeInstance( 2751): OMX_GetExtensionIndex failed I/QC_CORE ( 2751): OMXCORE: qc_omx_component_get_state 675aec I/QC_CORE ( 2751): OMXCORE: qc_omx_component_deinit 675aec I/QC_CORE ( 2751): Calling FreeHandle in state 1 E/OMXCodec( 2751): Attempting to allocate OMX node 'OMX.qcom.video.decoder.mpeg4' E/OMXCodec( 2751): Attempting to allocate OMX node 'OMX.TI.Video.Decoder' E/OMXCodec( 2751): Attempting to allocate OMX node 'OMX.SEC.MPEG4.Decoder' E/OMXCodec( 2751): Attempting to allocate OMX node 'OMX.google.mpeg4.decoder' E/OMXCodec( 2751): Successfully allocated OMX node 'OMX.google.mpeg4.decoder' E/OMXCodec( 2751): [OMX.google.mpeg4.decoder] Video O/P format.eColorFormat 0x41804bf8 I/OMXCodec( 2751): [OMX.google.mpeg4.decoder] Enable frame by frame mode W/OMXCodec( 2751): Failed to set frame packing format on component I/OMXCodec( 2751): [OMX.google.mpeg4.decoder] video dimensions are 352 x 288 I/OMXCodec( 2751): [OMX.google.mpeg4.decoder] Crop rect is 352 x 288 @ (0, 0) E/OMXCodec( 2751): Attempting to allocate OMX node 'OMX.TI.AAC.decode' E/OMXCodec( 2751): Attempting to allocate OMX node 'OMX.google.aac.decoder' E/OMXCodec( 2751): Successfully allocated OMX node 'OMX.google.aac.decoder' D/MediaPlayer( 6712): getMetadata I/OMXCodec( 2751): [OMX.google.mpeg4.decoder] video dimensions are 960 x 560 I/OMXCodec( 2751): [OMX.google.mpeg4.decoder] Crop rect is 960 x 560 @ (0, 0) I/OMXCodec( 2751): [OMX.google.mpeg4.decoder] video dimensions are 960 x 560 I/OMXCodec( 2751): [OMX.google.mpeg4.decoder] Crop rect is 960 x 560 @ (0, 0) D/SurfaceTexture( 137): SurfaceTexture::dequeuebuffer: MIN EXCEEDED mBuffer:4 bumped W/SoftAAC ( 2751): Sample rate was 22050 Hz, but now is 11025 Hz D/Splash ( 6712): *** onPause *** D/Splash ( 6712): onPause::mVideoView.getCurrentPosition() store to system: 10500 W/TimedEventQueue( 2751): Event 7 was not found in the queue, already cancelled? W/AudioFlinger( 2751): session id 57 not found for pid 6712 D/Splash ( 6712): *** onCreate
[android-developers] Where did canvas.setViewport(int, int) go since ICS?
Where did method Canvas' method public void setViewport(int width, int height) go since ICS? I used the method before prior to ICS, now when I use it, the method can't be resolved. And it's not mentioned nor marked as deprecated at http://developer.android.com/reference/android/graphics/Canvas.html (anymore)? -- 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] VideoView doesn't start when invisible
I have an AsyncTask, where I hide a video view, start the video playback, and show the video view when the video is playing. But the video would just not start when the video view is set to invisible, the async task keeps hanging in onBackground. If I comment out this line (or set it to View.VISIBLE), the video starts playing. Why does the video view require a *visible* surface? public void walk(final View v) { new AsyncTask() { @Override protected void onPreExecute() { super.onPreExecute(); mVideoView.setVisibility(View.INVISIBLE); // this line causes video not to start mVideoView.start(); } @Override protected Object doInBackground(Object... objects) { while (!mVideoView.isPlaying()) {} return null; } @Override protected void onPostExecute(Object o) { super.onPostExecute(o); mVideoView.setVisibility(View.VISIBLE); } }.execute(); A bit of background why I'm doing this: I try to avoid the well-known issue of the black flash that you usually have when starting a video (or in my case, play one video right after another one, without any gap / black flash): http://stackoverflow.com/search?q=%5Bandroid%5D+videoview+black http://stackoverflow.com/search?q=%5Bandroid%5D+video+%5Bmediaplayer%5D+black -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Proguard causes problems with SSL keystore on Android
I removed -repackageclasses and -allowaccessmodification, but no difference - getting the same error. On Friday, 18 November 2011 13:20:21 UTC+8, Nikolay Elenkov wrote: On Fri, Nov 18, 2011 at 2:05 PM, Mathias Lin ma...@mathiaslin.com wrote: In an Android app, I fetch content from a https url; in order to avoid SSL cert verification errors, I add the SSL public key to my keystore, which then resides in my res/raw folder of the app. Following the instructions as on http://blog.crazybob.org/2010/02/android-trusting-ssl-certificates.html, which all works fine so far. ..until I activate Proguard and obfuscation. With Proguard activated, I am getting the following error, ERROR/Login(4401): Could not login. javax.net.ssl.SSLException: hostname in certificate didn't match: store.mydomain.com/185.165.192.15 != store.mydomain.com OR store.mydomain.com at xyz.fd.a(Unknown Source) which I don't quite understand. Why would the identification of the url change in a way that it's also fetching the /ipAddress together with the domain name, whereas it works fine without Proguard obfuscation. Try dropping the more aggressive options like -repackageclasses and -allowaccessmodification options and see if that changes anything. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Proguard causes problems with SSL keystore on Android
This is the complete stacktrace: 11-18 17:17:39.403: ERROR/Login(7025): Could not login. javax.net.ssl.SSLException: hostname in certificate didn't match: store.mydomain.com/185.165.192.15 != store.mydomain.com OR store.mydomain.com at a.a.a.c.d.a.a(AbstractVerifier.java:228) at a.a.a.c.d.c.a(BrowserCompatHostnameVerifier.java:54) at a.a.a.c.d.a.a(AbstractVerifier.java:149) at a.a.a.c.d.a.a(AbstractVerifier.java:130) at a.a.a.c.d.d.a(SSLSocketFactory.java:397) at a.a.a.c.d.d.a(SSLSocketFactory.java:495) at a.a.a.c.c.i.a(SchemeSocketFactoryAdaptor.java:62) at a.a.a.f.c.f.a(DefaultClientConnectionOperator.java:148) at a.a.a.f.c.b.a(AbstractPoolEntry.java:149) at a.a.a.f.c.c.a(AbstractPooledConnAdapter.java:121) at a.a.a.f.b.l.a(DefaultRequestDirector.java:573) at a.a.a.f.b.l.a(DefaultRequestDirector.java:425) at a.a.a.f.b.b.a(AbstractHttpClient.java:820) at a.a.a.f.b.b.a(AbstractHttpClient.java:754) at com.mydomain.android.activity.f.doInBackground(Login.java:122) at android.os.AsyncTask$2.call(AsyncTask.java:185) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:306) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581) at java.lang.Thread.run(Thread.java:1019) On Friday, 18 November 2011 17:08:45 UTC+8, casantos wrote: On Fri, Nov 18, 2011 at 3:05 AM, Mathias Lin ma...@mathiaslin.com wrote: In an Android app, I fetch content from a https url; in order to avoid SSL cert verification errors, I add the SSL public key to my keystore, which then resides in my res/raw folder of the app. Following the instructions as on http://blog.crazybob.org/2010/02/android-trusting-ssl-certificates.html, which all works fine so far. ..until I activate Proguard and obfuscation. With Proguard activated, I am getting the following error, ERROR/Login(4401): Could not login. javax.net.ssl.SSLException: hostname in certificate didn't match: store.mydomain.com/185.165.192.15 != store.mydomain.com OR store.mydomain.com at xyz.fd.a(Unknown Source) which I don't quite understand. Why would the identification of the url change in a way that it's also fetching the /ipAddress together with the domain name, whereas it works fine without Proguard obfuscation. It is not fetching the IP address. The store.mydomain.com/185.165.192.15 you see is just the result of InetAddress.toString(). Please post the entire stack trace contained in the exception. Also, tell proguard to keep line numbers and file names: -keepattributes SourceFile,LineNumberTable As the httpClient for fetching the https content, I use sources as in MyHttpClient at: http://blog.crazybob.org/2010/02/android-trusting-ssl-certificates.html proguard.cfg: -optimizationpasses 5 -dontusemixedcaseclassnames -dontskipnonpubliclibraryclasses -dontpreverify -verbose -optimizations !code/simplification/arithmetic,!field/*,!class/merging/* -keep public class * extends android.app.Activity -keep public class * extends android.app.Application -keep public class * extends android.app.Service -keep public class * extends android.content.BroadcastReceiver -keep public class * extends android.content.ContentProvider -keep public class * extends android.app.backup.BackupAgentHelper -keep public class * extends android.preference.Preference -keep class * extends DefaultHttpClient -ignorewarnings -repackageclasses 'xyz' -allowaccessmodification -keepclasseswithmembernames class * { native methods; } -keepclasseswithmembers class * { public init(android.content.Context, android.util.AttributeSet); } -keepclasseswithmembers class * { public init(android.content.Context, android.util.AttributeSet, int); } -keepclassmembers class * extends android.app.Activity { public void *(android.view.View); } -keepclassmembers enum * { public static **[] values(); public static ** valueOf(java.lang.String); } -keep class * implements android.os.Parcelable { public static final android.os.Parcelable$Creator *; } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-d...@googlegroups.com To unsubscribe from this group, send email to android-develop...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- The flames are all long gone, but the pain lingers on -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group
Re: [android-developers] Proguard causes problems with SSL keystore on Android
I was using the latest httpclient 4.1.2. Now when I switch back to 4.1.1, the problem is gone. Also see: http://comments.gmane.org/gmane.comp.apache.httpclient.user/262 On Friday, 18 November 2011 17:21:15 UTC+8, Mathias Lin wrote: This is the complete stacktrace: 11-18 17:17:39.403: ERROR/Login(7025): Could not login. javax.net.ssl.SSLException: hostname in certificate didn't match: store.mydomain.com/185.165.192.15 != store.mydomain.com OR store.mydomain.com at a.a.a.c.d.a.a(AbstractVerifier.java:228) at a.a.a.c.d.c.a(BrowserCompatHostnameVerifier.java:54) at a.a.a.c.d.a.a(AbstractVerifier.java:149) at a.a.a.c.d.a.a(AbstractVerifier.java:130) at a.a.a.c.d.d.a(SSLSocketFactory.java:397) at a.a.a.c.d.d.a(SSLSocketFactory.java:495) at a.a.a.c.c.i.a(SchemeSocketFactoryAdaptor.java:62) at a.a.a.f.c.f.a(DefaultClientConnectionOperator.java:148) at a.a.a.f.c.b.a(AbstractPoolEntry.java:149) at a.a.a.f.c.c.a(AbstractPooledConnAdapter.java:121) at a.a.a.f.b.l.a(DefaultRequestDirector.java:573) at a.a.a.f.b.l.a(DefaultRequestDirector.java:425) at a.a.a.f.b.b.a(AbstractHttpClient.java:820) at a.a.a.f.b.b.a(AbstractHttpClient.java:754) at com.mydomain.android.activity.f.doInBackground(Login.java:122) at android.os.AsyncTask$2.call(AsyncTask.java:185) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:306) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581) at java.lang.Thread.run(Thread.java:1019) On Friday, 18 November 2011 17:08:45 UTC+8, casantos wrote: On Fri, Nov 18, 2011 at 3:05 AM, Mathias Lin ma...@mathiaslin.com wrote: In an Android app, I fetch content from a https url; in order to avoid SSL cert verification errors, I add the SSL public key to my keystore, which then resides in my res/raw folder of the app. Following the instructions as on http://blog.crazybob.org/2010/02/android-trusting-ssl-certificates.html, which all works fine so far. ..until I activate Proguard and obfuscation. With Proguard activated, I am getting the following error, ERROR/Login(4401): Could not login. javax.net.ssl.SSLException: hostname in certificate didn't match: store.mydomain.com/185.165.192.15 != store.mydomain.com OR store.mydomain.com at xyz.fd.a(Unknown Source) which I don't quite understand. Why would the identification of the url change in a way that it's also fetching the /ipAddress together with the domain name, whereas it works fine without Proguard obfuscation. It is not fetching the IP address. The store.mydomain.com/185.165.192.15 you see is just the result of InetAddress.toString(). Please post the entire stack trace contained in the exception. Also, tell proguard to keep line numbers and file names: -keepattributes SourceFile,LineNumberTable As the httpClient for fetching the https content, I use sources as in MyHttpClient at: http://blog.crazybob.org/2010/02/android-trusting-ssl-certificates.html proguard.cfg: -optimizationpasses 5 -dontusemixedcaseclassnames -dontskipnonpubliclibraryclasses -dontpreverify -verbose -optimizations !code/simplification/arithmetic,!field/*,!class/merging/* -keep public class * extends android.app.Activity -keep public class * extends android.app.Application -keep public class * extends android.app.Service -keep public class * extends android.content.BroadcastReceiver -keep public class * extends android.content.ContentProvider -keep public class * extends android.app.backup.BackupAgentHelper -keep public class * extends android.preference.Preference -keep class * extends DefaultHttpClient -ignorewarnings -repackageclasses 'xyz' -allowaccessmodification -keepclasseswithmembernames class * { native methods; } -keepclasseswithmembers class * { public init(android.content.Context, android.util.AttributeSet); } -keepclasseswithmembers class * { public init(android.content.Context, android.util.AttributeSet, int); } -keepclassmembers class * extends android.app.Activity { public void *(android.view.View); } -keepclassmembers enum * { public static **[] values(); public static ** valueOf(java.lang.String); } -keep class * implements android.os.Parcelable { public static final android.os.Parcelable$Creator *; } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to androi...@googlegroups.com To unsubscribe from this group, send email to android-develop...@googlegroups.com For more options, visit
[android-developers] Proguard causes problems with SSL keystore on Android
In an Android app, I fetch content from a https url; in order to avoid SSL cert verification errors, I add the SSL public key to my keystore, which then resides in my res/raw folder of the app. Following the instructions as on http://blog.crazybob.org/2010/02/android-trusting-ssl-certificates.html, which all works fine so far. ..until I activate Proguard and obfuscation. With Proguard activated, I am getting the following error, ERROR/Login(4401): Could not login. javax.net.ssl.SSLException: hostname in certificate didn't match: store.mydomain.com/185.165.192.15 != store.mydomain.com OR store.mydomain.com at xyz.fd.a(Unknown Source) which I don't quite understand. Why would the identification of the url change in a way that it's also fetching the /ipAddress together with the domain name, whereas it works fine without Proguard obfuscation. As the httpClient for fetching the https content, I use sources as in MyHttpClient at: http://blog.crazybob.org/2010/02/android-trusting-ssl-certificates.html proguard.cfg: -optimizationpasses 5 -dontusemixedcaseclassnames -dontskipnonpubliclibraryclasses -dontpreverify -verbose -optimizations !code/simplification/arithmetic,!field/*,!class/merging/* -keep public class * extends android.app.Activity -keep public class * extends android.app.Application -keep public class * extends android.app.Service -keep public class * extends android.content.BroadcastReceiver -keep public class * extends android.content.ContentProvider -keep public class * extends android.app.backup.BackupAgentHelper -keep public class * extends android.preference.Preference -keep class * extends DefaultHttpClient -ignorewarnings -repackageclasses 'xyz' -allowaccessmodification -keepclasseswithmembernames class * { native methods; } -keepclasseswithmembers class * { public init(android.content.Context, android.util.AttributeSet); } -keepclasseswithmembers class * { public init(android.content.Context, android.util.AttributeSet, int); } -keepclassmembers class * extends android.app.Activity { public void *(android.view.View); } -keepclassmembers enum * { public static **[] values(); public static ** valueOf(java.lang.String); } -keep class * implements android.os.Parcelable { public static final android.os.Parcelable$Creator *; } -- 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: major problem with network location fixes and their timestamps
I thought that It seems as though the Location.getTime() sometimes isn't accurate, in that the system under certain circumstances just updates the time of an old fix and passes it on as though it was new. For us, this is very unfortunate. and I *need* recent fixes, and for that i need to know how old the fix is. I therefore utilize location.getTime() against the system.currenttimillis to see how old it is. Describes my problem. As for your answer it really a long discussion, but short answer is that i do listen for it but gps often takes long time, user might have turned off and it doesn't work indoors. This problem is about the network provider, as i wrote. I appreciate any feedback, so thanks. On Oct 13, 1:39 pm, lbendlin l...@bendlin.us wrote: you haven't explained your problem yet. What if I say So what, only use live GPS locations in your app? ? -- 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: major problem with network location fixes and their timestamps
As mentioned in another reply and in my original post, this issue is about the network provider. My app can't wait forever, user sometimes has gps turned off and it doesn't work indoors. When i DO get a GPS fix, it works fine. Thanks for feedback mate. On Oct 14, 6:54 am, Studio LFP studio@gmail.com wrote: Can't say that I've seen that before. I've only used the GPS a small to medium amount, but seems a little weird. Is the GPS hardware not able to get a fix and causing your logic to drop back to the network GPS? If so, it might be that. Is it happening on multiple different devices and how many devices have you tested it on? You might want to check out the GPS Status app on the market and see if it gets a fix. If it does, it will tell you the time it got it and other information about the fix. Good way of testing the hardware and see if you have an issue there. Steven Studio LFPhttp://www.studio-lfp.com On Wednesday, October 12, 2011 9:44:54 AM UTC-5, Mathias wrote: Hi, if someone could bear with me on this one i'd be most happy since i'm really disillusioned right now. BOTTOM LINE (to be detailed further down): It seems as though the Location.getTime() sometimes isn't accurate, in that the system under certain circumstances just updates the time of an old fix and passes it on as though it was new. For us, this is very unfortunate. I think it has something to do with this logline (again in more detail below): 10-12 16:34:47.186: DEBUG/LocationMasfClient(1188): getNetworkLocation(): Returning cache location with accuracy 1072.0 From what i can see, the same location is returned over and over again, just with its timestamp overwritten... EXPLANATION: Have an app that queries location. I register both network and gps, wait for a certain time and takes what comes back from either one and unregister both. Before i register i check the latestknown location and use that if it's not too old. All works fine, process wise, but there's one major issue. I *need* recent fixes, and for that i need to know how old the fix is. I therefore utilize location.getTime() against the system.currenttimillis to see how old it is. However, we see in certain scenarios, that the fix coming back, with a recent timestamp (often under a second!) is for a location where we know that the phone hasn't been at for over 30 minutes! LOCATION PROCESS EXPLANATION WITH LOG DETAILS: One VERY interesting thing can be seen by examining the debug log of a typical positioning process in my app: 1. first we check the latest known location: 10-12 16:34:47.166: DEBUG/nubaLocationService(6774): getLastKnownLocationForProviderWithinTimeSpan;now;1318430087165;time; 1318429486221;nowDate;Wed Oct 12 16:34:47 Europe/Stockholm 2011;timeDate;Wed Oct 12 16:24:46 Europe/Stockholm 2011;age; 600944;TooOld;true;tooBadAccuracy;true;lat;59.3267657;lon; 18.0428283;accuracy;1072.0 here you can see that the age about 60 seconds, my upper limit is 30 seconds, so i will discard it and register for live updates: 2. register for location listening: 10-12 16:34:47.166: DEBUG/nubaLocationService(6774): requesting network updates 10-12 16:34:47.166: DEBUG/NetworkLocationProvider(1188): addListener(): com.karpet.nuba.android 10-12 16:34:47.166: DEBUG/NetworkLocationProvider(1188): setMinTime: 0 3 NetworkLocationProvider log entries and onLocationChanged callbacks: Now HERE is something very interesting: 10-12 16:34:47.186: DEBUG/LocationMasfClient(1188): getNetworkLocation(): Returning cache location with accuracy 1072.0 10-12 16:34:47.196: DEBUG/NetworkLocationProvider(1188): onCellLocationChanged [142,9307015] 10-12 16:34:47.216: DEBUG/nubaLocationService(6774): onLocationChanged();new bestLocation! now;1318430087220;time; 1318430087178;nowDate;Wed Oct 12 16:34:47 Europe/Stockholm 2011;timeDate;Wed Oct 12 16:34:47 Europe/Stockholm 2011;age;42;lat; 59.3267657;lon;18.0428283;accuracy;1072.0;oldnull?;true It says returning cache location, with the exact same accuracy, lon, lat, but CHANGED time! 4. We listen for 25-30 secs, but nothing more comes back, so eventually we unregister: 10-12 16:35:14.216: DEBUG/LocationManager(6774): removeUpdates: listener = com.karpet.nuba.android.service.LocationService $NubaLocationListener@4582cb78 I have no idea why this happens, but sometimes we can start and stop our listening for quite a while, 20-30 times when we've travelled quite far, to another cell tower, but still get old fixes as new callbacks! Help/Pointers would be extremely appreciated! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http
[android-developers] major problem with network location fixes and their timestamps
Hi, if someone could bear with me on this one i'd be most happy since i'm really disillusioned right now. BOTTOM LINE (to be detailed further down): It seems as though the Location.getTime() sometimes isn't accurate, in that the system under certain circumstances just updates the time of an old fix and passes it on as though it was new. For us, this is very unfortunate. I think it has something to do with this logline (again in more detail below): 10-12 16:34:47.186: DEBUG/LocationMasfClient(1188): getNetworkLocation(): Returning cache location with accuracy 1072.0 From what i can see, the same location is returned over and over again, just with its timestamp overwritten... EXPLANATION: Have an app that queries location. I register both network and gps, wait for a certain time and takes what comes back from either one and unregister both. Before i register i check the latestknown location and use that if it's not too old. All works fine, process wise, but there's one major issue. I *need* recent fixes, and for that i need to know how old the fix is. I therefore utilize location.getTime() against the system.currenttimillis to see how old it is. However, we see in certain scenarios, that the fix coming back, with a recent timestamp (often under a second!) is for a location where we know that the phone hasn't been at for over 30 minutes! LOCATION PROCESS EXPLANATION WITH LOG DETAILS: One VERY interesting thing can be seen by examining the debug log of a typical positioning process in my app: 1. first we check the latest known location: 10-12 16:34:47.166: DEBUG/nubaLocationService(6774): getLastKnownLocationForProviderWithinTimeSpan;now;1318430087165;time; 1318429486221;nowDate;Wed Oct 12 16:34:47 Europe/Stockholm 2011;timeDate;Wed Oct 12 16:24:46 Europe/Stockholm 2011;age; 600944;TooOld;true;tooBadAccuracy;true;lat;59.3267657;lon; 18.0428283;accuracy;1072.0 here you can see that the age about 60 seconds, my upper limit is 30 seconds, so i will discard it and register for live updates: 2. register for location listening: 10-12 16:34:47.166: DEBUG/nubaLocationService(6774): requesting network updates 10-12 16:34:47.166: DEBUG/NetworkLocationProvider(1188): addListener(): com.karpet.nuba.android 10-12 16:34:47.166: DEBUG/NetworkLocationProvider(1188): setMinTime: 0 3 NetworkLocationProvider log entries and onLocationChanged callbacks: Now HERE is something very interesting: 10-12 16:34:47.186: DEBUG/LocationMasfClient(1188): getNetworkLocation(): Returning cache location with accuracy 1072.0 10-12 16:34:47.196: DEBUG/NetworkLocationProvider(1188): onCellLocationChanged [142,9307015] 10-12 16:34:47.216: DEBUG/nubaLocationService(6774): onLocationChanged();new bestLocation! now;1318430087220;time; 1318430087178;nowDate;Wed Oct 12 16:34:47 Europe/Stockholm 2011;timeDate;Wed Oct 12 16:34:47 Europe/Stockholm 2011;age;42;lat; 59.3267657;lon;18.0428283;accuracy;1072.0;oldnull?;true It says returning cache location, with the exact same accuracy, lon, lat, but CHANGED time! 4. We listen for 25-30 secs, but nothing more comes back, so eventually we unregister: 10-12 16:35:14.216: DEBUG/LocationManager(6774): removeUpdates: listener = com.karpet.nuba.android.service.LocationService $NubaLocationListener@4582cb78 I have no idea why this happens, but sometimes we can start and stop our listening for quite a while, 20-30 times when we've travelled quite far, to another cell tower, but still get old fixes as new callbacks! Help/Pointers would be extremely appreciated! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Mapview im Tab -- import com.google.* gehen nicht
Hi, habe eine App, mit ner Tab-View MainActivity mit 2 Tab´s, die auf mapActivity und logActivity verweisen jetzt ist das problem ist jetzt nur, das die mapactivity (ganz simple mapview) die googleApi nicht kennt da ich die MapActivity einzeln schon getestet habe, weiß ich das die auch läuft ich vermute mal das das geheimnis im manifest liegt ... ich poste es mal 1?xml version=1.0 encoding=utf-8? 2manifest xmlns:android=http://schemas.android.com/apk/res/android; 3 package=de.hsMerseburg.gesTracker 4 android:versionCode=1 5 android:versionName=1.0 6 uses-sdk android:minSdkVersion=10 / 7 8 uses-permission android:name=android.permission.ACCESS_COARSE_LOCATION / 9 uses-permission android:name=android.permission.ACCESS_FINE_LOCATION/ 10 uses-permission android:name=android.permission.INTERNET / 11 12 application android:icon=@drawable/icon android:label=@string/ app_name 13 uses-library android:name=com.google.android.maps / 14 activity android:name=mainActivity 15 android:label=@string/app_name 16 android:screenOrientation=portrait 17 18 intent-filter 19 action android:name=android.intent.action.MAIN / 20 category android:name=android.intent.category.LAUNCHER / 21 /intent-filter 22 /activity 23 24 activity android:name=.mapActivity / 25 activity android:name=logActivity / 26 27 /application 28/manifest -- 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] Sent/delivered SMS: how do you identify to which SMS the broadcast belongs?
In thread http://stackoverflow.com/questions/4639778/how-to-monitor-each-of-sent-sms-status it is described how you can monitor the status of a sent/delivered SMS via broadcast. However, I haven't found: how do you identify to which SMS the broadcast belongs? There doesn't seem to be any information in getResultData() nor getResultExtras() as far as I have checked. The use case is: I send multiple SMS in a loop one right after another. I want to monitor the status/success of the deliver for each message. How do I know which broadcast belongs to which message. (Delaying the delivery of each sms until I've gotten a broadcast for each previous one isn't really the best option, or only the last one to consider if there's no other way). -- 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: Sent/delivered SMS: how do you identify to which SMS the broadcast belongs?
Found the solution, using extras. When passing along extras to the pending intent, it's important to add the flag FLAG_UPDATE_CURRENT. Intent sendIntent = new Intent(SMS_SENT); sendIntent.putExtra(message, formattedMessage); sendIntent.putExtra(number, phone); PendingIntent sentPI = PendingIntent.getBroadcast(context, 0, sendIntent, PendingIntent.FLAG_UPDATE_CURRENT); -- 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: What does this mean: Failure [INSTALL_FAILED_CONTAINER_ERROR] ?
Turns out I need to mount the sdcard and remove the file ~/.android_secure/smdl2tmp1.asec via pc, then it works again. On Apr 21, 11:14 pm, Mathias Lin m...@mathiaslin.com wrote: I can avoid the error when not allowing the app to be installed on sdcard, setting android:installLocation=internalOnly in the manifest. It's ok for development, but for production, it's not really what I want - since my app is quite large with 17mb; therefore I prefer it to be on sdcard. How to ever be able to install it on the external memory without rooting the device (since this is the only way I could delete /mnt/ secure/asec/smdl2tmp1.asec afaik, which seems to be one solution as well as mentioned in some forums). On Apr 21, 8:41 pm, Mathias Lin m...@mathiaslin.com wrote: I try to deploy my app and sometimes get this error: Failure [INSTALL_FAILED_CONTAINER_ERROR] I tried to google it but don't find what the error means or what it's caused by. I deploy via IDE (IntelliJ) the file gets copied to the device to the /data/local/tmp (unrooted Huawei Ideos, running 2.2), but the package manager doesn't seem to like it. Before installing the apk, I already removed the app from the device beforehand. I also made sure there was no old file under /data/local/tmp on the device. Still I'm getting this error now. The package should be signed with the debug key, since I deploy via IDE by 'running' the app. $ pwd /data/local/tmp $ ls -l -rw-rw-rw- shell shell 17257686 2011-04-21 20:31 com.company.shop $ pm install -r com.company.shop pkg: com.company.shop Failure [INSTALL_FAILED_CONTAINER_ERROR] -- 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] What does this mean: Failure [INSTALL_FAILED_CONTAINER_ERROR] ?
I try to deploy my app and sometimes get this error: Failure [INSTALL_FAILED_CONTAINER_ERROR] I tried to google it but don't find what the error means or what it's caused by. I deploy via IDE (IntelliJ) the file gets copied to the device to the /data/local/tmp (unrooted Huawei Ideos, running 2.2), but the package manager doesn't seem to like it. Before installing the apk, I already removed the app from the device beforehand. I also made sure there was no old file under /data/local/tmp on the device. Still I'm getting this error now. The package should be signed with the debug key, since I deploy via IDE by 'running' the app. $ pwd /data/local/tmp $ ls -l -rw-rw-rw- shellshell17257686 2011-04-21 20:31 com.company.shop $ pm install -r com.company.shop pkg: com.company.shop Failure [INSTALL_FAILED_CONTAINER_ERROR] -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to develop a wheather forcast application for android
I agree with Marcin, especially as you would expect faster and better replies in the pro forum - why would a newbie ask a newbie - well of course some pros might also be happy to answer and mingle in the newbie forum maybe. More helpful would it be if people would just learn to be a bit more precise and structured - I mean, above can't be any more unspecific - what's the missing point? Which api to use? How to do a http request or parse a response, or how do get started with Android at all? Often (also in other forums), people ask so general questions like this and expect somebody to write their entire program as they have to hand in some program as their school assignment the next day ;) But first of all: http://lmgtfy.com/?q=android+weather+api On Apr 21, 9:46 pm, Marcin Orlowski webnet.andr...@gmail.com wrote: On 21 April 2011 15:24, Mike michael.martin.dvm@gmail.com wrote: Maybe what is needed is rather a separate forum (sandbox) for newbies. Everyone is a newbie at some point. A weather forecast app sounds like a very legitimate learning project and having somewhere for a newbie to ask for a hand getting started would be valuable. This is pointless as there's no way to newbie to admit he's a newbie and go to the right forum by himself. Without moderation it's not gonna work. Regards, Marcin Orlowski *Tray Agenda http://bit.ly/trayagenda* - keep you daily schedule handy... *Date In Tray* http://bit.ly/dateintraypro - current date at glance... WebnetMobile on *Facebook http://webnetmobile.com/fb/* and *Twitterhttp://webnetmobile.com/twitter/ * -- 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: What does this mean: Failure [INSTALL_FAILED_CONTAINER_ERROR] ?
I can avoid the error when not allowing the app to be installed on sdcard, setting android:installLocation=internalOnly in the manifest. It's ok for development, but for production, it's not really what I want - since my app is quite large with 17mb; therefore I prefer it to be on sdcard. How to ever be able to install it on the external memory without rooting the device (since this is the only way I could delete /mnt/ secure/asec/smdl2tmp1.asec afaik, which seems to be one solution as well as mentioned in some forums). On Apr 21, 8:41 pm, Mathias Lin m...@mathiaslin.com wrote: I try to deploy my app and sometimes get this error: Failure [INSTALL_FAILED_CONTAINER_ERROR] I tried to google it but don't find what the error means or what it's caused by. I deploy via IDE (IntelliJ) the file gets copied to the device to the /data/local/tmp (unrooted Huawei Ideos, running 2.2), but the package manager doesn't seem to like it. Before installing the apk, I already removed the app from the device beforehand. I also made sure there was no old file under /data/local/tmp on the device. Still I'm getting this error now. The package should be signed with the debug key, since I deploy via IDE by 'running' the app. $ pwd /data/local/tmp $ ls -l -rw-rw-rw- shell shell 17257686 2011-04-21 20:31 com.company.shop $ pm install -r com.company.shop pkg: com.company.shop Failure [INSTALL_FAILED_CONTAINER_ERROR] -- 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: Nexus S and gingerbread Sensor events — Which sensor uses what hardware ?
Hello, TYPE_ACCELEROMETER uses the accelerometer and only the accelerometer. It returns raw accelerometer events, with minimal or no processing at all. TYPE_GYROSCOPE (if present) uses the gyroscope and only the gyroscope. Like above, it returns raw events (angular speed un rad/s) with no processing at all (no offset / scale compensation). TYPE_ORIENTATION is deprecated. It returns the orientation as yaw/ pitch/roll in degres. It's not very well defined and can only be relied upon when the device has no roll. This sensor uses a combination of the accelerometer and the magnetometer. Marginally better results can be obtained using SensorManager's helpers. This sensor is heavily processed. TYPE_LINEAR_ACCELERATION, TYPE_GRAVITY, TYPE_ROTATION_VECTOR are fused sensors which return respectively the linear acceleration, gravity and rotation vector (a quaternion). It is not defined how these are implemented. On some devices they are implemented in h/w, on some devices they use the accelerometer + the magnetometer, on some other devices they use the gyro. On Nexus S and Xoom, the gyroscope is currently NOT used. They behave as if there was no gyro available, like on Nexus One or Droid. We are planing to improve this situation in a future release. Currently, the only way to take advantage of the gyro is to use TYPE_GYROSCOPE and integrate the output by hand. I hope this helps, Mathias On Mar 13, 3:03 am, Pritam pritamsha...@gmail.com wrote: Could someone help to know which sensor uses which part of phone's hardware or in what combination of this on Nexus S in android 2.3 ? Following are the sensor events: TYPE_ACCELEROMETER TYPE_GYROSCOPE TYPE_GRAVITY TYPE_LINEAR_ACCELERATION TYPE_ORIENTATION TYPE_ROTATION_VECTOR I assume first 2 corresponds to separate hardware (accelerometer and gyroscope), but how with the other remaining ones ? Does TYPE_LINEAR_ACCELERATION uses both Acceleromter and Gyroscope hardware at its best? I am actually interested in linear aceleration so should I need not worry about gyro events, if linear acceleration internally uses gyro to give out values ? Also when tested on device ( Nexus S ) linear accelerations found to give high values for minor shakes , so assuming this removes gravity vector, this was not expected. 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: QSB (Quick Search Bar): make suggestions editable
This is the workaround I came up with, but it's not perfect, because the search UI hides and shows again, instead of staying onscreen and just putting the query in the QSB search field. @Override protected void onNewIntent(Intent intent) { // TODO need to handle different cases, whether user tapped suggestion or hit the 'go' button if (Intent.ACTION_SEARCH.equals(intent.getAction())) { String query = intent.getStringExtra(SearchManager.QUERY); Toast.makeText(this, TRY TO PLACE QUERY IN QSB: + query, Toast.LENGTH_LONG).show(); SearchManager searchManager = (SearchManager)getSystemService(Context.SEARCH_SERVICE); Bundle b = intent.getBundleExtra(SearchManager.APP_DATA); searchManager.startSearch(query, true, this.getComponentName(), b, false); } } On Feb 2, 2:30 pm, Mathias Lin m...@mathiaslin.com wrote: How to make the suggestions in the QSB editable when the user clicks on it, instead of triggering the actual search? I.e. via an edit icon on the right, like on the Google Search app. See screenshot:http://i.imgur.com/M1C6a.png Is there a standard way to do it, or does it require to implement it from scratch, i.e. customized suggestion list item layout in xml with a button, custom searchbar implementation, etc.? I couldn't find any info on that onhttp://developer.android.com/intl/fr/guide/topics/search/searchable-c... and related docs. -- 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] QSB (Quick Search Bar): make suggestions editable
How to make the suggestions in the QSB editable when the user clicks on it, instead of triggering the actual search? I.e. via an edit icon on the right, like on the Google Search app. See screenshot: http://i.imgur.com/M1C6a.png Is there a standard way to do it, or does it require to implement it from scratch, i.e. customized suggestion list item layout in xml with a button, custom searchbar implementation, etc.? I couldn't find any info on that on http://developer.android.com/intl/fr/guide/topics/search/searchable-config.html and related docs. -- 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: motion effect in Rubber Band
You could probably use a TranslateAnimation with a BounceInterpolator http://developer.android.com/intl/fr/reference/android/view/animation/BounceInterpolator.html On Feb 2, 3:20 pm, Honest honestsucc...@gmail.com wrote: hello, I am creating Rubber Band effect in my ListView. So for that i created the class which extends AdapterView. When user ups the mouse i am setting the co-ordinate again so it is again re-positioning and there is similar effect but the problem is there is no motion effect. So can some one tell me how can i provide motion effect ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] How to get a contact's facebook id or url from native contacts / content resolver?
How to get the facebook id or url of a contacts that's been synced to the native contacts app via Facebook sync adapter? I went through different urls, but didn't see any info regarding facebook. I tried ContactsContract.Data.CONTENT_URI ContactsContract.CommonDataKinds.Email.CONTENT_URI ContactsContract.CommonDataKinds.Phone.CONTENT_URI ContactsContract.Contacts.CONTENT_URI as URIs already in the code below: Uri uri = ContactsContract.Data.CONTENT_URI; Cursor c = getContentResolver().query(uri, null, null, null, null); while (c.moveToNext()) { for (int i=0; ic.getColumnCount(); i++) { Log.d(TAG, c.getColumnName(i) + : + c.getString(i)); } Log.d(TAG, ==); } I do get a column value like contact_status_res_package: com.facebook.katana in this dump, and I also get the contacts status (column 'contact_status'), but nowhere do I see the facebook url or id of this contact. -- 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: Twitter Integration with Android app
I agree with Kumar, try Twitter4J. And you can check this blog post for a sample reg. OAuth authentication: http://consultingblogs.emc.com/nileeshabojjawar/archive/2010/03/18/twitter4j-oauth-generating-the-access-token.aspx On Nov 30, 11:48 pm, Kumar Bibek coomar@gmail.com wrote: Try Twiiter4J library. Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com On Tue, Nov 30, 2010 at 6:05 PM, Ajmer Singh ajmersing...@gmail.com wrote: Hi All I need to integrate the Twitter in my application,Could any body please let me know what are the best way to achieve this. I only need to Login and post a tweet in twitter from android app.Is there any sort of SDK for Twitter?. -- Thanks and Regards Ajmer Singh -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Twitter QuickActions Missing
I don't know why they changed the behaviour in the twitter app, just want to point you to an open source project for such component http://code.google.com/p/devoquickaction/ since you're looking into that topic. I recently looked into the same patterns. On Nov 9, 9:53 am, Alex awis...@gmail.com wrote: Hi all, Does anyone know why some of the QuickActions were removed from the latest Twitter application (v1.0.5)? Clicking on a user's picture use to bring up the QuickAction bar, but now takes you to a separate activity. I'd like to understand some of the best practices for Android apps and it was my understanding that Google was pushing QuickActions (pattern 6): http://android-developers.blogspot.com/2010/05/twitter-for-android-cl... I'd love to hear the thoughts of other app developers or even the Google engineers who worked on the Twitter application. --AW -- 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: Launch twitter Homepage
With Twitter4J you basically access the twitter service API, but not *launching* a twitter application/site, for example the native Twitter app for Android, nor the twitter website. Code sample for Twitter4J are here: http://twitter4j.org/en/code-examples.html -- 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: Where is the UI state information (used in super.onCreate(Bundle savedInstanceState)) stored ?
Hi Mark, thanks for your reply. Yes, it's probably managed by the system, yet I'm still wondering: Below you can see that the browser activity runs in different processes (#2307, #5536) before and after I killed/restarted it, and yet it's displaying / restoring the same UI input values entered by the user, regardless of being in an entire new process. So, are the two activities in these two processes actually the same instance? If so, why? (I was thinking of something like 'task parenting' to be eventually happening here, but it cannot be, since there's no android:allowTaskReparenting attribute in the application's manifest and the default value for an activity for such is false. And it would also mean that the activity wouldn't really be gone even after kill has been executed.) [*** some user input on UI in the browser app ***] # ps | grep -i browser ps | grep -i browser app_27 2307 75131944 25960 afe0da04 S com.android.browser # killall -9 com.android.browser killall -9 com.android.browser [*** browser is killed, then I press home long, select browser app from recent apps ***] # ps | grep -i browser ps | grep -i browser app_27 5536 75121868 24316 afe0da04 S com.android.browser [*** ... and the UI still shows values from the activity in the previous #2307 process *** ] On Nov 8, 8:19 pm, Mark Murphy mmur...@commonsware.com wrote: On Mon, Nov 8, 2010 at 1:37 AM, Mathias Lin m...@mathiaslin.com wrote: That's what I thought. But why is the UI state then not entirely cleared? AFAIK, applications do not hold the saved instance state -- the operating system does, in its own process. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- 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: Where is the UI state information (used in super.onCreate(Bundle savedInstanceState)) stored ?
Not too scary if you look at my scenario ;-) I have devices that I rent out to end-users through a hotel/concierge. These devices hold 1) my app, 2) browser, 3) facebook app. End-users (hotel guests) can rent the devices and return it to the hotel. The non-technical hotel concierge needs to be able to clear all user data with one click from 1) my app before handing it to another guest, without needing to go through the application settings of each application, clear data there. For a non-technical person, those would be too many steps. In fact, the concierge doesn't even have access to the device settings (he can only move around the mentioned three apps). Therefore I need a way to clear the data programmatically via script (one button click in my app). But I don't want to need a force a device reboot if that's not really necessary. I'd like to understand what's happening here, i.e. how can the two have the same instance state / bundle? Just because the two activities have the same package / class name? And also, why is there a difference whether the activity was last in the foreground or not. Ok..., I'm probably repeating what I already mentioned above. I know it's kind of a special use-case I'm having here... still trying to find a good solution hopefully without needing to force a reboot. I appreciate your input or any other ideas for such scenario. Thanks. On Nov 9, 1:14 am, Mark Murphy mmur...@commonsware.com wrote: On Mon, Nov 8, 2010 at 11:38 AM, Mathias Lin m...@mathiaslin.com wrote: thanks for your reply. Yes, it's probably managed by the system, yet I'm still wondering: Below you can see that the browser activity runs in different processes (#2307, #5536) before and after I killed/restarted it, and yet it's displaying / restoring the same UI input values entered by the user, regardless of being in an entire new process. That make sense. So, are the two activities in these two processes actually the same instance? That's not possible. Each process has its own VM. However, they might have the same *instance state* (i.e., Bundle). I have no real idea what you're trying to accomplish here -- what you originally posted sounds scary. However, the answer for dealing with all this in-flight instance state stuff is to reboot the phone. Since you're running a rooted phone, I would think there's a way to reboot it. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- 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: CameraPreview example distorted with samsung galaxy s
I had some issues with the SGS and cam as well, see my post at stackoverflow here: http://stackoverflow.com/questions/3213741/camera-preview-on-android-strange-on-samsung-galaxy-s and another post is here: http://stackoverflow.com/questions/3282238/camera-preview-on-galaxy-s/3282662#3282662 On Nov 9, 5:20 am, ping bernd.warm...@gmail.com wrote: Hey, Today i tried the sample code to get the camera preview working (http://developer.android.com/resources/samples/ApiDemos/src/com/ example/android/apis/graphics/CameraPreview.html) But the image looks distorted when i start the applictaion on my galaxy s. does anyone have the same problem? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Where is the UI state information (used in super.onCreate(Bundle savedInstanceState)) stored ?
Where is the UI state information (used in super.onCreate(Bundle savedInstanceState)) stored and how can it be deleted from another app or command line on a rooted phone? I need to delete the user data (username, password) of both the native Facebook app (com.facebook.katana) and the stock browser on Android (com.android.browser) on a rooted phone via command line (which I call from my own app) or elsewhere from my own app. This is what I'm calling: rm /data/data/com.android.browser/cache/webviewCache/* rm /data/data/com.android.browser/databases/* killall -9 com.android.browser rm /data/data/com.facebook.katana/cache/webviewCache/* rm /data/data/com.facebook.katana/databases/* killall -9 com.facebook.katana After I kill the facebook process, I check the running processesand there is no FB process running anymore. I then restart FB via long-press on home and choosing the FB app. Previous username/password still show on the login screen (= same screen as I left it before I killed the app). When I then press 'back' on the device, and then start the app again via home long-press / select FB, the login screen is empty. Where do the values for username/password come when I start FB again in the first place? I assume that the login activity still retrieves the savedInstanceState, but how could that be avoided - or else, where are those UI states actually stored, in order to delete them? Shouldn't the restarted app, after all it's processes are killed, already be in a new lifecycle? Same problem is with the stock browser: if i leave the browser and I'm on the login page of for example gmail.com where the username/password is entered (but form not submitted yet), then killing the browser process, the values (username) entered into the form will still be there after restarting the app again after it's been killed. -- 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: Where is the UI state information (used in super.onCreate(Bundle savedInstanceState)) stored ?
Ok. In my case, I cannot call finish() myself since it's a third party app (Facebook) and the native browser. Therefore I do a kill. Wouldn't that also end the lifecycle as well, with same effect as a finish() ? On Nov 8, 12:55 pm, Dianne Hackborn hack...@android.com wrote: It isn't stored anywhere persistent. It is only kept in RAM, and only for as long as that particular activity instance may need to be launched again. (That is, if you call finish(), that activity instance is gone, and any saved state no longer needs to be kept.) On Sun, Nov 7, 2010 at 8:52 PM, Mathias Lin m...@mathiaslin.com wrote: Where is the UI state information (used in super.onCreate(Bundle savedInstanceState)) stored and how can it be deleted from another app or command line on a rooted phone? I need to delete the user data (username, password) of both the native Facebook app (com.facebook.katana) and the stock browser on Android (com.android.browser) on a rooted phone via command line (which I call from my own app) or elsewhere from my own app. This is what I'm calling: rm /data/data/com.android.browser/cache/webviewCache/* rm /data/data/com.android.browser/databases/* killall -9 com.android.browser rm /data/data/com.facebook.katana/cache/webviewCache/* rm /data/data/com.facebook.katana/databases/* killall -9 com.facebook.katana After I kill the facebook process, I check the running processesand there is no FB process running anymore. I then restart FB via long-press on home and choosing the FB app. Previous username/password still show on the login screen (= same screen as I left it before I killed the app). When I then press 'back' on the device, and then start the app again via home long-press / select FB, the login screen is empty. Where do the values for username/password come when I start FB again in the first place? I assume that the login activity still retrieves the savedInstanceState, but how could that be avoided - or else, where are those UI states actually stored, in order to delete them? Shouldn't the restarted app, after all it's processes are killed, already be in a new lifecycle? Same problem is with the stock browser: if i leave the browser and I'm on the login page of for example gmail.com where the username/password is entered (but form not submitted yet), then killing the browser process, the values (username) entered into the form will still be there after restarting the app again after it's been killed. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Where is the UI state information (used in super.onCreate(Bundle savedInstanceState)) stored ?
That's what I thought. But why is the UI state then not entirely cleared? But I found the following difference though doing some more testing - I found there's a difference whether the activity is in the foreground or not when I do the kill: Case 1) I start the facebook app, I am on the login page, enter a username (but don't submit), then I switch to the Terminal app on my device (thus, the FB activity is not in the foreground anymore), then I kill all facebook processes (which I see via 'ps'), and restart the app (via home long-press, selected recent). The username is still there! Case 2) I start the facebook app, I am on the login page, enter a username (but don't submit). Then I kill the process via PC (adb shell), while the facebook login screen is still in the foreground when I do the kill). When I execute the kill command, I can see the FB activity getting closed on the device. When I then restart the app (via home long-press, selected recent), the username on the login screen is gone - as expected. Why is there a difference whether the application is in the foreground? How to clear the UI state of activities that are not in the foreground anymore? On Nov 8, 1:47 pm, Frank Weiss fewe...@gmail.com wrote: On a rooted phone, you ought to be able to kill the Linux process. Just finish or force close may not be secure since the Android OS lazily reclaims processes that are no longer in use. Although on a non-rooted phone this is not an issue, since the Android OS relies on Linux process security. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] How to protect video/audio content (OMA DRM on Android)
I'm looking for a way to protect video and audio content (around 2GB) from being copied / played on other devices than the one where the app has initially been bought and installed on. What's currently the best approach? I try to research on the web but can hardly find any up-to-date information on this topic for Android. I looked into the (controversial) OMA DRM, can hardly find any information on how to implement DRM management on Android, the Android docs give no information on that. I also looked at third party vendors and found around 2-3 (i.e. Mutable Inc., Discretix and Irdeto), I emailed them for further information but haven't heard back from any. It also seems that they're products/offerings are already outdated or not further supported, at least some websites aren't updated since 2007 (Mutable Inc.). Then there's an open source lib, OpenIPMP (http://sourceforge.net/projects/openipmp/) by Mutable Inc., but it also seems to been last updated in 2006. Interestingly I found on http://android.git.kernel.org/?p=platform/frameworks/base.git;a=commit;h=d074e30ce44b9e33da43b67a4515b8986ca72b26 the following notice: -- snip -- Initial contribution from Sony Corporation. Add DRM Framework to support DRM content playback together with StageFright. - DRM Framework code is added - include/drm - drm - api/current.xml is updated to include DRM Framework Java APIs - cmds/servicemanager/service_manager.c is modified to add drmManager and drmIOService. -- snap -- Is DRM implemented differently for StageFright and OpenCore - or does only one of those Framework support it? I found some DRM related classes in the developer docs, but not enough information to fully get the big picture. Many others ask similar question, nobody seems to know details. http://stackoverflow.com/questions/3462037/what-is-the-situation-with-android-support-for-oma-drm http://stackoverflow.com/questions/2524304/how-to-implement-oma-forward-lock-on-android http://stackoverflow.com/questions/2509688/oma-dm-features-supported-in-android-apis Some background on what I need: Our Android application holds ~ 2 GB of audio/video content which the user pays for and downloads. We now need to implement a way to secure the content from being copied. Here are some information what we need/have: - Android 2.x application - playing video/audio (i.e. mp4, but any Android supported format will do) - data is around 2GB (containing of many small files) - users/target group is in Mainland China only (for the moment) - for the user it's a one-time purchase, means he purchases all 2GB files at once (not per single file) - the media files are played back in our Android app with our implemented media player (http://developer.android.com/reference/android/media/MediaPlayer.html) or VideoView (http://developer.android.com/reference/android/widget/VideoView.html) -- 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: ContextMenu/AlertDialog with footer view (to add checkbox for 'make default' option)
Adding an additional item with setCheckable(true) doesn't work, since checking the checkbox also closes the dialog. Therefore the simplest way I came up with is to use an AlertDialog and add a CheckedTextView via alert.getListView().addFooterView(...); and overriding it's onItemSelected method. Would be great though if a standard context menu would also offer this by default already. On Nov 4, 1:48 pm, Mathias Lin m...@mathiaslin.com wrote: Is there a standard way to add a footer to a context menu, in which I can add a checkbox to make the selected option the default one? Similar to the context menu that comes up when choosing the default home screen for example. http://i.imgur.com/B2wvC.png From the Api docs for ContextMenu I see that you can set a header view, but not a footer view. Same for the AlertDialog, also only has a setCustomTitle() method, but nothing for the footer. Does this need to be done via a custom (alert) dialog? I would be wondering if nobody has yet developed such a component yet in case it's not possible through the standard SDK api. Any standalone open source component out there (beside the Android source code itself)? -- 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: onConfigurationChanged not being invoked
How do you know that onConfigurationChanged is never called? Are you overriding it and logging something there? Can you post the code of that. Did you make sure you're using the correct method signature / using @Override ? On Nov 4, 10:45 am, darrinps darri...@gmail.com wrote: I have an activity with onConfigurationChanged in it. I also have the manifest set up like this: activity android:name=.MySplashActivity android:configChanges=orientation|keyboardHidden android:label=@string/app_name intent-filter I thought that when the phone was rotated so that the landscape layout kicks in, that onConfigurationChanged would get called but it does not! I do see in the log though this: 11-03 21:38:59.788: INFO/ActivityManager(2259): Config changed: { scale=1.0 imsi=310/410 loc=en_US touch=3 keys=1/1/2 nav=1/1 orien=2 layout=34} I am certain that onConfigurationChanged is not getting called (have log statements and the debugger set...just never happens). So what am I doing wrong? Thanks! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Device name ?
You could use the SubscriberId / IMSI, but it cannot be detected with all SIM cards, depends on the SIM card. Or you can use the IMEI, the device id: TelephonyManager mTelephonyMgr = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE); String imei = mTelephonyMgr.getDeviceId(); But it's just a number, nothing really 'user friendly'. On Nov 4, 4:36 pm, Hatch tomislav.hecimo...@gmail.com wrote: Is there a way to get/set a generic device name ? My app will offer the user an option to use the same app on several devices and they will be aware of each other through server. 1) Is there anything in the APIs to allow me to fetch some kind of friendly device name (cannot be OS/model since user might have the same on both devices) ? 2) AFAICT the only option is to use Bluetooth name but how can I fetch my device name in code ? (and it's a nag do explain the user to use bluetooth just to set the name of the device) Regards, Hatch -- 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] ContextMenu/AlertDialog with footer view (to add checkbox for 'make default' option)
Is there a standard way to add a footer to a context menu, in which I can add a checkbox to make the selected option the default one? Similar to the context menu that comes up when choosing the default home screen for example. http://i.imgur.com/B2wvC.png From the Api docs for ContextMenu I see that you can set a header view, but not a footer view. Same for the AlertDialog, also only has a setCustomTitle() method, but nothing for the footer. Does this need to be done via a custom (alert) dialog? I would be wondering if nobody has yet developed such a component yet in case it's not possible through the standard SDK api. Any standalone open source component out there (beside the Android source code itself)? -- 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: Drag and Drop List Simple Example
Thanks for sharing. Can also look at http://stackoverflow.com/questions/2909311/android-list-view-drag-and-drop-sort http://github.com/commonsguy/cwac-touchlist for another example On Nov 1, 8:33 am, ericharlow eric.b.har...@gmail.com wrote: I struggled with finding and using a simple drag and drop list. I figured others would be looking for the same type of thing since android doesn't currently provide one. A simple Drag and Drop List Example can be found athttp://ericharlow.blogspot.com/2010/10/experience-android-drag-and-dr Hope this is helpful to others. -- 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] Width of LayoutParams for the outer ViewGroup ignored when set in java code (instead of xml layout)
I created a very simple activity where I create and set the views in java code instead of xml. The width I pass to the outer LinearLayout though has no effect at all (200px). The view is displayed across the entire width of the screen, no matter what value I pass here. (Note that this is just sample code; I know that in a real app you don't use fixed values nor px as unit. I just want to point out the issue I found for easier clarification). But if I use the xml layout instead where the outer LinearLayout has a value of 200px, it's applied properly and the view only takes 200px of the screen. Why does setting a fixed width in java code for the outer layout has no effect, as opposed to the width set in xml? In the activity code below, un/commenting either one of the lines: // setContentView(llOuter); // -- using views from xml setContentView(com.example.R.layout.main); // -- using views from code above should result in the same layout, not? Activity: = public class MyActivity extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // outer linear layout LinearLayout llOuter = new LinearLayout(this); llOuter.setLayoutParams(new LinearLayout.LayoutParams( 200, // *** this param has no effect *** LinearLayout.LayoutParams.FILL_PARENT )); llOuter.setBackgroundColor(Color.parseColor(#00ff00)); // inner linear layout LinearLayout llInner = new LinearLayout(this); llInner.setLayoutParams(new LinearLayout.LayoutParams( 100, // *** this param is applied correctly *** LinearLayout.LayoutParams.FILL_PARENT )); llInner.setBackgroundColor(Color.parseColor(#ff)); llOuter.addView(llInner); // setContentView(llOuter); // -- using views from xml setContentView(com.example.R.layout.main); // -- using views from code above } } main.xml = ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/android; android:id=@+id/llOuter android:tag=asdd android:layout_width=200px android:layout_height=fill_parent android:background=#00ff00 LinearLayout android:id=@+id/llInner android:layout_width=100px android:layout_height=fill_parent android:background=#ff / /LinearLayout -- 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: OMA DRM forward lock
Do you have any further information in general about DRM implementation? The Android developer docs don't mention any DRM methods at all, nevertheless, when I google, I find these package and classes mentioned a lot: android.drm.mobile1.DrmConstraintInfo android.drm.mobile1.DrmException android.drm.mobile1.DrmRawContent android.drm.mobile1.DrmRights android.drm.mobile1.DrmRightsManager But there's no information on how to make use of them. Are they not meant for public use? I also looked for third party commercial libs and found http://www.discretix.com/PDF/Discretix_DRM.pdf http://www.irdeto.com/documents/HL_CW_OMA_DRM_Android_EN_H.pdf Does anbody have experience with those on Android? On Oct 11, 8:10 pm, ferr ferdi.nina...@gmail.com wrote: Dear All, We are having trouble in usingDRMforward lock. Here is what we did: 1. send a *.dm file through a bluetooth 2. the android phone 'magically' converts it to *.dcf 3. we try to use android.drm.mobile1 to open the content, using the following code: is = new FileInputStream(somefile.dcf); DrmRawContent drc = new DrmRawContent(is, (int) is.available(), DrmRawContent.DRM_MIMETYPE_CONTENT_STRING); DrmRightsManager drm_manager = DrmRightsManager.getInstance(); DrmRights rights = drm_manager.queryRights(drc); //try to install rights if (null == rights) { rights = drm_manager.installRights(is, (int) is.available(), DrmRawContent.DRM_MIMETYPE_MESSAGE_STRING); } //start InputStream decrypted = drc.getContentInputStream(rights); .. .. However, the decrypted content was unable to be read. Did we do anything wrong in using the android.drm.mobile1 package functions? Best, Ferdi -- 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] TranslateAnimation doesn't animate straight (X-only) but also in Y-direction (diagonal)
I have a TranslateAnimation that shall animate a LinearLayout (isScrollContainer) to the left and to the right along the x-axis. The animation to the left works and the animation is straight - means that the view is animated horizontally only. But the animation left to right doesn't work: instead of just moving the view from left to right along the x-axis, the view gets animated into the screen from diagonal lower-right corner. But for the Y parameters I pass fixed identical values. Here is a flv movie that shows the animation and issue I described: http://tinyurl.com/24n4eac Code as follows: View v = ((MainSlide)mCtx).activityFrame; // my view to scroll/animate Animation mBounceAnim; // animate to left edge - this one works fine! mBounceAnim = new TranslateAnimation( Animation.ABSOLUTE, v.getScrollX(), // is somewhere between 0 - 239 Animation.ABSOLUTE, v.getScrollY(), Animation.ABSOLUTE, 0, Animation.ABSOLUTE, v.getScrollY() ); // == // *** THIS ONE DOESN'T WORK PROPERLY *** // == // animate to right edge mBounceAnim = new TranslateAnimation( Animation.ABSOLUTE, v.getScrollX(),// is somewhere between 240 - 480 Animation.ABSOLUTE, v.getScrollY(), Animation.ABSOLUTE, ((View)this.getParent()).getWidth(), // in my case is 480 Animation.ABSOLUTE, v.getScrollY() ); } mBounceAnim.setDuration(600); mBounceAnim.setFillBefore(false); mBounceAnim.setFillAfter(true); mBounceAnim.setInterpolator(new BounceInterpolator()); v.startAnimation(mBounceAnim); The view I'm animating is this: LinearLayout android:id=@+id/frame android:orientation=horizontal android:layout_width=960dp android:isScrollContainer=true android:layout_height=wrap_content/ (which is part of an ActivityGroup, where the LinearLayout holds the decorView of the activities; not sure if this matters in any way). -- 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: TranslateAnimation doesn't animate straight (X-only) but also in Y-direction (diagonal)
Better read the api doc more carefully... I just see that I switched the params by mistake, it's not x,y,x,y but x,x,y,y On Oct 26, 5:12 pm, Mathias Lin m...@mathiaslin.com wrote: I have a TranslateAnimation that shall animate a LinearLayout (isScrollContainer) to the left and to the right along the x-axis. The animation to the left works and the animation is straight - means that the view is animated horizontally only. But the animation left to right doesn't work: instead of just moving the view from left to right along the x-axis, the view gets animated into the screen from diagonal lower-right corner. But for the Y parameters I pass fixed identical values. Here is a flv movie that shows the animation and issue I described:http://tinyurl.com/24n4eac Code as follows: View v = ((MainSlide)mCtx).activityFrame; // my view to scroll/animate Animation mBounceAnim; // animate to left edge - this one works fine! mBounceAnim = new TranslateAnimation( Animation.ABSOLUTE, v.getScrollX(), // is somewhere between 0 - 239 Animation.ABSOLUTE, v.getScrollY(), Animation.ABSOLUTE, 0, Animation.ABSOLUTE, v.getScrollY() ); // == // *** THIS ONE DOESN'T WORK PROPERLY *** // == // animate to right edge mBounceAnim = new TranslateAnimation( Animation.ABSOLUTE, v.getScrollX(), // is somewhere between 240 - 480 Animation.ABSOLUTE, v.getScrollY(), Animation.ABSOLUTE, ((View)this.getParent()).getWidth(), // in my case is 480 Animation.ABSOLUTE, v.getScrollY() ); } mBounceAnim.setDuration(600); mBounceAnim.setFillBefore(false); mBounceAnim.setFillAfter(true); mBounceAnim.setInterpolator(new BounceInterpolator()); v.startAnimation(mBounceAnim); The view I'm animating is this: LinearLayout android:id=@+id/frame android:orientation=horizontal android:layout_width=960dp android:isScrollContainer=true android:layout_height=wrap_content/ (which is part of an ActivityGroup, where the LinearLayout holds the decorView of the activities; not sure if this matters in any way). -- 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: Wrong latitude/longitude points received by Emulator with new version of Android SDK
The map data in the Google Maps app and the maps that are available for developers to use via API (i.e. a MapView in Android SDK) come from different providers/sources, therefore the geo coordinates differ and the same lat/lng pair might pinpoint another location on both maps. You can see my post on stackoverflow here, especially my own reply to it: http://stackoverflow.com/questions/3289039/google-maps-apps-with-mapview-have-different-current-positions On Oct 24, 11:41 pm, Paul idi...@gmail.com wrote: This is not an app coding problem. I'm just calling toString on Location object. I can reproduce using Google Maps app on the emulator. Send emulator a known location (found using Google Maps web for example), and then use My Location on Google Maps app to see where it thinks that point is. Guess what, its off by a few hundred yards. I run the same example on the setup on my PC and everything is fine. This is some weird issue either Mac SDK or 64 bit SDK, or maybe even Java runtime (new version was recently installed on my Mac). So its not my math that needs to be checked, but someone elses, basically somewhere some funky conversion is going on, but its nothing that I've written. Also I have found one other person who had the same issue, posted on Stack Overflow (I've also posted there but no response yet). Its not something a lot of people would pick up on. You have to be testing a location based app and you have to be sending known locations to the app and then verifying that the app shows the correct point. On Oct 23, 11:19 pm, Frank Weiss fewe...@gmail.com wrote: Carefully check your math. Also note that truncation occurs when a decimal string is converted to a binary floating poit, and possibly also by internal microdegree conversion. Another thing to take into consideration is that if the original value has just two decimal digits of precision, 41.74, the output value should also use that precision, the fourteen decimal digits. -- 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] gmail.com not working on webview (after login)
I have a webview in my app that generally works fine for loading websites. But I cannot get www.gmail.com to work: when I open www.gmail.com I see the login page, try to login, afterwards the screen goes black and my app/process is killed. I don't see much in my logcat, just some strange debug information is being dumped as below. But generally https sites work fine, and even more complicated login procedures like opening stackoverflow.com, logging in via openid through https, back to stackoverflow, all work without a problem in my webview. Only gmail.com is giving me these problems. Logcat: I/DEBUG ( 2173): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** I/DEBUG ( 2173): Build fingerprint: 'Samsung/GT-I9000/GT-I9000/GT-I9000:2.1-update1/ECLAIR/XWJM6:user/release-keys' I/DEBUG ( 2173): pid: 6753, tid: 6793 com.myapplication.android I/DEBUG ( 2173): signal 11 (SIGSEGV), fault addr 004c I/DEBUG ( 2173): r0 r1 r2 r3 aa476ae0 I/DEBUG ( 2173): r4 r5 4c2f5b74 r6 aa476ae0 r7 00595dec I/DEBUG ( 2173): r8 4c2f5da8 r9 444a7eb8 10 444a7ea0 fp 004be758 I/DEBUG ( 2173): ip aa4770fc sp 4c2f5b50 lr aa1112bf pc aac0a5ac cpsr 4830 I/DEBUG ( 2173): #00 pc a5ac /system/lib/libsqlite.so I/DEBUG ( 2173): #01 pc 001112bc /system/lib/libwebcore.so I/DEBUG ( 2173): #02 pc 001118e2 /system/lib/libwebcore.so I/DEBUG ( 2173): #03 pc 00111a80 /system/lib/libwebcore.so I/DEBUG ( 2173): I/DEBUG ( 2173): code around pc: I/DEBUG ( 2173): aac0a59c f7ff60e3 2000fd49 bf00bd70 4604b570 I/DEBUG ( 2173): aac0a5ac 460d6cc0 f7ff4616 f8c4fd9d 230150e0 I/DEBUG ( 2173): aac0a5bc 60e4f8c4 508cf8d4 f885e002 68ad30ff I/DEBUG ( 2173): I/DEBUG ( 2173): code around lr: I/DEBUG ( 2173): aa1112ac 68004905 e0021859 68002100 f6f9460a I/DEBUG ( 2173): aa1112bc bd10ec32 0036583c ffc9a849 4604b570 I/DEBUG ( 2173): aa1112cc 46281d05 fd64f20b 46286826 60263e01 I/DEBUG ( 2173): I/DEBUG ( 2173): stack: I/DEBUG ( 2173): 4c2f5b10 I/DEBUG ( 2173): 4c2f5b14 aa31c6d3 /system/lib/libwebcore.so I/DEBUG ( 2173): 4c2f5b18 I/DEBUG ( 2173): 4c2f5b1c aa011171 /system/lib/libwebcore.so I/DEBUG ( 2173): 4c2f5b20 I/DEBUG ( 2173): 4c2f5b24 afe3ae08 /system/lib/libc.so I/DEBUG ( 2173): 4c2f5b28 afe3db7c I/DEBUG ( 2173): 4c2f5b2c afe0f170 /system/lib/libc.so I/DEBUG ( 2173): 4c2f5b30 I/DEBUG ( 2173): 4c2f5b34 afe3ae08 /system/lib/libc.so I/DEBUG ( 2173): 4c2f5b38 00595dec [heap] I/DEBUG ( 2173): 4c2f5b3c afe0f170 /system/lib/libc.so I/DEBUG ( 2173): 4c2f5b40 00595ddc [heap] I/DEBUG ( 2173): 4c2f5b44 4c2f5b74 I/DEBUG ( 2173): 4c2f5b48 df002777 I/DEBUG ( 2173): 4c2f5b4c e3a070ad I/DEBUG ( 2173): #00 4c2f5b50 00595ddc [heap] I/DEBUG ( 2173): 4c2f5b54 4c2f5b74 I/DEBUG ( 2173): 4c2f5b58 aa476ae0 /system/lib/libwebcore.so I/DEBUG ( 2173): 4c2f5b5c aa1112bf /system/lib/libwebcore.so I/DEBUG ( 2173): #01 4c2f5b60 00595ddc [heap] I/DEBUG ( 2173): 4c2f5b64 aa1118e7 /system/lib/libwebcore.so D/Zygote ( 2181): Process 6753 terminated by signal (11) I/ActivityManager( 2237): Process com.myapplication.android (pid 6753) has died. XML: WebView android:layout_width=fill_parent android:layout_height=fill_parent android:theme=@style/Theme.NoBackground android:id=@+id/webView/ Code: webView = (WebView)findViewById(R.id.webView); webView.getSettings().setJavaScriptEnabled(true); webView.getSettings().setLoadsImagesAutomatically(true); webView.getSettings().setAllowFileAccess(false); webView.getSettings().setBuiltInZoomControls(true); webView.getSettings().setPluginsEnabled(true); webView.getSettings().setAllowFileAccess(true); webView.getSettings().setAppCacheEnabled(true); WebViewClient wv = new MyWebViewClient(); webView.setWebViewClient(wv); /** * Customized webview client to allow mp4 to play in mediaplayer. */ final class MyWebViewClient extends WebViewClient { @Override public boolean shouldOverrideUrlLoading(WebView view, String url) { if (url.endsWith(.mp4)) { Intent intent = new Intent(android.intent.action.VIEW, Uri.parse(url)); view.getContext().startActivity(intent); return true; } else { return super.shouldOverrideUrlLoading(view, url); // instead of the line above, I have also tried this before without any difference: // view.loadUrl(url); // return true; } } -- 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] Re: gmail.com not working on webview (after login)
I found that if I don't assign a custom WebViewClient to the webview, the app doesn't crash but opens the gmail site in the default system browser. But I don't want that. I want it to open in my own webview only - how to force it? I filed a bug report under: http://code.google.com/p/android/issues/detail?id=12097 it seems to be related but not 100% identical to: http://code.google.com/p/android/issues/detail?id=11655 therefore new report. I also added a sample project / src to the bug report that allows to reproduce the crash. On Oct 23, 10:54 pm, Mathias Lin m...@mathiaslin.com wrote: I have a webview in my app that generally works fine for loading websites. But I cannot getwww.gmail.comto work: when I openwww.gmail.comI see the login page, try to login, afterwards the screen goes black and my app/process is killed. I don't see much in my logcat, just some strange debug information is being dumped as below. But generally https sites work fine, and even more complicated login procedures like opening stackoverflow.com, logging in via openid through https, back to stackoverflow, all work without a problem in my webview. Only gmail.com is giving me these problems. Logcat: I/DEBUG ( 2173): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** I/DEBUG ( 2173): Build fingerprint: 'Samsung/GT-I9000/GT-I9000/GT-I9000:2.1-update1/ECLAIR/XWJM6:user/release-k eys' I/DEBUG ( 2173): pid: 6753, tid: 6793 com.myapplication.android I/DEBUG ( 2173): signal 11 (SIGSEGV), fault addr 004c I/DEBUG ( 2173): r0 r1 r2 r3 aa476ae0 I/DEBUG ( 2173): r4 r5 4c2f5b74 r6 aa476ae0 r7 00595dec I/DEBUG ( 2173): r8 4c2f5da8 r9 444a7eb8 10 444a7ea0 fp 004be758 I/DEBUG ( 2173): ip aa4770fc sp 4c2f5b50 lr aa1112bf pc aac0a5ac cpsr 4830 I/DEBUG ( 2173): #00 pc a5ac /system/lib/libsqlite.so I/DEBUG ( 2173): #01 pc 001112bc /system/lib/libwebcore.so I/DEBUG ( 2173): #02 pc 001118e2 /system/lib/libwebcore.so I/DEBUG ( 2173): #03 pc 00111a80 /system/lib/libwebcore.so I/DEBUG ( 2173): I/DEBUG ( 2173): code around pc: I/DEBUG ( 2173): aac0a59c f7ff60e3 2000fd49 bf00bd70 4604b570 I/DEBUG ( 2173): aac0a5ac 460d6cc0 f7ff4616 f8c4fd9d 230150e0 I/DEBUG ( 2173): aac0a5bc 60e4f8c4 508cf8d4 f885e002 68ad30ff I/DEBUG ( 2173): I/DEBUG ( 2173): code around lr: I/DEBUG ( 2173): aa1112ac 68004905 e0021859 68002100 f6f9460a I/DEBUG ( 2173): aa1112bc bd10ec32 0036583c ffc9a849 4604b570 I/DEBUG ( 2173): aa1112cc 46281d05 fd64f20b 46286826 60263e01 I/DEBUG ( 2173): I/DEBUG ( 2173): stack: I/DEBUG ( 2173): 4c2f5b10 I/DEBUG ( 2173): 4c2f5b14 aa31c6d3 /system/lib/libwebcore.so I/DEBUG ( 2173): 4c2f5b18 I/DEBUG ( 2173): 4c2f5b1c aa011171 /system/lib/libwebcore.so I/DEBUG ( 2173): 4c2f5b20 I/DEBUG ( 2173): 4c2f5b24 afe3ae08 /system/lib/libc.so I/DEBUG ( 2173): 4c2f5b28 afe3db7c I/DEBUG ( 2173): 4c2f5b2c afe0f170 /system/lib/libc.so I/DEBUG ( 2173): 4c2f5b30 I/DEBUG ( 2173): 4c2f5b34 afe3ae08 /system/lib/libc.so I/DEBUG ( 2173): 4c2f5b38 00595dec [heap] I/DEBUG ( 2173): 4c2f5b3c afe0f170 /system/lib/libc.so I/DEBUG ( 2173): 4c2f5b40 00595ddc [heap] I/DEBUG ( 2173): 4c2f5b44 4c2f5b74 I/DEBUG ( 2173): 4c2f5b48 df002777 I/DEBUG ( 2173): 4c2f5b4c e3a070ad I/DEBUG ( 2173): #00 4c2f5b50 00595ddc [heap] I/DEBUG ( 2173): 4c2f5b54 4c2f5b74 I/DEBUG ( 2173): 4c2f5b58 aa476ae0 /system/lib/libwebcore.so I/DEBUG ( 2173): 4c2f5b5c aa1112bf /system/lib/libwebcore.so I/DEBUG ( 2173): #01 4c2f5b60 00595ddc [heap] I/DEBUG ( 2173): 4c2f5b64 aa1118e7 /system/lib/libwebcore.so D/Zygote ( 2181): Process 6753 terminated by signal (11) I/ActivityManager( 2237): Process com.myapplication.android (pid 6753) has died. XML: WebView android:layout_width=fill_parent android:layout_height=fill_parent android:theme=@style/Theme.NoBackground android:id=@+id/webView/ Code: webView = (WebView)findViewById(R.id.webView); webView.getSettings().setJavaScriptEnabled(true); webView.getSettings().setLoadsImagesAutomatically(true); webView.getSettings().setAllowFileAccess(false); webView.getSettings().setBuiltInZoomControls(true); webView.getSettings().setPluginsEnabled(true); webView.getSettings().setAllowFileAccess(true); webView.getSettings().setAppCacheEnabled(true); WebViewClient wv = new MyWebViewClient(); webView.setWebViewClient(wv); /** * Customized webview client to allow mp4 to play in mediaplayer. */ final class MyWebViewClient extends WebViewClient { �...@override public boolean shouldOverrideUrlLoading(WebView view
[android-developers] Re: using instrumentation testing framework if there is more than one activity
Hi Andrei, not directly answering your question, but just want to point you to www.robotium.org, which is a testing framework and does tests across multiple activities. On Oct 18, 11:02 am, Andrei gml...@gmail.com wrote: How do I use instrumentation testing framework to test flow between activities? The example goog gives is for one activity only 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: Googlenav package
Hi Steve, if you don't provide real-time turn-by-turn directions (which is not allowed for gps powered devices due to license issues as Mark already mentioned) but just want to provide the route and directions which you calculate in advance, you can fetch the kml dataset from the google maps web api, parse it and use it together with your mapview to display the route and eventual markers. For more info on that, see the code sample here: http://stackoverflow.com/questions/3109158/how-to-draw-a-path-on-a-map-using-kml-file/3109723#3109723 Mathias On Oct 15, 12:36 am, Steve fon...@gmail.com wrote: Hi, I can't import com.google.googlenav package in my class (SDK 1.0) so I looked up (SDK 0.9) an android.jar file I could see this package. I been told that that googlenav package is no longer supported? Any one have alternative to solve the problem with driving direction? -- 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: QuickContact works fine on 2.2 but not on 2.1
Nevermind, I just see I was using an insert-uri instead of a lookup. Nevertheless, despite the wrong uri, it worked ok in 2.2 before. On Oct 10, 11:08 am, Mathias Lin m...@mathiaslin.com wrote: I have a ListView where I want to show the QuickContact (like in the default Contacts android app when you click on the photo of a contact). It works fine on my Nexus One 2.2 or the emulator with avd 2.2, but doesn't work on my Samsung Galaxy S 2.1update1 or emulator 2.1. On 2.1, I'm getting the error: android.content.ActivityNotFoundException: No Activity found to handle Intent { act= com.android.contacts.action.QUICK_CONTACT dat=content://contacts/people/2177 This is the call in the code: public final void onItemClick(final AdapterView? parent, final View view, final int position, final long id) { ContactSummary summary = (ContactSummary) parent.getItemAtPosition(position); // Quick Contact Badge ContentValues values = new ContentValues(); values.put(Contacts.People.NAME, summary.formattedName); Uri uri = getContentResolver().insert(Contacts.People.CONTENT_URI, values); ContactsContract.QuickContact.showQuickContact(this.getApplicationContext() , view, uri, ContactsContract.QuickContact.MODE_MEDIUM, null); } -- 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] QuickContact works fine on 2.2 but not on 2.1
I have a ListView where I want to show the QuickContact (like in the default Contacts android app when you click on the photo of a contact). It works fine on my Nexus One 2.2 or the emulator with avd 2.2, but doesn't work on my Samsung Galaxy S 2.1update1 or emulator 2.1. On 2.1, I'm getting the error: android.content.ActivityNotFoundException: No Activity found to handle Intent { act= com.android.contacts.action.QUICK_CONTACT dat=content://contacts/people/2177 This is the call in the code: public final void onItemClick(final AdapterView? parent, final View view, final int position, final long id) { ContactSummary summary = (ContactSummary) parent.getItemAtPosition(position); // Quick Contact Badge ContentValues values = new ContentValues(); values.put(Contacts.People.NAME, summary.formattedName); Uri uri = getContentResolver().insert(Contacts.People.CONTENT_URI, values); ContactsContract.QuickContact.showQuickContact(this.getApplicationContext(), view, uri, ContactsContract.QuickContact.MODE_MEDIUM, null); } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to display route on Google map in Android
Here's a complete code sample: http://stackoverflow.com/questions/3109158/how-to-draw-a-path-on-a-map-using-kml-file/3109723#3109723 HTH On Sep 8, 9:19 pm, cool.manish mannishga...@gmail.com wrote: Hi All, How to display route on Google map in Android in between two lat long value? Does android supports it and are there any api available as there are for displaying map? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to display route on Google map in Android
MapView only displays a map, no method do draw a route is explicitly in there. You use your custom method. Please see my link earlier in this thread, it gives you a complete code sample. On Sep 8, 11:42 pm, cool.manish mannishga...@gmail.com wrote: Hi Victor, Isn't Android Map display only Map. Is it also display route for some partcular arguments? On Sep 8, 8:17 pm, viktor victor.scherb...@gmail.com wrote: Geocoder geoCoder = new Geocoder(context); ListAddress addressList = geoCoder.getFromLocationName(address, 1); where address contain street or city, or zip For displaying rout you can use standard Android Map, only call it with specific Intent -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: How does Android determine whether to move the layout up when showing the softkeyboard?
Hi Dianne, thanks for your reply. You'd need to set your view hierarchy to not correctly resize to adjust to its window How can I 'achieve' that (setting a view hierarchy that wouldn't correctly resize)? But even if the view hierarchy would be correctly set, why would it resize at all? It shall not. I definitely didn't set any flag regarding window resizing, neither in code nor in xml. What's especially weird here: if I hide my ListView by setting it to View.INVISIBLE, so that it even takes the same space(!) as if it would when View.VISIBLE, the behaviour is different: the window does *not* resize. And all I did here was changing the visibility-attribute, no changes to any window attribute or flag regarding resizing. You can see an updated screenshot here - to compare the activity when the ListView is visible(1) and invisible(2) and it's behaviour when I press the search button. http://img819.imageshack.us/img819/9330/screenshotsearch.png As you can see, there are definitely also other elements in the layout that require some space (i.e. the black footer bar), and also since I just set the listView to 'invisible' rather than 'gone', I cannot find a logic explanation for the different behaviour. Possibly a bug? XML Layout: http://pastebin.com/5zzVxjbK (ListView has android:id=@+id/category_questions) Thanks, Mathias On Sep 7, 11:28 am, Dianne Hackborn hack...@android.com wrote: The window is just resized if you set it to resize mode. You'd need to set your view hierarchy to not correctly resize to adjust to its window, which is... questionable. On Mon, Sep 6, 2010 at 7:57 PM, Mathias Lin m...@mathiaslin.com wrote: Hi Ed, On Sep 7, 6:25 am, Ed edscha...@gmail.com wrote: Instead of View.INVISIBLE try View.GONE. Sorry, you misunderstood. View.INVISIBLE was just for testing purposes to see if it makes any differences. In my app I cannot hide the elements of course, I need them there to be visible to the user. I just wanted to point out that by setting View.INVISIBLE to the listView, the behaviour I want (the layout to stay fix) can be achieved, but I am wondering *why* ? What's the logic behind it? (So both View.INVISIBLE and View.GONE already have the same desired effect; but I *do* want to show the element to the user of course.) http://developer.android.com/reference/android/view/View.html Also in your scroll view layout try setting android:fillViewport=true on the scroll view. The scroll view works fine, with the scrollView, the layout remains fix (what I want); I want the layout that uses the *ListView* to stay fixed as well when I press the search button. I also already tried to set android:isScrollContainer=false to the list view, but it makes no difference either. (ListView doesn't have a fillViewport attribute) Mathias Ed On Sep 7, 12:03 am, Mathias Lin m...@mathiaslin.com wrote: Interestingly though: when I set my ListView visibility to View.INVISIBLE in my first activity, then the layout doesn not get moved up anymore! This is my layout/xml: 1)http://pastebin.com/5zzVxjbK ListView where layouts is been moved up by the softkeyboard 2)http://pastebin.com/KFtPuHvP ScrollView/LinearLayout, where layout remains fix by the softkeyboard On Sep 6, 8:48 pm, Mathias Lin m...@mathiaslin.com wrote: How does Android determine whether to move the layout up when showing the softkeyboard? Note: I am aware that the activity property android:windowSoftInputMode=adjustResize|adjustResize| adjustUnspecified exists, as described herehttp:// developer.android.com/guide/topics/manifest/activity-element.h... , but in my case it doesn't seem to have any effect. This is my problem: I have two activities, pretty much the same layout, but the first one is using a ListView that holds a list of buttons. The second activity holds a scrollview with buttons. The rest is the same, same number of buttons, same height of elements, etc. (All elements fit on the screen, so actually the user doesn't need to scroll in the scrollview or listview.) Please see my screenshot to get an idea:http://i.imgur.com/UNXPz.png Now, when I press the search button to open the search input bar, in my first activity, the entire layouts gets moved up. While on the second activity, the layout is not being moved up but the softkeyboard just displays on top of it. This is actually how I want it to behave. How can I achieve the same with my activity that's using the ListView? In my manifest, initially I didn't specify any android:windowSoftInputMode attribute, but even if I do, it doesn't make any difference; I tried all three values (adjustPan, adjustResize, adjustUndefined, without any difference). This is my layout:http://i.imgur.com/UNXPz.png (I'm
[android-developers] Re: How does Android determine whether to move the layout up when showing the softkeyboard?
On Sep 8, 8:58 am, Dianne Hackborn hack...@android.com wrote: You make a broken view hierarchy that uses fixed sizes, so doesn't adjust to the actual window size. Again, not something I would recommend. I don't see how non-fixed sizes make a difference here in my case. I have two activities with an almost identical view hierarchy, where the most outer LinearLayouts are identical, the very outer one using android:layout_height=wrap_content and the next inner one a fixed size of android:layout_height=480dp. The only difference between those activities is that in one activity I'm using ScrollView android:id=@+id/category_questions android:layout_height=wrap_content android:layout_width=fill_parent while in the other - at the same corresponding hierarchy level - I'm using ListView android:id=@+id/category_questions android:layout_height=fill_parent android:layout_width=fill_parent/ And that's the only main difference that already causes different behaviour! When using a ScrollView, even with fixed height of the very outer LinearLayout, everything works as I wanted and the window does not get resized / the layout does not get moved up by the softkeyboard. (Also setting android:layout_height=wrap_content or android:isScrollContainer=true|false for the ListView doesn't make any difference either.) @Kenny: I'm aware of that attribute, but it doesn't make any difference. I've also tried to explicitly set the property to adjustPan and also to adjustResize to see if there's any difference, but there's none at all. activity android:name=.activity.directory.Category android:label=Category android:windowSoftInputMode=adjustPan android:screenOrientation=portrait Don't know what all is going on there. You could try using hierarchyviewer to see what is going on with your view hierarchy. One possibility is that you haven't explicitly set resize or pan mode, so the framework is trying to infer this for you, and when the list view is invisible it considers it not to be there and thus there not being any resizable parts of the window, causing it to fall back to pan mode. If I don't define android:windowSoftInputMode, the default should be adjustUnspecified. And the behaviour for my two activities should be the same, since both are containing a view that can scroll content(ListView, ScrollView). In the docs for android:windowSoftInputMode=adjustUnspecified it says: The system will automatically select one of these modes depending on whether the content of the window has any layout views that can scroll their contents. causing it to fall back to pan mode. Pan mode is what I want, if I understand correctly that this is the mode where the softkeyboard just shows on top of the existing layout without moving it up. (not sure what 'get panned' mean in the Android docs, I'm not native). But as said, I've also tried to explicitly set the android:windowSoftInputMode attribute, and it doesn't make any difference. Regards, Mathias -- 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 does Android determine whether to move the layout up when showing the softkeyboard?
How does Android determine whether to move the layout up when showing the softkeyboard? Note: I am aware that the activity property android:windowSoftInputMode=adjustResize|adjustResize| adjustUnspecified exists, as described here http://developer.android.com/guide/topics/manifest/activity-element.html#wsoft , but in my case it doesn't seem to have any effect. This is my problem: I have two activities, pretty much the same layout, but the first one is using a ListView that holds a list of buttons. The second activity holds a scrollview with buttons. The rest is the same, same number of buttons, same height of elements, etc. (All elements fit on the screen, so actually the user doesn't need to scroll in the scrollview or listview.) Please see my screenshot to get an idea: http://i.imgur.com/UNXPz.png Now, when I press the search button to open the search input bar, in my first activity, the entire layouts gets moved up. While on the second activity, the layout is not being moved up but the softkeyboard just displays on top of it. This is actually how I want it to behave. How can I achieve the same with my activity that's using the ListView? In my manifest, initially I didn't specify any android:windowSoftInputMode attribute, but even if I do, it doesn't make any difference; I tried all three values (adjustPan, adjustResize, adjustUndefined, without any difference). This is my layout: http://i.imgur.com/UNXPz.png (I'm not posting any code here for now, I'm more interested generally how it's been exactly determined whether Android moves the layout up or just displays they softkeyboard right on top of the existing layout without moving it.) I couldn't find a specific logic that's been followed. When I reduce the number of buttons, when I even wrap the listView in a ScrollView (just for the sake of trying to see what's happening), the layout just won't stay fix. On the other hand then, I have activities in my app that contain only one large ListView, and on that one the layout also remains fixed. First I thought it's related to ListViews, but it seems not to. btw: nowhere in my manifest am I explicitly specifying the windowSoftInputMode attribute. -- 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 does Android determine whether to move the layout up when showing the softkeyboard?
Interestingly though: when I set my ListView visibility to View.INVISIBLE in my first activity, then the layout doesn not get moved up anymore! This is my layout/xml: 1) http://pastebin.com/5zzVxjbK ListView where layouts is been moved up by the softkeyboard 2) http://pastebin.com/KFtPuHvP ScrollView/LinearLayout, where layout remains fix by the softkeyboard On Sep 6, 8:48 pm, Mathias Lin m...@mathiaslin.com wrote: How does Android determine whether to move the layout up when showing the softkeyboard? Note: I am aware that the activity property android:windowSoftInputMode=adjustResize|adjustResize| adjustUnspecified exists, as described herehttp://developer.android.com/guide/topics/manifest/activity-element.h... , but in my case it doesn't seem to have any effect. This is my problem: I have two activities, pretty much the same layout, but the first one is using a ListView that holds a list of buttons. The second activity holds a scrollview with buttons. The rest is the same, same number of buttons, same height of elements, etc. (All elements fit on the screen, so actually the user doesn't need to scroll in the scrollview or listview.) Please see my screenshot to get an idea:http://i.imgur.com/UNXPz.png Now, when I press the search button to open the search input bar, in my first activity, the entire layouts gets moved up. While on the second activity, the layout is not being moved up but the softkeyboard just displays on top of it. This is actually how I want it to behave. How can I achieve the same with my activity that's using the ListView? In my manifest, initially I didn't specify any android:windowSoftInputMode attribute, but even if I do, it doesn't make any difference; I tried all three values (adjustPan, adjustResize, adjustUndefined, without any difference). This is my layout:http://i.imgur.com/UNXPz.png (I'm not posting any code here for now, I'm more interested generally how it's been exactly determined whether Android moves the layout up or just displays they softkeyboard right on top of the existing layout without moving it.) I couldn't find a specific logic that's been followed. When I reduce the number of buttons, when I even wrap the listView in a ScrollView (just for the sake of trying to see what's happening), the layout just won't stay fix. On the other hand then, I have activities in my app that contain only one large ListView, and on that one the layout also remains fixed. First I thought it's related to ListViews, but it seems not to. btw: nowhere in my manifest am I explicitly specifying the windowSoftInputMode attribute. -- 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 does Android determine whether to move the layout up when showing the softkeyboard?
Hi Ed, On Sep 7, 6:25 am, Ed edscha...@gmail.com wrote: Instead of View.INVISIBLE try View.GONE. Sorry, you misunderstood. View.INVISIBLE was just for testing purposes to see if it makes any differences. In my app I cannot hide the elements of course, I need them there to be visible to the user. I just wanted to point out that by setting View.INVISIBLE to the listView, the behaviour I want (the layout to stay fix) can be achieved, but I am wondering *why* ? What's the logic behind it? (So both View.INVISIBLE and View.GONE already have the same desired effect; but I *do* want to show the element to the user of course.) http://developer.android.com/reference/android/view/View.html Also in your scroll view layout try setting android:fillViewport=true on the scroll view. The scroll view works fine, with the scrollView, the layout remains fix (what I want); I want the layout that uses the *ListView* to stay fixed as well when I press the search button. I also already tried to set android:isScrollContainer=false to the list view, but it makes no difference either. (ListView doesn't have a fillViewport attribute) Mathias Ed On Sep 7, 12:03 am, Mathias Lin m...@mathiaslin.com wrote: Interestingly though: when I set my ListView visibility to View.INVISIBLE in my first activity, then the layout doesn not get moved up anymore! This is my layout/xml: 1)http://pastebin.com/5zzVxjbK ListView where layouts is been moved up by the softkeyboard 2)http://pastebin.com/KFtPuHvP ScrollView/LinearLayout, where layout remains fix by the softkeyboard On Sep 6, 8:48 pm, Mathias Lin m...@mathiaslin.com wrote: How does Android determine whether to move the layout up when showing the softkeyboard? Note: I am aware that the activity property android:windowSoftInputMode=adjustResize|adjustResize| adjustUnspecified exists, as described herehttp://developer.android.com/guide/topics/manifest/activity-element.h... , but in my case it doesn't seem to have any effect. This is my problem: I have two activities, pretty much the same layout, but the first one is using a ListView that holds a list of buttons. The second activity holds a scrollview with buttons. The rest is the same, same number of buttons, same height of elements, etc. (All elements fit on the screen, so actually the user doesn't need to scroll in the scrollview or listview.) Please see my screenshot to get an idea:http://i.imgur.com/UNXPz.png Now, when I press the search button to open the search input bar, in my first activity, the entire layouts gets moved up. While on the second activity, the layout is not being moved up but the softkeyboard just displays on top of it. This is actually how I want it to behave. How can I achieve the same with my activity that's using the ListView? In my manifest, initially I didn't specify any android:windowSoftInputMode attribute, but even if I do, it doesn't make any difference; I tried all three values (adjustPan, adjustResize, adjustUndefined, without any difference). This is my layout:http://i.imgur.com/UNXPz.png (I'm not posting any code here for now, I'm more interested generally how it's been exactly determined whether Android moves the layout up or just displays they softkeyboard right on top of the existing layout without moving it.) I couldn't find a specific logic that's been followed. When I reduce the number of buttons, when I even wrap the listView in a ScrollView (just for the sake of trying to see what's happening), the layout just won't stay fix. On the other hand then, I have activities in my app that contain only one large ListView, and on that one the layout also remains fixed. First I thought it's related to ListViews, but it seems not to. btw: nowhere in my manifest am I explicitly specifying the windowSoftInputMode attribute. -- 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: cannot get my location to work on android 2.2
It's a known issue with the emulator, see the bug report here: http://code.google.com/p/android/issues/detail?id=8816 Works fine on real device. On emulator, use an older version (7 should work). On Sep 6, 10:07 am, sunny menon1...@gmail.com wrote: Hi Folks, my app which was working on 2.1 and earlier version fails to run properly in 2.2. It relies on the location but I do not get any error message. However under DDMS /logCat, I see a message saying:Error message while getting the location address: Reason: this service is not available. This is coming more as an information message rather than an exception or error. The process that is printing it out is System.out. Note that I did everything possible ( I can think of) to upgrade the app to run in android 2.2 The API version was changed to 8. The manifest file contains all the following:- ... ... uses-library android:name=*com.google.android.maps*/ /application uses-sdk android:minSdkVersion=*8* / uses-permission android:name=*android.permission.INTERNET*/ uses-permission android:name=*android.permission.ACCESS_FINE_LOCATION* / uses-permission android:name=*android.permission.ACCESS_COARSE_LOCATION* / anything else I need to do ? its very frustrating... any help would be greatly appreciated.. thanks Sunny -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Statistics on Rooted Phones
But, I am wondering how will this number help anyone.On 06.09.2010 13:36, Tez wrote: This number can be quite interesting (together with the reasons why users root - obviously due to limitations, but which are the main...?!); if somebody roots a phone, even though they lose guarantee by doing so, there must be a reason for it, which indicates that the user might not be entirely satisfied with the stock system or the limitations he gets with it. So imho it is relevant and interesting for vendors. Its just a research study we are carrying. Certain operations can be performed on a rooted phone and some of them are security threats. We would like to quantify certain statements we make. Also, now that rooting is legal, I expect a rise in the no. of users who would root their phones. Cheers, Earlence On Sep 6, 9:35 am, Kumar Bibekcoomar@gmail.com wrote: Ummm, not that I know of. Even if it were there, it would be an enormous task to update it regularly. Users keep on switching. Even a small sample of users cannot actually give you the approx numbers. But, I am wondering how will this number help anyone. :) -Kumar Bibekhttp://techdroid.kbeanie.com On Sep 4, 7:14 pm, Tezearlencefe...@gmail.com wrote: Hi, Is there any statistic/research study on the no. of users who root their phones? Cheers, Earlence -- 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: Enable usb debugging (under settings/applications/development) programatically from within app
Thanks for the info. It's clear now. enable adb by hand: I don't want to deliver the device with adb enabled, because I don't want the end-user to be able to do anything with adb. Scenario is that my client (very non-technical) does the data sync between PC application and Android device (using adb in the background), so all he needs to do is plug in the device and sync from within the Android application. In fact, he cannot even leave the application. So everything should be handled from the application, incl. enabling adb end disabling adb when the data sync is completed. This non-technical client will hand/rent out the device to other people for daily usage. I don't want those people to be mess around with adb in any way. On Aug 12, 7:03 pm, Kostya Vasilyev kmans...@gmail.com wrote: Ordinary applications can't change Secure settings. The built-in settings application can change secure settings because it has a special key that the firmware knows about. Unless you create your own firmware, you can't give your application the same functionality. Now, any reason why you couldn't enable adb by hand, before handing over the device with the application to the customer? - Kostya 12.08.2010 5:37, Mathias Lin : Thanks for the info. But as I understand it, the settings are read only: Secure system settings, containing system preferences that applications can read but are not allowed to write. These are for preferences that the user must explicitly modify through the system UI or specialized APIs for those values, not modified directly by applications. .. or could you please tell me about the special key - couldn't find any information about where to get or register such key. With 'platform knows about' you mean the key needs to be registered with the device first outside the app? (Since I'm in full control of the devices and bundle the app together with a device for distribution, that would be doable). On Aug 12, 4:49 am, Kostya Vasilyevkmans...@gmail.com wrote: ... but that is a Secure setting and, as such, can only be manipulated by applications signed with a special key (that the platform knows about). -- Kostya Vasilyev --http://kmansoft.wordpress.com 12.08.2010 0:26 QRqro...@gmail.com : usb debugging is another name for the Android Debug Bridge (ADB). The item you're looking for is here:http://developer.android.com/reference/android/provider/Settings.Secu... On Aug 11, 5:39 am, Mathias Linm...@mathiaslin.com wrote: Is it possible to enable usb debuggi... I was looking at Permission.WRITE_SETTINGS andhttp:// developer.android.com/reference/android/provider/Settings.Syst... but couldn't find any appropriate setting there. -- You received this message because you are su... -- Kostya Vasilev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: about handle the home key
You cannot disable the home button via SDK. See http://www.mail-archive.com/android-developers@googlegroups.com/msg52244.html On Aug 13, 9:19 am, 李实 lishi1...@gmail.com wrote: thank you for help,but you may mistake me. what I really want to do is to disable the home key,when my activity is running . and the code in the xml is my attempt. when home is pressed,then android probably sent an intent home. in my activity,android find it has HOME category,so it does nothing,so the home key is disabled . As i wrote,it works in AVD but not in a SAMSUMG phone. I wonder if there is other way to kick the goal. 2010/8/12 Mathias Lin m...@mathiaslin.com I do the same on a Samsung Galaxy S with 2.1update1 and 2.2 without a problem. The approach you described is correct. My intent filter looks similar: intent-filter action android:name=android.intent.action.MAIN/ category android:name=android.intent.category.LAUNCHER/ category android:name=android.intent.category.HOME/ category android:name=android.intent.category.DEFAULT/ /intent-filter When you press the home button first, you should get a dialog where to choose the home application to use, which is where the user can optionally tick a checkbox to set the selected app as the default home screen, so that the dialog won't show again. So, this dialog only comes up on the emulator but never appeared on your real phone? On Aug 8, 12:47 pm, ʵ lishi1...@gmail.com wrote: I'm working on a slide-unlock program and I want it take the place of Android KeyguardLock. there is one last thing todo.it's the home key. I google it and found we cannnot handle it as the other keys with onkeydown,dispatchkeyevent method. so I add this action android:name=android.intent.action.MAIN / category android:name=android.intent.category.HOME / category android:name=android.intent.category.DEFAULT / to activity. It does works on AVD! I think Android receive home intent when home key is pressed ,then it try to find someone to handle the intent.it found two can handle this.And one of the two happens to my program and my program is on.so it send the intent to my program .So,the home key is disabled when my program is running. But,it does not work on a samsung true phone!! what can I do,is there any other way to make it?? thanks! Simon Lee -- 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 -- execuse me for my poor English -- 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] Question about purpose of CALL_PRIVILEGED permission (not working as stated in the docs)
Hi Dianne (and anbody else), on http://developer.android.com/reference/android/Manifest.permission.html I read CALL_PRIVILEGED: Allows an application to call any phone number, _including emergency numbers_, without going through the Dialer user interface for the user to confirm the call being placed. while on this previous post http://markmail.org/message/vokag6tjz55qct5j#query:+page:1+mid:edtclmkfkd5qse65+state:results you (Dianne) replied: Sorry, emergency dialing is not something we can expose to third party applications. Above reads contradictory, therefore I'm wondering, what's the purpose of CALL_PRIVILEGED that can be set in the manifest? Or is it not supposed to be in the docs anymore (deprecated)? In the docs it's explicitly mentioned that emergency numbers are included. Thanks! Mathias -- 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] Enable usb debugging (under settings/applications/development) programatically from within app
Is it possible to enable usb debugging (under settings/applications/development) programatically from within my app? I was looking at Permission.WRITE_SETTINGS and http://developer.android.com/reference/android/provider/Settings.System.html but couldn't find any appropriate setting there. -- 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: about handle the home key
I do the same on a Samsung Galaxy S with 2.1update1 and 2.2 without a problem. The approach you described is correct. My intent filter looks similar: intent-filter action android:name=android.intent.action.MAIN/ category android:name=android.intent.category.LAUNCHER/ category android:name=android.intent.category.HOME/ category android:name=android.intent.category.DEFAULT/ /intent-filter When you press the home button first, you should get a dialog where to choose the home application to use, which is where the user can optionally tick a checkbox to set the selected app as the default home screen, so that the dialog won't show again. So, this dialog only comes up on the emulator but never appeared on your real phone? On Aug 8, 12:47 pm, 实 lishi1...@gmail.com wrote: I'm working on a slide-unlock program and I want it take the place of Android KeyguardLock. there is one last thing todo.it's the home key. I google it and found we cannnot handle it as the other keys with onkeydown,dispatchkeyevent method. so I add this action android:name=android.intent.action.MAIN / category android:name=android.intent.category.HOME / category android:name=android.intent.category.DEFAULT / to activity. It does works on AVD! I think Android receive home intent when home key is pressed ,then it try to find someone to handle the intent.it found two can handle this.And one of the two happens to my program and my program is on.so it send the intent to my program .So,the home key is disabled when my program is running. But,it does not work on a samsung true phone!! what can I do,is there any other way to make it?? thanks! Simon Lee -- 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: Location from cell site or from Triangulation
Hi, you can find sample code here: http://stackoverflow.com/questions/3145089/what-is-the-simplest-and-most-robust-way-to-get-the-users-current-location-in-an/3145655#3145655 Cheers, Mathias On Aug 11, 1:00 pm, Ajmer singh ajmer.si...@evontech.com wrote: Hi Coryat Thanks for your reply.However can you please let me know how we can do that in android i mean is there any code that you can send or a link to that code packet. On Wed, Aug 11, 2010 at 12:09 AM, Maps.Huge.Info (Maps API Guru) cor...@gmail.com wrote: Yes, it can. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- *Thanks and Regards Ajmer Singh* -- 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: Enable usb debugging (under settings/applications/development) programatically from within app
Thanks for the info. But as I understand it, the settings are read only: Secure system settings, containing system preferences that applications can read but are not allowed to write. These are for preferences that the user must explicitly modify through the system UI or specialized APIs for those values, not modified directly by applications. .. or could you please tell me about the special key - couldn't find any information about where to get or register such key. With 'platform knows about' you mean the key needs to be registered with the device first outside the app? (Since I'm in full control of the devices and bundle the app together with a device for distribution, that would be doable). On Aug 12, 4:49 am, Kostya Vasilyev kmans...@gmail.com wrote: ... but that is a Secure setting and, as such, can only be manipulated by applications signed with a special key (that the platform knows about). -- Kostya Vasilyev --http://kmansoft.wordpress.com 12.08.2010 0:26 пользователь QR qro...@gmail.com написал: usb debugging is another name for the Android Debug Bridge (ADB). The item you're looking for is here:http://developer.android.com/reference/android/provider/Settings.Secu... On Aug 11, 5:39 am, Mathias Lin m...@mathiaslin.com wrote: Is it possible to enable usb debuggi... I was looking at Permission.WRITE_SETTINGS andhttp:// developer.android.com/reference/android/provider/Settings.Syst... but couldn't find any appropriate setting there. -- You received this message because you are su... -- 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: Strange out of memory issue on Nexus One
Alex, see this: http://stackoverflow.com/questions/3238388/android-out-of-memory-exception-in-gallery/3238945#3238945 On Aug 5, 2:54 pm, Alex Xin xinxi...@gmail.com wrote: Hi, I'm using DDMS to track my app's allocation event and heap memory size. I found that my app only use 2M-4M heap memory, so it's impossible to have out of memory issue. thanks BRs Alex On Thu, Aug 5, 2010 at 2:17 AM, Romain Guy romain...@android.com wrote: The amount of RAM your phone has doesn't matter. One a WVGA device, the maximum amount of memory you can use in your app is 24 MB. You are using too much memory (or leaking memory) in yoru app. On Wed, Aug 4, 2010 at 11:14 AM, Alex Xin xinxi...@gmail.com wrote: Hi, All I'm now facing a very strange out of memory issue on Nexus One. I have a user leaves a comment in market said that my app always got force closed on his Nexus One, then I try to contact that user and ask for the logcat. Here's the logcat: E/AndroidRuntime( 4016): FATAL EXCEPTION: main E/AndroidRuntime( 4016): java.lang.OutOfMemoryError: bitmap size exceeds VM budget E/AndroidRuntime( 4016): at android.graphics.Bitmap.nativeCreate(Native Method) E/AndroidRuntime( 4016): at android.graphics.Bitmap.createBitmap(Bitmap.java:468) E/AndroidRuntime( 4016): at android.graphics.Bitmap.createBitmap(Bitmap.java:435) E/AndroidRuntime( 4016): at android.graphics.Bitmap.createScaledBitmap(Bitmap.java:340) E/AndroidRuntime( 4016): at android.graphics.BitmapFactory.finishDecode(BitmapFactory.java:488) E/AndroidRuntime( 4016): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:462) E/AndroidRuntime( 4016): at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:323) E/AndroidRuntime( 4016): at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:697) E/AndroidRuntime( 4016): at android.content.res.Resources.loadDrawable(Resources.java:1767) E/AndroidRuntime( 4016): at android.content.res.Resources.getDrawable(Resources.java:588) E/AndroidRuntime( 4016): at android.widget.ImageView.resolveUri(ImageView.java:489) E/AndroidRuntime( 4016): at android.widget.ImageView.setImageResource(ImageView.java:274) E/AndroidRuntime( 4016): at xcxin.filexpert.FileAdapter.getView(FileAdapter.java:273) E/AndroidRuntime( 4016): at android.widget.AbsListView.obtainView(AbsListView.java:1294) E/AndroidRuntime( 4016): at android.widget.GridView.makeAndAddView(GridView.java:1219) E/AndroidRuntime( 4016): at android.widget.GridView.makeRow(GridView.java:265) E/AndroidRuntime( 4016): at android.widget.GridView.fillDown(GridView.java:218) E/AndroidRuntime( 4016): at android.widget.GridView.fillGap(GridView.java:185) E/AndroidRuntime( 4016): at android.widget.AbsListView.trackMotionScroll(AbsListView.java:2944) E/AndroidRuntime( 4016): at android.widget.AbsListView$FlingRunnable.run(AbsListView.java:2485) E/AndroidRuntime( 4016): at android.os.Handler.handleCallback(Handler.java:587) E/AndroidRuntime( 4016): at android.os.Handler.dispatchMessage(Handler.java:92) E/AndroidRuntime( 4016): at android.os.Looper.loop(Looper.java:123) E/AndroidRuntime( 4016): at android.app.ActivityThread.main(ActivityThread.java:4627) E/AndroidRuntime( 4016): at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime( 4016): at java.lang.reflect.Method.invoke(Method.java:521) E/AndroidRuntime( 4016): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) E/AndroidRuntime( 4016): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) E/AndroidRuntime( 4016): at dalvik.system.NativeStart.main(Native Method) As we all could see, we have an out of memory issue here, here's the code that cause this exception: vh.iv.setImageResource(R.drawable.zip); I try to render a item with image. The problem is that this app works great on other phones, include HTC Dream, which only has 192MB of RAM, but Nexus One has 512MB of RAM. So if it's really the memory leak issue, why it's not in Dream? Does anyone has the same issue? How do you solve that? Thank you BRs, Alex -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Romain Guy Android framework engineer romain...@android.com Note: please don't send
[android-developers] Re: join android google group
Nice, welcome to the group. So, while I'm talking to a Samsung Android dev... why not take the chance...: Can you please have the unnecessarily introduced Task Manager button removed from the 'recent apps' menu that comes up on long-pressed home button. It's been there only since recently (2.1 JF3 and Froyo) and there's no way remove/disable the button nor the entire Samsung Task Manager app. http://www.forceclose.com/questions/2540/how-to-disable-hide-task-manager-button-on-samsung-galaxy-s-2-1-jm2-froyo-2-2 (This newly added button alone makes me require to switch from Galaxy S back to HTC phones for my app (which is distributed bundled with the device), if I don't want to root.) Cheers. (well, asking doesn't cost... ;) On Aug 5, 4:55 pm, awesomeandroid priyaranjan@gmail.com wrote: hi, i am currently working in samsung as a software engineer on android platform. -- 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] Cannot playback video from internal storage (/data/data/com.myapp/some/folders/video.mp4)
I have an application with a lot of media data (images and videos) that were previously stored on the sdcard. With that, images and videos are displayed fine in my app. Now, in order to secure the content more, I wanted to move the content to the internal storage / data dir of the app, which I did. I copied all media with a routine within my app to the data folder (/data/data/com.myapp/some/folders/video.mp4) and adjusted the path in my app so that it would look for the media in the internal storage data directory and not the sdcard anymore. Everything works fine, images are being displayed (decoded) properly, but videos don't play. They files do exist though - I do not get a FileNotFound exception. But an IOException: java.io.IOException: Prepare failed.: status=0xFFFC Why is that? Everything is handled within my one app and the videos have been copied with the same routine as the images, thus having the same permission settings. Looking at the stack trace, it all runs in process id 18060). Why I cannot playback the video from internal storage? Or how can I? Thanks. V/MediaPlayer(18060): message received msg=100, ext1=-4, ext2=-4 E/MediaPlayer(18060): SISO TEST MEDIA_ERROR E/MediaPlayer(18060): error (-4, -4) V/MediaPlayer(18060): signal application thread V/MediaPlayer(18060): callback application V/MediaPlayer(18060): back from callback V/MediaPlayer(18060): prepare complete - status=-4 E/MyApp(18060): vp Exception in btnVideoPause prep E/MyApp(18060): java.io.IOException: Prepare failed.: status=0xFFFC E/MyApp(18060): at android.media.MediaPlayer.prepare(Native Method) E/MyApp(18060): at com.myapp.android.activity.videoplayer.VideoPlayer.playVideo(VideoPlayer.java:302) E/MyApp(18060): at com.myapp.android.activity.videoplayer.VideoPlayer.surfaceCreated(VideoPlayer.java:432) E/MyApp(18060): at android.view.SurfaceView.updateWindow(SurfaceView.java:532) E/MyApp(18060): at android.view.SurfaceView.dispatchDraw(SurfaceView.java:339) E/MyApp(18060): at android.view.ViewGroup.drawChild(ViewGroup.java:1638) E/MyApp(18060): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367) E/MyApp(18060): at android.view.ViewGroup.drawChild(ViewGroup.java:1638) E/MyApp(18060): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367) E/MyApp(18060): at android.view.View.draw(View.java:6796) E/MyApp(18060): at android.widget.FrameLayout.draw(FrameLayout.java:352) E/MyApp(18060): at android.view.ViewGroup.drawChild(ViewGroup.java:1640) E/MyApp(18060): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367) E/MyApp(18060): at android.view.View.draw(View.java:6796) E/MyApp(18060): at android.widget.FrameLayout.draw(FrameLayout.java:352) E/MyApp(18060): at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:1901) E/MyApp(18060): at android.view.ViewRoot.draw(ViewRoot.java:1407) E/MyApp(18060): at android.view.ViewRoot.performTraversals(ViewRoot.java:1163) E/MyApp(18060): at android.view.ViewRoot.handleMessage(ViewRoot.java:1727) E/MyApp(18060): at android.os.Handler.dispatchMessage(Handler.java:99) E/MyApp(18060): at android.os.Looper.loop(Looper.java:123) E/MyApp(18060): at android.app.ActivityThread.main(ActivityThread.java:4627) E/MyApp(18060): at java.lang.reflect.Method.invokeNative(Native Method) E/MyApp(18060): at java.lang.reflect.Method.invoke(Method.java:521) E/MyApp(18060): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:871) E/MyApp(18060): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:629) E/MyApp(18060): at dalvik.system.NativeStart.main(Native Method) I/MediaPlayer(18060): Info (1,26) -- 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: Internal Storage
The assets folder would probably be suitable for your case, see http://thedevelopersinfo.com/2009/11/17/using-assets-in-android/ On Aug 4, 11:44 am, Dosa dosa1...@gmail.com wrote: I am writing a app that reads a file from the internal storage on startup. I have followed the guildelines here:http://developer.android.com/guide/topics/data/data-storage.html#file... It sucessfully works on the emulator, and I can find the file my app created under DDMS data data com.MyAppName files. Now I would like to install my app on a real device, but do I need to explictly copy the file onto the device? If so, what's the location should I copy the file to? Or will the file be created when I install my app? I need some poiters or guidelines, I'm quite clueless about the device. Or perhaps if anyone knows any keywords for me to search for an answer would be great! Any help would be appreciated. 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: Cannot playback video from internal storage (/data/data/com.myapp/some/folders/video.mp4)
Hi, if any of the android/sdk developer team is reading this - could one of you please briefly state whether it's generally possible to play videos from internal storage folder (i.e. /data/data/com.mypackage.app/ files/)? I googled for the problem I'm having and found that same question without any reply/solution yet at http://stackoverflow.com/questions/3038474/can-a-videoview-play-a-video-stored-on-internal-storage http://groups.google.com/group/android-beginners/browse_thread/thread/69c6a19898bd73ae and also tried to look at the mediaplayer source code and android dev docs to find any hint but didn't find anything there either. Any hint on this is much appreciated. Thanks a lot! Mathias On Aug 4, 5:21 pm, Mathias Lin m...@mathiaslin.com wrote: I have an application with a lot of media data (images and videos) that were previously stored on the sdcard. With that, images and videos are displayed fine in my app. Now, in order to secure the content more, I wanted to move the content to the internal storage / data dir of the app, which I did. I copied all media with a routine within my app to the data folder (/data/data/com.myapp/some/folders/video.mp4) and adjusted the path in my app so that it would look for the media in the internal storage data directory and not the sdcard anymore. Everything works fine, images are being displayed (decoded) properly, but videos don't play. They files do exist though - I do not get a FileNotFound exception. But an IOException: java.io.IOException: Prepare failed.: status=0xFFFC Why is that? Everything is handled within my one app and the videos have been copied with the same routine as the images, thus having the same permission settings. Looking at the stack trace, it all runs in process id 18060). Why I cannot playback the video from internal storage? Or how can I? Thanks. V/MediaPlayer(18060): message received msg=100, ext1=-4, ext2=-4 E/MediaPlayer(18060): SISO TEST MEDIA_ERROR E/MediaPlayer(18060): error (-4, -4) V/MediaPlayer(18060): signal application thread V/MediaPlayer(18060): callback application V/MediaPlayer(18060): back from callback V/MediaPlayer(18060): prepare complete - status=-4 E/MyApp(18060): vp Exception in btnVideoPause prep E/MyApp(18060): java.io.IOException: Prepare failed.: status=0xFFFC E/MyApp(18060): at android.media.MediaPlayer.prepare(Native Method) E/MyApp(18060): at com.myapp.android.activity.videoplayer.VideoPlayer.playVideo(VideoPlayer.ja va:302) E/MyApp(18060): at com.myapp.android.activity.videoplayer.VideoPlayer.surfaceCreated(VideoPlay er.java:432) E/MyApp(18060): at android.view.SurfaceView.updateWindow(SurfaceView.java:532) E/MyApp(18060): at android.view.SurfaceView.dispatchDraw(SurfaceView.java:339) E/MyApp(18060): at android.view.ViewGroup.drawChild(ViewGroup.java:1638) E/MyApp(18060): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367) E/MyApp(18060): at android.view.ViewGroup.drawChild(ViewGroup.java:1638) E/MyApp(18060): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367) E/MyApp(18060): at android.view.View.draw(View.java:6796) E/MyApp(18060): at android.widget.FrameLayout.draw(FrameLayout.java:352) E/MyApp(18060): at android.view.ViewGroup.drawChild(ViewGroup.java:1640) E/MyApp(18060): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367) E/MyApp(18060): at android.view.View.draw(View.java:6796) E/MyApp(18060): at android.widget.FrameLayout.draw(FrameLayout.java:352) E/MyApp(18060): at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.jav a:1901) E/MyApp(18060): at android.view.ViewRoot.draw(ViewRoot.java:1407) E/MyApp(18060): at android.view.ViewRoot.performTraversals(ViewRoot.java:1163) E/MyApp(18060): at android.view.ViewRoot.handleMessage(ViewRoot.java:1727) E/MyApp(18060): at android.os.Handler.dispatchMessage(Handler.java:99) E/MyApp(18060): at android.os.Looper.loop(Looper.java:123) E/MyApp(18060): at android.app.ActivityThread.main(ActivityThread.java:4627) E/MyApp(18060): at java.lang.reflect.Method.invokeNative(Native Method) E/MyApp(18060): at java.lang.reflect.Method.invoke(Method.java:521) E/MyApp(18060): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java: 871) E/MyApp(18060): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:629) E/MyApp(18060): at dalvik.system.NativeStart.main(Native Method) I/MediaPlayer(18060): Info (1,26) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to capture long press of menu button
I found the solution, very obvious, but somehow I was always just looking at onKeyUp, instead of onKeyDown. Overriding onKeyDown works fine. @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_MENU) { return true; } else return super.onKeyDown(keyCode, event); } On Jul 27, 11:46 pm, Mathias Lin m...@mathiaslin.com wrote: Thanks for your reply. Not sure though what you mean with compatibility reasons - in fact all phones handle it differently anyways? Why wouldn't it be wise to allow developers to disable it? I didn't fully get the idea. About disabling such functions: there are situations where it makes sense to disable it. In my case I bundle an app with a device that I'm giving to the users. So only my app runs on the device anyway, it starts at boot-time, and I'm in control of the devices (just renting it out to users); still I don't want to root it or modify the core in any way due to guarantee reasons. In my case, I've put specific features on the menu button and the other soft buttons, but I don't want the default behaviour to appear on long press; I'd like to override it with the same app-specific behaviour that I use for a short press on this button (which I can capture via onKeyUp for example). Actually I would like to get the behaviour as it is on my G1 (1.6): which is that long press is the same as short press. There's no difference between long press and short press. Not sure if it's due to 1.6 version on it, but I think so. But on my Nexus One (2.2) it's different (showing the soft keyboard) and on the Samsung Galaxy S (2.1) as well. Doesn't make much sense to me to have a search widget hidden behind the menu button on long press. I understand that the home button shouldn't be able to be overriden in order not to trap users in your app; but why shouldn't the developer be able to handle the menu button/long press? On Jul 27, 10:34 pm, Joseph Earl joseph.w.e...@gmail.com wrote: I don't think you can. Pressing and holding the menu button to show the soft keyboard exists for compatibility reasons - I'm not sure it would be wise to allow developers to disable it. On Jul 27, 12:18 pm, Mathias Lin m...@mathiaslin.com wrote: How can I capture a long press of the device menu button in my application? I thought of an intent filter, but there's only an action called android.intent.action.SEARCH_LONG_PRESS, but nothing for the MENU button. I found that long press of the menu button actually does different things on different devices, i.e. on Nexus One it will show the soft keyboard, while on Samsung Galaxy S it will pop up the search widget. Generally, I want to suppress this behaviour in my app. (I already looked on StackOverflow.com for some hints but only found unanswered posts.) -- 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: Nexus One for developers
It's already on the market long time ago. You can buy it regardless if you're a developer or not. I.e. http://www.expansys.com/d.aspx?i=193858 Maybe not in local stores in your country, but definitely alternative online markets than the Google N1 website itself. Where are you based? On Jul 29, 9:06 pm, Rafael Martins rafaelwmart...@gmail.com wrote: Does anyone know when will be possible to buy the Nexus One from the market as a registered developer? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] How to capture long press of menu button
How can I capture a long press of the device menu button in my application? I thought of an intent filter, but there's only an action called android.intent.action.SEARCH_LONG_PRESS, but nothing for the MENU button. I found that long press of the menu button actually does different things on different devices, i.e. on Nexus One it will show the soft keyboard, while on Samsung Galaxy S it will pop up the search widget. Generally, I want to suppress this behaviour in my app. (I already looked on StackOverflow.com for some hints but only found unanswered posts.) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to capture long press of menu button
Thanks for your reply. Not sure though what you mean with compatibility reasons - in fact all phones handle it differently anyways? Why wouldn't it be wise to allow developers to disable it? I didn't fully get the idea. About disabling such functions: there are situations where it makes sense to disable it. In my case I bundle an app with a device that I'm giving to the users. So only my app runs on the device anyway, it starts at boot-time, and I'm in control of the devices (just renting it out to users); still I don't want to root it or modify the core in any way due to guarantee reasons. In my case, I've put specific features on the menu button and the other soft buttons, but I don't want the default behaviour to appear on long press; I'd like to override it with the same app-specific behaviour that I use for a short press on this button (which I can capture via onKeyUp for example). Actually I would like to get the behaviour as it is on my G1 (1.6): which is that long press is the same as short press. There's no difference between long press and short press. Not sure if it's due to 1.6 version on it, but I think so. But on my Nexus One (2.2) it's different (showing the soft keyboard) and on the Samsung Galaxy S (2.1) as well. Doesn't make much sense to me to have a search widget hidden behind the menu button on long press. I understand that the home button shouldn't be able to be overriden in order not to trap users in your app; but why shouldn't the developer be able to handle the menu button/long press? On Jul 27, 10:34 pm, Joseph Earl joseph.w.e...@gmail.com wrote: I don't think you can. Pressing and holding the menu button to show the soft keyboard exists for compatibility reasons - I'm not sure it would be wise to allow developers to disable it. On Jul 27, 12:18 pm, Mathias Lin m...@mathiaslin.com wrote: How can I capture a long press of the device menu button in my application? I thought of an intent filter, but there's only an action called android.intent.action.SEARCH_LONG_PRESS, but nothing for the MENU button. I found that long press of the menu button actually does different things on different devices, i.e. on Nexus One it will show the soft keyboard, while on Samsung Galaxy S it will pop up the search widget. Generally, I want to suppress this behaviour in my app. (I already looked on StackOverflow.com for some hints but only found unanswered posts.) -- 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] GpsStatusListener: no satellites used in fix although status is GpsStatus.GPS_EVENT_FIRST_FIX
I added a gps status listener to my location manager in order see when I get the first fix. When I receive the GPS_EVENT_FIRST_FIX I then loop through all the satellites, but why is none of them used in the fix? (usedInFix()). My log says 'false' for all satellites? final class GpsStatusListener implements GpsStatus.Listener { public void onGpsStatusChanged(int i) { if (i==GpsStatus.GPS_EVENT_FIRST_FIX) { Log.d(APP, gpsx.fixed.); for (GpsSatellite sat:locationManager.getGpsStatus(null).getSatellites()) { Log.d(APP, gpsx.GpsStatus.Sat.fixed: + sat.usedInFix()); } } } } Log output: gpsx.fixed. gpsx.GpsStatus.Sat.fixed: false gpsx.GpsStatus.Sat.fixed: false gpsx.GpsStatus.Sat.fixed: false -- 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] Google Maps apps with mapview have different current positions
I have a mapview where I want to track the user's current location. GPS as well as 'use wireless networks' is activated in my phone settings. Nevertheless, since I'm indoor I don't get a GPS fix, therefore the location is determined via network; wifi spot is available. I have the Google Maps app running as well as my application running. Strangely, the current location differes between Google Maps and my application, where the Google Maps is very accurate while in my app the location is somehow off a few 100 meters. In my application I basically do the following (for debugging purposes now): 1) initially place one marker on the map: geopoint retrieved via locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER); 2) initially place another marker on the map: geopoint retrieved via locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER); This will put the last known locations of both providers onto the map (eventually last known from outside my app). 3) then for the regular updates (since I don't get a GPS fix anyway indoor here), I do: locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 0, 0, baseLocationListener); You can see for the frequency and distance I pass the 0 param in both cases. In the app manifest, the following permissions are granted: android.permission.ACCESS_COARSE_LOCATION android.permission.ACCESS_FINE_LOCATION android.permission.ACCESS_MOCK_LOCATION Actually my baseLocationListener does get called, which I see in the log, but the updated location is somehow the same as the last known current position (of LocationManager.NETWORK_PROVIDER), same lat/lng. I thought maybe I overlooked something or missed a parameter or setting, or my code has a bug. Therefore I installed some other (3 in total) LBS apps from the Android market that also show the current user's location. The current locations displayed in those apps are equals to the one in my application - and they're all some 100 meters off - but at least all the same. See the screenshot here: http://img33.imageshack.us/img33/8679/mapproblem.png Now I am wondering: 1) as I understand, getLastKnowLocation is system-wide and not app-wide, why are there differences between the location in Google maps and all the other apps? 2) does Google Maps not update the lastKnownLocation of a provider? 3) does Google Maps use a different custom location provider (i.e. due to licensing reasons) other than GPS_PROVIDER or NETWORK_PROVIDER as they are in the SDK? 4) how do achieve the same accurate result with the NETWORK_PROVIDER like Google Maps does? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Google Maps apps with mapview have different current positions Options
I think I found an answer, although not a solution. It seems that the problem is in the data quality of the different map provider that are used for Google Maps and MapView in SDK, which differ. The map tiles coordinates don't seem to be very accurate, just like in the public google maps web api / tiles. See this screenshot for an example, where I pinned the same geo point. http://img339.imageshack.us/i/gmaps2.png/ The map using the public map api is off a few hundred meters. Seems that we just have to live with it. On Jul 20, 6:32 pm, Mathias Lin m...@mathiaslin.com wrote: I have a mapview where I want to track the user's current location. GPS as well as 'use wireless networks' is activated in my phone settings. Nevertheless, since I'm indoor I don't get a GPS fix, therefore the location is determined via network; wifi spot is available. I have the Google Maps app running as well as my application running. Strangely, the current location differes between Google Maps and my application, where the Google Maps is very accurate while in my app the location is somehow off a few 100 meters. In my application I basically do the following (for debugging purposes now): 1) initially place one marker on the map: geopoint retrieved via locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER); 2) initially place another marker on the map: geopoint retrieved via locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER); This will put the last known locations of both providers onto the map (eventually last known from outside my app). 3) then for the regular updates (since I don't get a GPS fix anyway indoor here), I do: locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 0, 0, baseLocationListener); You can see for the frequency and distance I pass the 0 param in both cases. In the app manifest, the following permissions are granted: android.permission.ACCESS_COARSE_LOCATION android.permission.ACCESS_FINE_LOCATION android.permission.ACCESS_MOCK_LOCATION Actually my baseLocationListener does get called, which I see in the log, but the updated location is somehow the same as the last known current position (of LocationManager.NETWORK_PROVIDER), same lat/lng. I thought maybe I overlooked something or missed a parameter or setting, or my code has a bug. Therefore I installed some other (3 in total) LBS apps from the Android market that also show the current user's location. The current locations displayed in those apps are equals to the one in my application - and they're all some 100 meters off - but at least all the same. See the screenshot here:http://img33.imageshack.us/img33/8679/mapproblem.png Now I am wondering: 1) as I understand, getLastKnowLocation is system-wide and not app-wide, why are there differences between the location in Google maps and all the other apps? 2) does Google Maps not update the lastKnownLocation of a provider? 3) does Google Maps use a different custom location provider (i.e. due to licensing reasons) other than GPS_PROVIDER or NETWORK_PROVIDER as they are in the SDK? 4) how do achieve the same accurate result with the NETWORK_PROVIDER like Google Maps does? -- 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] Selection list cut off in AutoCompleteTextView in Dialog
I have a dialog window that covers 1/3 of the entire screen height and is displayed on top of my activity. The dialog holds two AutoCompleteTextView fields. The problem I'm facing is that when the user starts typing something into the AutoCompleteTextView, the list with all suggestions only shows up to the bottom end of the dialog, but doesn't go beyond that even the list is longer. It looks like it's cut off. (screenshot left) Only after I long-press an item from the suggestion list, the list will be shown in full length. (screenshot right) Screenhot is at: http://img704.imageshack.us/i/dialogdropdown.png/ How to fix this behaviour so that the list shows in full length right from the beginning, when the user starts typing something? Code-wise there's nothing special, all I do is: ArrayAdapterString adapter = new ArrayAdapterString(this.getContext(), R.layout.nav_route_autocomplete_row, locStrings); AutoCompleteTextView txtStartPos = (AutoCompleteTextView) findViewById(R.id.txtStartPos); txtStartPos.setAdapter(adapter); ... -- 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] ProgressDialog: Progress indicator not centered if no title/text is passed as parameter
When calling progressDialog = ProgressDialog.show(this, null, null, true); usually the developers wants to only show the progress indication image, and usually would it expect to be centered within the window (at least from regular UI design point of view). However, the image is too far left, it seems that some padding/margin on the right hand side is still being calculated in for (optional) text on the right, although we're not passing any text as parameter. Screenshot: http://android.googlecode.com/issues/attachment?aid=8651271940249741441name=progressIndicator.pngtoken=2d27341b454c113d649fed256b6cc6f9inline=1 I created a feature request for it at: http://code.google.com/p/android/issues/detail?id=9697 So we don't need to create a custom dialog only in order to have the progress indicator being centered by default. The only way to achieve a progress dialog with just a progress indicator image centered in the middle now is by writing a custom dialog, which I now did. But is there any other way or parameter I might have overlooked that I could apply to the standard progress dialog? Please let me know your idea. -- 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] Video playback (mediaplayer) always logs ERROR/OsclAsyncFile(12290): OsclAsyncFile::ConstructL!! on Samsung Galaxy S
I'm using a mediaplayer (http://developer.android.com/reference/android/media/MediaPlayer.html) to playback a video. Everything works fine actually but I noticed that on a Samsung Galaxy S, despite that everything seems to run ok, I still see errors in the log, which I don't get on Nexus One or HTC Desire. (on 2.1update1) For example ERROR/OsclAsyncFile(12290): OsclAsyncFile::ConstructL!!, which seems to be related to the OpenCore framework, and the origin probably lies somewhere around http://www.netmite.com/android/mydroid/external/opencore/oscl/oscl/osclio/src/oscl_file_async_read.cpp Is anybody else experiencing this on Samsung Galaxy S (I 9000) and having any idea why it occurs / how to avoid it? Maybe anything to pay attention to in the code of the mediaplayer api when using mediaplayer. 07-14 10:40:35.395: VERBOSE/AudioHardwareALSA(12290): ALSA OPEN mode 0,device 2 07-14 10:40:35.410: INFO/AudioHardwareALSA(12290): Initialized ALSA PLAYBACK device AndroidPlayback_Speaker_normal 07-14 10:40:35.415: DEBUG/AudioHardwareALSA(12290): Set PLAYBACK PCM format to S16_LE (Signed 16 bit Little Endian) 07-14 10:40:35.415: DEBUG/AudioHardwareALSA(12290): Using 2 channels for PLAYBACK. 07-14 10:40:35.415: DEBUG/AudioHardwareALSA(12290): Set PLAYBACK sample rate to 44100 HZ 07-14 10:40:35.415: DEBUG/AudioHardwareALSA(12290): Buffer size: 4096 07-14 10:40:35.415: DEBUG/AudioHardwareALSA(12290): Latency: 92879 07-14 10:40:36.260: DEBUG/(12290): SISO TEST registering PVMFRecognizerPluginFactory 07-14 10:40:36.260: DEBUG/(12290): SISO TEST registering PVMFRecognizerPluginFactory success 07-14 10:40:36.260: DEBUG/(12290): SISO TEST PVOMA1FFRecognizerFactory::CreateRecognizerPlugin() 07-14 10:40:36.265: DEBUG/(12290): SISO TEST PVOMA1FFRecognizerFactory::CreateRecognizerPlugin() plugin found 07-14 10:40:36.265: DEBUG/(12290): SISO TEST PVOMA1FFRecognizerFactory::DestroyRecognizerPlugin() 07-14 10:40:36.290: ERROR/(12290): ASF_HeaderObjectLoad : ERROR code = 4 07-14 10:40:36.290: ERROR/OsclAsyncFile(12290): OsclAsyncFile::ConstructL!! 07-14 10:40:36.560: WARN/PlayerDriver(12290): Using generic video MIO 07-14 10:40:36.570: ERROR/OsclAsyncFile(12290): OsclAsyncFile::ConstructL!! 07-14 10:40:36.715: ERROR/OsclAsyncFile(12290): 07-14 10:40:36.950: ERROR/VideoMIO(12290): AndroidSurfaceOutput::setParametersSync() VIDEO RENDERER 1 07-14 10:41:10.215: DEBUG/(12290): SISO TEST registering PVMFRecognizerPluginFactory 07-14 10:41:10.215: DEBUG/(12290): SISO TEST registering PVMFRecognizerPluginFactory success 07-14 10:41:10.220: DEBUG/(12290): SISO TEST PVOMA1FFRecognizerFactory::CreateRecognizerPlugin() 07-14 10:41:10.220: DEBUG/(12290): SISO TEST PVOMA1FFRecognizerFactory::CreateRecognizerPlugin() plugin found 07-14 10:41:10.220: DEBUG/(12290): SISO TEST PVOMA1FFRecognizerFactory::DestroyRecognizerPlugin() 07-14 10:41:10.245: ERROR/(12290): ASF_HeaderObjectLoad : ERROR code = 4 07-14 10:41:10.245: ERROR/OsclAsyncFile(12290): OsclAsyncFile::ConstructL!! 07-14 10:41:10.525: WARN/PlayerDriver(12290): Using generic video MIO 07-14 10:41:10.535: ERROR/OsclAsyncFile(12290): OsclAsyncFile::ConstructL!! 07-14 10:41:10.680: ERROR/OsclAsyncFile(12290): OsclAsyncFile::ConstructL!! 07-14 10:41:10.835: ERROR/VideoMIO(12290): AndroidSurfaceOutput::setParametersSync() VIDEO RENDERER 1 07-14 10:41:13.040: INFO/AudioHardwareALSA(12290): Output standby called!!. Turn off PCM device. -- 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: Camera preview - strange on Samsung Galaxy S (2.1update1)
@Dan: version is [ro.build.fingerprint]: [Samsung/GT-I9000/GT-I9000/GT-I9000:2.1- update1/ECLAIR/I9000XXJF3:user/release-keys] @blindfold: yes, after commenting out the parameter p.set(ROTATION, 90) it looks ok now, thanks. I just need to rotate the image afterwards manually then, since it's in wrong angle, but that's no problem. Seems that Samsung has problems with these params. On Jul 10, 3:32 pm, blindfold seeingwithso...@gmail.com wrote: I have no experience with Samsung, but did you try uncommenting all of p.set(ORIENTATION, PORTRAIT); p.set(ROTATION, 90); p.setPreviewSize(s.width,s.height); to see what happens? Anybody experiencing such issue on the Samsung Galaxy S as well? -- 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] Camera preview - strange on Samsung Galaxy S (2.1update1)
In my activity I show the camera preview on a surfaceView. It works perfectly fine on Nexus One (2.1update1, 2.2) and HTC Desire (2.1update1), but on Samsung Galaxy S (2.1update1) I see strange lines, weird proportions and everything three times. see the screenshot http://img249.imageshack.us/img249/7466/device1s.png The issue seems to be similar to this one: http://stackoverflow.com/questions/2053440/camera-preview-on-androd-strange-lines-on-1-5-version-of-sdk but none of the comments there helped. I tried to swap height,width for the camera parameters, but not much of a difference. (Side note: my activity is always in landscape mode, fixed. I have that fix in my manifest as screenOrientation parameters, in case that matters somehow). Camera preview parameters as below: == snip == private static final int IMAGE_WIDTH = 512; private static final int IMAGE_HEIGHT = 384; private static final String ORIENTATION = orientation; private static final String ROTATION = rotation; private static final String PORTRAIT = portrait; private static final String LANDSCAPE = landscape; camera = Camera.open(); Parameters p = camera.getParameters(); p.setPictureSize(IMAGE_WIDTH, IMAGE_HEIGHT); p.set(ORIENTATION, PORTRAIT); p.set(ROTATION, 90); Camera.Size s = p.getSupportedPreviewSizes().get(0); p.setPreviewSize( s.width,s.height ); p.setPictureFormat(PixelFormat.JPEG); p.set(flash-mode, auto); camera.setParameters(p); camera.setPreviewDisplay(surfaceHolder); == snap == Full code of my SurfaceHolderCallback (the relevant inner class in my activity) http://pastebin.com/YmcwEVn8 Anybody experiencing such issue on the Samsung Galaxy S as well? -- 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: paypal mobile payment allowed?
The Android Market is bothering lots of developers, but Google doesn't seem to change anything about it or at least communicate anything about it. Hoping for an alternative market like slide.me to catch on and become an alternative de-facto standard and vendors would eventually pre-install it on the devices by default as well. See also the recent discussion here: http://groups.google.com/group/android-developers/browse_thread/thread/824d94f3903b1110 -- 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: Emulator 2.1 2.2 reverse geocoding not available
I confirm the same issues on the emulator with API 2.2 and API 2.1 level 8, but it works ok with API 2.1 level 7. -- Mathias On Jun 27, 4:30 am, Malcolm malcolm.mur...@gmail.com wrote: Richard, Joining this discussion late. I hit a similar problem when developing on a Mac using Eclipse and a level 8 (SDK 2.2 plus Google APIs) target. I was using code like this, based on an example in Reto Meier's book Professional Android 2 Application Development --- Geocoder geoCoder = new Geocoder(this, Locale.getDefault()); try { ListAddress addresses = geoCoder.getFromLocation(latitude, longitude, 1); // maxResults StringBuilder sBuilder = new StringBuilder(); if(addresses.size() 0){ Address address = addresses.get(0); for(int i=0; i address.getMaxAddressLineIndex(); i++){ sBuilder.append(address.getAddressLine(i)).append(\n); sBuilder.append(address.getLocality()).append(\n); sBuilder.append(address.getPostalCode()).append(\n); sBuilder.append(address.getCountryName()).append(\n); } addressString = sBuilder.toString(); } } catch(IOException e) { addressString = Sorry address could not be established\n + e.toString(); } - The addressString value is displayed to the user via a TextView object. When running it on the emulator I alweays got a java.io.IOException: Service not Available Switching to an earlier level 7 target 8 (SDK 2.1 plus Google APIs) and redeploying the same code, the first time I ran it I got a more hopeful error no address found or similar, then after sending a location via the emulator, I got the full geocoded address correctly displayed. I am thus in the situation like Kugelschlag - that geocoding on an emulator works in 2.1 (7) but throws an Io Exception in 2.2 (8). HTH Malcolm :-) On Jun 8, 8:35 am, Richard gunns...@gmail.com wrote: Thanks for a response ! As nobody else has anything to say I'm stumped ;-) Is it possible Google is blocking location services based on my ip's geographic location (e.g. Australia) when using theemulator? To repeat myself, I've tested it on AVDs:2.12.2using both API level 7 8. 2.1Level 7 Emulation only lists GPS support 06-08 17:30:38.330: DEBUG/LocationManager(197): getAllProviders 06-08 17:30:38.330: VERBOSE/TripStart(197): Listing supported providers 06-08 17:30:38.341: VERBOSE/TripStart(197): gps supported 06-08 17:30:38.351: ERROR/LocationManagerService(64): isProviderEnabled got exception: 06-08 17:30:38.351: ERROR/LocationManagerService(64): java.lang.IllegalArgumentException: provider=network 06-08 17:30:38.351: ERROR/LocationManagerService(64): at com.android.server.LocationManagerService._isProviderEnabledLocked(Location ManagerService.java: 1385) 06-08 17:30:38.351: ERROR/LocationManagerService(64): at com.android.server.LocationManagerService.isProviderEnabled(LocationManager Service.java: 1359) 06-08 17:30:38.351: ERROR/LocationManagerService(64): at android.location.ILocationManager $Stub.onTransact(ILocationManager.java:237) 06-08 17:30:38.351: ERROR/LocationManagerService(64): at android.os.Binder.execTransact(Binder.java:287) 06-08 17:30:38.351: ERROR/LocationManagerService(64): at dalvik.system.NativeStart.run(Native Method) 2.2Level 8 Emulation 05-31 01:49:14.990: VERBOSE/TripStart(311): Listing supported providers 05-31 01:49:14.990: VERBOSE/TripStart(311): network supported 05-31 01:49:14.990: VERBOSE/TripStart(311): passive supported 05-31 01:49:14.990: VERBOSE/TripStart(311): gps supported 05-31 01:50:14.421: VERBOSE/TripStart(311): java.io.IOException: ServicenotAvailable The app works on an HTC Desire but its a pain to develop debug without the aboveemulatorfunctionality. Richard On Jun 5, 10:24 am, Kugelschlag davidscottbar...@gmail.com wrote: I have seen the same issue when I updated from2.1and API Level 7 (where it works) to2.2API Level 8 (where it doesnot). Seems to be in the level 8 package. I also noticed quite a bit of slowdown in the map view scrolling after updating to2.2. Anybody else see this? Tested on Windows 7 using Eclipse. Kugelschlag On May 30, 7:50 pm, Richard gunns...@gmail.com wrote: I have been unable to getreversegeocodingwokring under either2.1 or2.2on the emulators. Tested on both mac/eclipse ubuntu/eclipse. I am sending manual decimal coordinates via DDMS and have
[android-developers] Re: PNG quality in WebView based app
I experienced the same problem, but in my case I don't load the the image remotely. I load the image locally from the sd card. The original image is very clear and uncompressed. I tried different formats as well (png, jpg). The only solution I found was to divide the large image into multiple tiles and put them back together via html, then load the html file locally. That's the only way the images don't get blurry when zooming in. On May 11, 4:52 am, Yahel kaye...@gmail.com wrote: I ran into the same problem a few monthes back. I spent hours trying to figure out why a webview would degrade the quality of an image. Turns out it was not the webview, it was my provider : When browsing the web on gprs or edge my provider downgrades image quality on their server so that its a lot lighter to download on their network. When I tried over wifi everything came back to normal. In the end I implemented a regular binary file download from my server, and then displayed that image. Yahel On 10 mai, 22:20, Jeff jeff.th...@gmail.com wrote: I am using WebView to display html content in an app. One of the pages has a rather large PNG image. The image is large and detailed on purpose because the idea is to use it as a map and allow users to zoom in to see the detail. Unfortunately, when the image is displayed with WebView, the quality is horrific. I am assuming that WebView is attempting to do some image optimization to reduce the size of the graphic. Is there anyway to prevent it from doing this? I don't want the image to lose any of its quality. Thanks, 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 athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Question about .asec (encryption) on Froyo 2.2 (Emulator)
Hi, can somebody please explain how asec exactly works? I couldn't find much info about it on the mailing list or elsewhere. I installed my app on the emulator with 2.2 and onto the sdcard. When I browse via adb shell, I can see that the encrypted app file lies under /mnt/secure/asec/com.myapp-1.asec but it also lies as plain apk file unencrypted at /mnt/asec/com.myapp-1/pkg.apk as well and I can do a 'adb pull' without special permissions and unzip it to see it's content. Unfortuntately my N1 is in repair and I cannot check on a real device right now - but wondering, why can I still access the plain apk so easily (at least on the emulator)? Thanks, Mathias -- 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] WebView memory leak
I have an activity using an xml layout where a WebView is embedded. I am not using the WebView in my activity code at all, all it does is sitting there in my xml layout. Now, when I finish the activity, I find that my activity is not being cleared from memory. (I check via hprof dump). The activity is entirely cleared though if I remove the WebView from the xml layout. I already tried a webView.destroy(); webView = null; in onDestroy() of my activity, but that doesn't help much. In my hprof dump, my activity (named 'Browser') has the following remaining GC roots (after having called destroy() on it): com.myapp.android.activity.browser.Browser - mContext of android.webkit.JWebCoreJavaBridge - sJavaBridge of android.webkit.BrowserFrame [Class] - mContext of android.webkit.PluginManager - mInstance of android.webkit.PluginManager [Class] I found that another developer has experienced similar thing, see the reply of Filipe Abrantes on: http://www.curious-creature.org/2008/12/18/avoid-memory-leaks-on-android/ : Indeed a very interesting post. Recently I had a very hard time troubleshooting a memory leak on my Android app. In the end it turned out that my xml layout included a WebView component that, even if not used, was preventing the memory from being g-collected after screen rotations/app restart… is this a bug of the current implementation, or is there something specific that one needs to do when using WebViews Now, unfortunately there has been no reply on the blog or the mailing list about this question yet. Therefore I am wondering, is that a bug in the SDK (maybe similar to the MapView bug as reported http://code.google.com/p/android/issues/detail?id=2181) or how to get the activity entirely off the memory with a webview embedded? (I noted a similar thread on the mailing list from last year, but unfortunately never an answer to it; http://groups.google.com/group/android-developers/browse_thread/thread/81312866cb21ec76/6d2fb24980aa71a3?lnk=gstq=webview+xml+memory#6d2fb24980aa71a3) -- 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: Android paid apps in Ireland
Don't expect an answer from Google, cause they won't. Just move to another market platform. Google has no interest to offer paid apps model in too many countries, as they heavily rely on advertisement income. On Jun 28, 3:15 pm, skooter500 skooter...@gmail.com wrote: This is a disgrace! And I cant get an answer from anyone in Google as to when this will be available. Oh well. It looks like SlideMe it is Bryan On Jun 26, 7:43 pm, Tomá¹ Hubálek tom.huba...@gmail.com wrote: On 21 èvn, 10:37, skooter500 skooter...@gmail.com wrote: (though I have users in 22 countries). I am not going to release it for free. It seems I cant sign up for a google checkout merchant account, because I live inIrelandand there are no paid apps allowed on the Irish Android Marketplace!!! Welcome to Android World where highest percentage of the apps on the marketis free... We are going to communism where everything is for free and everybody is working for pleasure ;-) And all pigs are equal and some of the are more equal ;-) Tom -- 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