[android-developers] How to delete applications from the Android simulator.
I know that this is probably a stupid question, but I am completely new to Android development. I have worked through a number of the examples, and now have a bunch of apps on my simulated phone. I would like to remove some of those apps (to reduce the clutter), but cannot figure out how to do it. If I click on the app icon and hold down the mouse button, the screen changes to the main screen, and there appears to be a trash can at the bottom. However, dragging the icon to the trash can seems to have no effect. Thanks. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to delete applications from the Android simulator.
Thanks. On Jan 6, 11:57 am, polyclefsoftware wrote: > Delete apps on the emulator just like you would on a hardware phone. > > Press the Menu button. Select Settings, then Applications, then Manage > Applications. Select the app you want to uninstall. There will be an > "Uninstall" button for that app. Just click it and it will uninstall. > > Alternatively, you can type "adb uninstall com.mypackagname". > > On Jan 6, 10:52 am, John Gaby wrote: > > > I know that this is probably a stupid question, but I am completely > > new to Android development. I have worked through a number of the > > examples, and now have a bunch of apps on my simulated phone. I would > > like to remove some of those apps (to reduce the clutter), but cannot > > figure out how to do it. If I click on the app icon and hold down the > > mouse button, the screen changes to the main screen, and there appears > > to be a trash can at the bottom. However, dragging the icon to the > > trash can seems to have no effect. > > > 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] Received authentication challenge is null
I am trying to connect to a site using the oAuth protocol, and I am getting the exception 'Received authentication challenge is null' on some devices when I attempt to make a https post. Now this was previously working in the emulator, but I now see the error there as well. I did a web search, and it seems like I would get this exception when I receive an 401 error from the site. Others said this was due to a malformed authentication header, but I am not setting a authentication header at all for this call. This exact same code works on a number of devices, and used to work in the emulator (I cannot figure out what has changed). The person who runs the site has checked his logs, and does not see an error on his side at all. Does anyone have any idea what might be going on here? 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: Received authentication challenge is null
I have found the problem. It turns out that if the time stamp on your oAuth call is incorrect, the server returns a 401 status error which on Android devices causes the "Received authentication challenge is null" exception to be thrown. All of the devices that were having this problem had incorrect times, and fixing the times fixed the problem. On Jun 10, 7:30 pm, John Gaby wrote: > I am trying to connect to a site using the oAuth protocol, and I am > getting the exception 'Received authentication challenge is null' on > some devices when I attempt to make a https post. Now this was > previously working in the emulator, but I now see the error there as > well. I did a web search, and it seems like I would get this > exception when I receive an 401 error from the site. Others said this > was due to a malformed authentication header, but I am not setting a > authentication header at all for this call. > > This exact same code works on a number of devices, and used to work in > the emulator (I cannot figure out what has changed). The person who > runs the site has checked his logs, and does not see an error on his > side at all. Does anyone have any idea what might be going on here? > > 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] Website not working when displayed in a WebView
I have a website which has a forum, and if I view the site using the phone's browser, it works fine. However, if I view the site from within a WebView inside my app, some of the buttons do not work. For example, if I click the 'New Post' button, nothing happens when in a WebView, but it works fine inside the browser. Does anyone have any idea why it behaves differently in a WebView than a browser? 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: Website not working when displayed in a WebView
Never mind, I see that I needed to enable Java Script for the WebView. On Jun 12, 10:02 am, John Gaby wrote: > I have a website which has a forum, and if I view the site using the > phone's browser, it works fine. However, if I view the site from > within a WebView inside my app, some of the buttons do not work. For > example, if I click the 'New Post' button, nothing happens when in a > WebView, but it works fine inside the browser. > > Does anyone have any idea why it behaves differently in a WebView than > a browser? > > 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] I am trying to receive broadcast datagrams
I would like to be able to receive broadcast datagrams. I am using the following code: public void Receive() { EnableMulticast(); String text; byte[] message = new byte[1500]; DatagramPacket p = new DatagramPacket(message, message.length); try { DatagramSocket s = new DatagramSocket(45454); s.receive(p); text = new String(message, 0, p.getLength()); Log.d("GabySoft", "message:" + text); s.close(); } catch (SocketException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } Now if I send a datagram to the ip address of this device, it receives the message. However, if I send a broadcast datagram, I do not get it. By doing web searches, I found that it appears that most phones have the ability to receive broadcast datagrams turned off to conserve power. I found the following code which supposedly turns that ability back on, and I am calling it at the beginning of the 'Receive' function: private void EnableMulticast() { if (lock == null) { try { android.net.wifi.WifiManager wifi = (android.net.wifi.WifiManager) getSystemService(android.content.Context.WIFI_SERVICE); lock = wifi.createMulticastLock("HeeereDnssdLock"); lock.setReferenceCounted(true); lock.acquire(); } catch (Exception e) { e.printStackTrace(); } } } However, even after calling this function (which succeeds), I still do not receive broadcast datagrams. Can anyone tell me how to make this work? 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] App Icon not present on Samsung Tablet
I have a customer with a Samsung Tablet and he tells me that the app Icon does not show in his list of applications. It does show on the settings page, however, and if he goes to it using the Android Market, he can launch it from there. I do not have a Samsung Tablet to try. Can anyone tell me why this might be happening? 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: App Icon not present on Samsung Tablet
The app is Quizard Flashcards. There is also a lite version, but I am not sure if it is happening with that one as well. I will ask the user to scroll down through the entire list to see if he can find it. Thanks. On Jun 20, 1:00 pm, Mike wrote: > I can - what's the app? > > The Galaxy Tab does not sort the application list as one would expect > - it seems to sort all the bloatware apps alphabetically, but the user > installed apps appear in the order they were installed and not > alphabetically, so it may be there. > > On Jun 20, 2:28 pm, John Gaby wrote: > > > I have a customer with a Samsung Tablet and he tells me that the app > > Icon does not show in his list of applications. It does show on the > > settings page, however, and if he goes to it using the Android Market, > > he can launch it from there. I do not have a Samsung Tablet to try. > > Can anyone tell me why this might be happening? > > > 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: App Icon not present on Samsung Tablet
Thanks for giving it a try. I have asked my user to look for it at the end of the list. Hopefully he will find it there. On Jun 20, 1:54 pm, Mike wrote: > I installed the Lite version and it shows up - it's the last icon in > my list - on screen 4 of the applications - even though screen 3 has > some vacant slots. > > The Tab doesn't organize things very well on that set of screens. The > first two screens are almost all bloatware - screen 2 has 3 slots that > contain apps I have installed. > > A few weeks ago, I wrote on app to sort the Galaxy Tab app list > alphabetically as I got tired of looking for stuff myself. > > On Jun 20, 3:43 pm, John Gaby wrote: > > > The app is Quizard Flashcards. There is also a lite version, but I am > > not sure if it is happening with that one as well. I will ask the > > user to scroll down through the entire list to see if he can find it. > > > Thanks. > > > On Jun 20, 1:00 pm, Mike wrote: > > > > I can - what's the app? > > > > The Galaxy Tab does not sort the application list as one would expect > > > - it seems to sort all the bloatware apps alphabetically, but the user > > > installed apps appear in the order they were installed and not > > > alphabetically, so it may be there. > > > > On Jun 20, 2:28 pm, John Gaby wrote: > > > > > I have a customer with a Samsung Tablet and he tells me that the app > > > > Icon does not show in his list of applications. It does show on the > > > > settings page, however, and if he goes to it using the Android Market, > > > > he can launch it from there. I do not have a Samsung Tablet to try. > > > > Can anyone tell me why this might be happening? > > > > > 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: Jelly bean http post basic authantication give " No authentication challenges found" exception.
I don't know if this will help, but I had a similar problem a while back. Only in my case, it worked in the newer versions of Android, but not in the older versions. After consulting with the people running the server that I was trying to connect to, I found the problem. In the header, I was sending: "Authorization": "Bearer XX", but they were receiving: "authorization": "Bearer XX", For some reason, the earlier versions of Android were converting 'Authorization' to 'authorization' and the particular host that I was talking to did not accept the lowercase version. The fix was to get the server to accept both. I don't know if this has anything to do with your problem, buy you might want to consider if the case of your request is correct. On Monday, January 21, 2013 4:00:47 AM UTC-8, AndroidDev wrote: > > Hello Friends, > > I have a http post basic authentication webservice. I used > HttpURLConnection and all thing work fine before Android version Jelly > Bean. In Jelly Bean its give a run time exception " No authentication > challenges found". I have try all thing but not got exact solution. Kindly > help me. I will appreciate your great help. > > 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: Installation error: INSTALL_FAILED_INSUFFICIENT_STORAGE
If you are using the emulator, you can change the size of the internal storage by adding the following command line argument when you launch the emulator: -partition-size 200 On Mar 30, 2:37 am, Kirupa wrote: > [2012-03-30 15:05:16 - Information Exchanger 2.7.3] Installation > error: INSTALL_FAILED_INSUFFICIENT_STORAGE > [2012-03-30 15:05:16 - Information Exchanger 2.7.3] Please check > logcat output for more details. > [2012-03-30 15:05:16 - Information Exchanger 2.7.3] Launch canceled! > How can i solve the 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] setRequetProperty seems to change the case of the Field string to lowercase on pre 2.3 Android devices
I am having a problem with setRequestProperty on pre 2.3 versions of Android. I am trying to implement an OAuth2 protocol to connect to a website (which is not under my control), and it requires the header field 'Authorization' to have the first letter capitalized. Since setRequestProperty is converting it to lower case my app fails on pre 2.3 devices. Here is a thread that I found from 2010 that refers to this problem: http://code.google.com/p/android/issues/detail?id=6684 Does any have a workaround for this problem that will allow me to create a version of my app which will work on pre 2.3 devices? 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] ListView + EditText
I have a ListView which displays rows which can have a variety of controls. If the row contains TextViews, ImageViews, and/or Buttons, everything works as expected. However, if I add a EditText control to a row, then I no longer seem to be able to select a row (touching outside of the EditText control, of course). Note that if I have a button on the row, it still works, but if I touch the row itself, onItemClick never fires. Is it not possible to have EditText controls on rows of a ListView? 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] User cannot install an update
I have a user who is trying to install an update and it is failing. He has sent me the logcat and it seems to be failing because of some kind of incompatibility with the shared UserID. However, I am able to install the same update over the same old version without this problem. Here is the relevant logcat section. Does anyone have an idea as to what might be going wrong. 12-04 22:48:02.803 I/ActivityManager(1784): Starting activity: Intent { act=android.intent.action.VIEW dat=file:///mnt/sdcard/ oubliette20B5.apk typ=application/vnd.android.package-archive cmp=com.android.packageinstaller/.PackageInstallerActivity } 12-04 22:48:03.173 I/ActivityManager(1784): Displayed activity com.android.packageinstaller/.PackageInstallerActivity: 354 ms (total 354 ms) 12-04 22:48:03.923 I/ActivityManager(1784): Starting activity: Intent { dat=file:///mnt/sdcard/oubliette20B5.apk cmp=com.android.packageinstaller/.InstallAppProgress (has extras) } 12-04 22:48:04.203 D/PackageParser(1784): Scanning package: /data/app/ vmdl24026.tmp 12-04 22:48:04.273 I/ActivityManager(1784): Displayed activity com.android.packageinstaller/.InstallAppProgress: 315 ms (total 315 ms) 12-04 22:48:04.403 D/PackageManager(1784): Scanning package com.gabysoft.oubliette 12-04 22:48:04.403 D/PackageManager(1784): Shared UserID com.gabysoft.oubliette (uid=10083): packages=[PackageSetting{46644bf0 com.gabysoft.oubbeta/10083}, PackageSetting{4660ffd0 com.gabysoft.oubliettelite/10083}] 12-04 22:48:04.413 I/PackageManager(1784): /data/app/ com.gabysoft.oubliette-1.apk changed; unpacking 12-04 22:48:04.413 D/PackageManager(1784): Caching shared lib lib/ armeabi/liboubliette-jni.so 12-04 22:48:04.413 E/PackageManager(1784): Package com.gabysoft.oubliette has mismatched uid: 10113 on disk, 10083 in settings 12-04 22:48:04.423 W/PackageManager(1784): Failed to cache package shared libs 12-04 22:48:04.423 W/PackageManager(1784): java.io.IOException: Permission denied 12-04 22:48:04.423 W/PackageManager(1784): at java.io.File.createNewFileImpl(Native Method) 12-04 22:48:04.423 W/PackageManager(1784): at java.io.File.createNewFile(File.java:1160) 12-04 22:48:04.423 W/PackageManager(1784): at java.io.File.createTempFile(File.java:1224) 12-04 22:48:04.423 W/PackageManager(1784): at com.android.server.PackageManagerService.cacheNativeBinaryLI(PackageManagerService.java: 3767) 12-04 22:48:04.423 W/PackageManager(1784): at com.android.server.PackageManagerService.cachePackageSharedLibsForAbiLI(PackageManagerService.java: 3647) 12-04 22:48:04.423 W/PackageManager(1784): at com.android.server.PackageManagerService.cachePackageSharedLibsLI(PackageManagerService.java: 3718) 12-04 22:48:04.423 W/PackageManager(1784): at com.android.server.PackageManagerService.scanPackageLI(PackageManagerService.java: 3233) 12-04 22:48:04.423 W/PackageManager(1784): at com.android.server.PackageManagerService.installNewPackageLI(PackageManagerService.java: 5602) 12-04 22:48:04.423 W/PackageManager(1784): at com.android.server.PackageManagerService.installPackageLI(PackageManagerService.java: 5949) 12-04 22:48:04.423 W/PackageManager(1784): at com.android.server.PackageManagerService.access $2100(PackageManagerService.java:137) 12-04 22:48:04.423 W/PackageManager(1784): at com.android.server.PackageManagerService $5.run(PackageManagerService.java:4752) 12-04 22:48:04.423 W/PackageManager(1784): at android.os.Handler.handleCallback(Handler.java:587) 12-04 22:48:04.423 W/PackageManager(1784): at android.os.Handler.dispatchMessage(Handler.java:92) 12-04 22:48:04.423 W/PackageManager(1784): at android.os.Looper.loop(Looper.java:123) 12-04 22:48:04.423 W/PackageManager(1784): at android.os.HandlerThread.run(HandlerThread.java:60) 12-04 22:48:04.423 W/PackageManager(1784): Package couldn't be installed in /data/app/com.gabysoft.oubliette-1.apk -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: User cannot install an update
There is one more relevant point. I have had the user completely uninstall the app and re-install the new version and the above log is what he is seeing -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: User cannot install an update
Thanks for the suggestions. I had the user try taking out the battery but it didn't help (I HAD previously had him reboot his phone which didn't work either). I am beginning to think that there is something screwed up with the permissions as you suggest. I have actually had a similar problem on my HTC Hero phone running 2.1 (he is running 2.2). It gets into a state where I can no longer install my app and it clearly appears to be a permissions problem (I can't remember the exact message, but it fails to install something complaining that the folder doesn't exist). I have had this happen a number of times and it usually occurs when I have installed a debug signed apk, un- installed and then tried to install a signed apk. However my user has only ever had properly signed apks. Ultimately the only way I was able to get it to work again on my HERO was to reset the entire phone to the factory settings (which deletes everything), which is not something that my user is wanting to do. On Dec 5, 8:44 am, mot12 wrote: > Lucky you. This happened because of a firmware bug in Samsung devices > 2.2.1. See here: > > http://code.google.com/p/android/issues/detail?id=14359 > > or > > https://groups.google.com/forum/#!topic/android-developers/Sm7WCWZYcK... > > In the first post, the author describes how he ended up with an app > having a different user ID than the app data directory. > > @John Coryat : If you read the original post in this thread and his > follow up, you will see that John already tried uninstalling to no > avail. > > -- Martin > mobitobi -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: User cannot install an update
You are, of course, correct. I just wanted to understand what is happening here so that I can determine whether it is my fault or not, and whether I am going to have others that have this problem. The reality is that for every person that takes the time to report a problem there are probably dozens (or hundreds?) who don't bother. On Dec 5, 10:32 am, John Coryat wrote: > You'll have to decide what level of support you want to offer. For me, once > I've determined it isn't a problem with the app, the user has to look > elsewhere for support. I can't help solve problems with the countless > versions of Android/carrier/manufacturer OS's and devices. I'd rather spend > my time staring off into empty space than do that. > > If you want to be 100% support for any problem a user encounters, that's > strictly up to you but if your app ever gets popular, then you'll be > swamped. Better to send them to Android support and let them deal with it. > > -John Coryat > > @martin - I pasted the text I send to users, it wasn't modified to fit the > poster's experience already. I have found this text to either solve all > these problems or send the user to a place where they should seek help. > That's why I posted it. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: User cannot install an update
Thanks for all your help, the user does not have root access and is not willing to reset his phone. Rebooting the phone also does not help (or so he tells me). So I guess that he is simply stuck with his current version. Thanks again. On Dec 5, 12:39 pm, mot12 wrote: > I would agree with John that this is not worth your time as a support > issue. But if your user has root access, I would try deleting the app > data folder. This has worked for the issue that I addressed. > Otherwise, factory reset :(. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] This application is available to over 0 devices
I have uploaded an APK file for a new app, and it is telling me that 'This application is available to over 0 devices'. The Manifest for this app is nearly identical to another of my apps which shows it being compatible with over 600 devices. Does anyone have any idea what might be wrong? If I publish this app as it is, will it actually be available on devices? 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: This application is available to over 0 devices
Are you saying that I will not be able to see the correct number of devices until I activate the APK (I don't remember it working this way before)? If I do activate the APK, will that automatically publish, or will I still be able to do that later? Thanks. On Oct 12, 6:46 pm, J Handal wrote: > > Check it up if the apk have been uploaded and if it is active. > > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: This application is available to over 0 devices
You wer correct in that when I activated the APK the number is shown correctly. Thanks for your help. On Oct 12, 7:38 pm, J Handal wrote: > "Are you saying that I will not be able to see the correct number of > devices until I activate the APK " > > Yes. > > Then you click on publish. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] ImageView scaling produces poor results
I have an ImageView control, and if the image in question needs to be scaled down, it seems to be down, the quality of the resulting image is very poor. I have looked for a way to control the scaling (e.g. set it to bicubic), but am unable to find a way to do it. Can someone tell me how to improve the scaling of images? 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] Replacing an APK file for a not yet published app
I have created a new app and uploaded an APK file but have not published it. Now I would like to replace the APK file with a different one. If I try and upload another with the same version code, it will not accept it. If I try and delete the existing APK file first, the ENTIRE freaking app is deleted and I have to start over. Surely, there is a way to replace the APK file for a non- published app without having to re-enter all of the other meta data. I used to be able to do this. Thanks -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Replacing an APK file for a not yet published app
Really? Wow. I know that I can bump the version code, but since I haven't released it yet, that should not be necessary. Actually I like to get all of my meta data entered and only upload the final APK file as the last step. Since they would not let me enter the meta data without uploading an APK file (why is that?) I uploaded my current version at the time. Then when I tried to upload the final version, the entire thing was deleted (I never dreamed that clicking the 'delete' on the APK page would delete the whole app). Why do they make this so hard? Thanks. On Aug 16, 5:01 pm, TreKing wrote: > On Tue, Aug 16, 2011 at 6:54 PM, John Gaby wrote: > > Surely, there is a way to replace the APK file for a non- published app > > without having to re-enter all of the other meta data. I used to be able to > > do this. > > You'd think, but doesn't look like it. All you need to do is bump up the > Version Code though, shouldn't be too bad. > > - > TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago > transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: [Android LVL] Sporadic false negatives on client devices
I also have a small number of users who fail the LVL test (< 1%). My solution is to have my app call my website first to ask if it should do the LVL test. That way, if a user contacts me that it is not working I can set it up so that his device no longer performs the check. I actually implemented this from the very beginning, because the whole LVL test worried me and I wanted to have a way to override the check if, for some reason, it failed to work. As it turned out, I am glad I did. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Updating app with keystore not being valid long enough
I too would like the answer to this. I have an app that appears to be only 1 year away from not being updatable anymore. On Tuesday, November 6, 2012 5:32:14 AM UTC-8, Kevin Penhoat wrote: > > Is there any way to change my keystore values so it'll be valid longer? > When I uploaded the app it was 33 years or something, now it's become 50! > What do do -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Adding child views
I am new to Android development. I would like to be able to add child views (e.g. buttons, text, etc.) to my main view at runtime, and to be able to position and size those views dynamically. I cannot figure out exactly how to do that. Can anyone point me in the right direction? 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: Adding child views
Thanks for the response. I want to be able to set both the size and position of the child view. It seems like in order to do that I would need to use AbsoluteLayout which is deprecated. How can I have complete control over the size and position of my child windows? Do I need to create my own layout class? Thanks On May 5, 8:42 am, social hub wrote: > You basically need a context to create and possibly a layout to add > > TextView tv = new TextView(mContext);//context can be an activity or u can > use getBaseContext(); > tv.setLayoutParams(new LayoutParams(50,60));//set some height and width and > it can be wrap_content or fill_parent > tv.setText("hello Android"); > > layout.add(tv);//this can be any layout if you have linearlayout in ur xml > file then > //find it by LinearLayout > layout=(LinearLayout)findViewById(R.id.main); > > You can do this in onclick event or a menu event upto you. > > This should work in general , you can play around with it. > > > > On Wed, May 5, 2010 at 10:26 AM, John Gaby wrote: > > I am new to Android development. I would like to be able to add child > > views (e.g. buttons, text, etc.) to my main view at runtime, and to be > > able to position and size those views dynamically. I cannot figure > > out exactly how to do that. Can anyone point me in the right > > direction? > > > Thanks > > > -- > > You received this message because you are subscribed to the Google > > Groups "Android Developers" group. > > To post to this group, send email to android-developers@googlegroups.com > > To unsubscribe from this group, send email to > > android-developers+unsubscr...@googlegroups.com > > For more options, visit this group at > >http://groups.google.com/group/android-developers?hl=en > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email 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] Re: Adding child views
Thanks for the response. I cannot instantiate the ViewGroup class. Do I have to create my own layout class based on ViewGroup to get what I want? Thanks. On May 5, 8:47 am, TreKing wrote: > On Wed, May 5, 2010 at 10:42 AM, social hub wrote: > > layout.add(tv); > > I think you want > this:http://developer.android.com/intl/fr/reference/android/view/ViewGroup..., > android.view.ViewGroup.LayoutParams) > > - > TreKing - Chicago transit tracking app for Android-powered > deviceshttp://sites.google.com/site/rezmobileapps/treking > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email 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] Re: Adding child views
Thanks for the response, but I am still at a loss. I don't see how to set the marginLeft and marginTop for a child view. Here is what I have: public class HelloAndroid extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); RelativeLayout rl = new RelativeLayout(this); TextView tv = new TextView(this); tv.setText("Hello, Android"); rl.addView(tv); setContentView(rl); } Now this will display my text, but if I want to set the absolute position of the text, what would I do? Thanks. On May 5, 9:21 am, "Kostya Vasilyev" wrote: > AbsoluteLayout can be replaced by RelativeLayout. > > Use android:layout_marginLeft and android:layout_marginTop in the child > view to position it. > > -- Kostya > > PS - Why they got rid of AbsoluteLayout is a mystery. It's possible to use > device-independent units with it (good) and to misuse other layout classes > by specifying sizes and positions in absolute pixels ("px" in XML). Oh > well. > > John Gaby писал(а) в своём письме Wed, 05 May 2010 > 20:14:34 +0400: > > > > > Thanks for the response. I want to be able to set both the size and > > position of the child view. It seems like in order to do that I would > > need to use AbsoluteLayout which is deprecated. How can I have > > complete control over the size and position of my child windows? Do I > > need to create my own layout class? > > > Thanks > > > On May 5, 8:42 am, social hub wrote: > >> You basically need a context to create and possibly a layout to add > > >> TextView tv = new TextView(mContext);//context can be an activity or u > >> can > >> use getBaseContext(); > >> tv.setLayoutParams(new LayoutParams(50,60));//set some height and width > >> and > >> it can be wrap_content or fill_parent > >> tv.setText("hello Android"); > > >> layout.add(tv);//this can be any layout if you have linearlayout in ur > >> xml > >> file then > >> //find it by LinearLayout > >> layout=(LinearLayout)findViewById(R.id.main); > > >> You can do this in onclick event or a menu event upto you. > > >> This should work in general , you can play around with it. > > >> On Wed, May 5, 2010 at 10:26 AM, John Gaby wrote: > >> > I am new to Android development. I would like to be able to add child > >> > views (e.g. buttons, text, etc.) to my main view at runtime, and to be > >> > able to position and size those views dynamically. I cannot figure > >> > out exactly how to do that. Can anyone point me in the right > >> > direction? > > >> > Thanks > > >> > -- > >> > You received this message because you are subscribed to the Google > >> > Groups "Android Developers" group. > >> > To post to this group, send email to > >> android-developers@googlegroups.com > >> > To unsubscribe from this group, send email to > > >> android-developers+unsubscr...@googlegroups.com > >> > For more options, visit this group at > >> >http://groups.google.com/group/android-developers?hl=en > > >> -- > >> You received this message because you are subscribed to the Google > >> Groups "Android Developers" group. > >> To post to this group, send email 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 > > -- > Kostya Vasilyev - WiFi Manager + pretty widget - > http://kmansoft.wordpress.com/sw > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email 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] Re: Adding child views
Actually, the size of the display would be taken into consideration. I merely want to be able to have precise control over the placement of the views. Actually, I have been able to get it to work by creating my own ViewGroup based class and handling the onLayout call to reposition all of the child windows. I presume that this is the correct approach?: Thanks On May 5, 10:34 am, TreKing wrote: > On Wed, May 5, 2010 at 11:46 AM, John Gaby wrote: > > Now this will display my text, but if I want to set the absolute position > > of the text, what would I do? > > Why do you need absolute positioning? There are many devices with varying > screen sizes and densities. If you start positioning elements in exact > locations, your layout is bound to break on some devices. Your best option > is to position items relative to each other, which is the whole point of > RelativeLayout specifically. > > - > TreKing - Chicago transit tracking app for Android-powered > deviceshttp://sites.google.com/site/rezmobileapps/treking > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email 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] Development Phone
I am about to reach the point in my development where I need to work with a real phone, and am trying to figure out what to get. If I were to get a droid or droid incredible phone from Verizon will I be able to use that phone for development. What about Google's Nexus One? What are my other options? 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: Development Phone
Thanks for the replies. So I won't need a so called 'rooted' phone for development? I am using Eclipse and my program has an NDK component. Pardon my ignorance, but exactly how does the communication with the phone take place (USB?). Will I be able to debug my application on the actual phone? I am currently a Verizon customer, but I am not sure I want to sign up for a new 2 year plan just to get a development phone. Thanks again. On May 15, 7:38 am, Carlos Silva wrote: > On Sat, May 15, 2010 at 15:15, John Gaby wrote: > > I am about to reach the point in my development where I need to work > > with a real phone, and am trying to figure out what to get. If I were > > to get a droid or droid incredible phone from Verizon will I be able > > to use that phone for development. What about Google's Nexus One? > > What are my other options? > > Unless you are doing ROM development, you don't need a real dev phone, any > phone will work. > > I would go for a Nexus > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email 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] Re: Development Phone
Thanks again. So if I don't need to use it as a phone and my application does not use any phone features, I should be able do do without connecting it to a phone network? How compatible are these phones. If I get a, say, Nexus One, and get my app working on that, can I expect it to work on a Verizon Droid or Droid Incredible, or do I need to test it on those devices as well? On May 15, 10:20 am, Mark Murphy wrote: > Mark Murphy wrote: > > If you get an unlocked GSM phone and have a friend with a T-Mobile or > > AT&T account, hopefully you can borrow their SIM if needed to get your > > phone set up. > > To clarify: you borrowed SIM will need to be for an account with a data > plan. > > > After that, you can get by with just WiFi, if you aren't > > planning on using it as a phone "4 realz" and your app does not need > > telephony features. > > Also, you can get a prepaid SIM for voice stuff, though I'm not aware of > much in the way of prepaid SIMs with data plans, at least in the US. > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy > > Android Online Training: 21-25 June 2010:http://onlc.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 > 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] Custom ViewGroup
I am new to Android, and I am trying to understand how to create a custom ViewGroup. I created MyViewGroup as follows: public class MyViewGroup extends ViewGroup { public MyViewGroup(Context context) { super(context); // TODO Auto-generated constructor stub } @Override protected void onLayout(boolean changed, int l, int t, int r, int b) { } } Then in my main class I do the following: public class HelloAndroid extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); TextView tv = new TextView(this); MyViewGroup vg = new MyViewGroup(this); tv.setText("Some Text"); tv.layout(0, 30, 200, 40); vg.addView(tv); setContentView(vg); } } Now when I run this, my text "Some Text" is shown, but the bottom is cut off. It is like the view group in which it is placed is not filling the entire screen. Is this what is happening? If so, how do I control the sizeof of my MyViewGroup view? 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: Custom ViewGroup
Never mind, pilot error. The .layout method takes l, t, r, b, not width and height. Duh! Thanks. On May 18, 10:11 pm, John Gaby wrote: > I am new to Android, and I am trying to understand how to create a > custom ViewGroup. I created MyViewGroup as follows: > > public class MyViewGroup extends ViewGroup { > > public MyViewGroup(Context context) { > super(context); > // TODO Auto-generated constructor stub > } > > @Override > protected void onLayout(boolean changed, int l, int t, int r, int b) > { > } > > } > > Then in my main class I do the following: > > public class HelloAndroid extends Activity { > /** Called when the activity is first created. */ > @Override > public void onCreate(Bundle savedInstanceState) { > super.onCreate(savedInstanceState); > TextView tv = new TextView(this); > MyViewGroup vg = new MyViewGroup(this); > tv.setText("Some Text"); > tv.layout(0, 30, 200, 40); > vg.addView(tv); > setContentView(vg); > } > > } > > Now when I run this, my text "Some Text" is shown, but the bottom is > cut off. It is like the view group in which it is placed is not > filling the entire screen. Is this what is happening? If so, how do > I control the sizeof of my MyViewGroup view? > > 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 > 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] How to dismiss the virtual keyboard
I have several pages which are implemented using the ViewGroup class. I display a particular page by calling: setContentView(vg); Now if I go to a page which has an edit control, and touch within the control, the virtual keyboard is presented. If I now navigate to another page (and do a new setContentView) the virtual keyboard remains in place. How do I dismiss that keyboard programatically? I have tried the following with out success: InputMethodManager inputManager = (InputMethodManager) this.getSystemService(Context.INPUT_METHOD_SERVICE); inputManager.hideSoftInputFromWindow(vg.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS); and also getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN); Any Idea? Thanks -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to dismiss the virtual keyboard
Thanks for the reply. I tried passing 0, and it had no effect. Perhaps my problem is related to your comment about the input focus. Currently I have a function called SetViewGroup which is declared as follows: private void SetViewGroup(ViewGroup vg) { InputMethodManager inputManager = (InputMethodManager) this.getSystemService(Context.INPUT_METHOD_SERVICE); inputManager.hideSoftInputFromWindow(vg.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);// Have also tried 0 here setContentView(vg); } Now I have one page that is being displayed which has and edit field. If I tap on the edit field, the virtual keyboard appears. Now I have a button on that page which, when tapped, calls the above function with a ViewGroup for another page. However, when I do that the virtual keyboard remains visible. When you talk about the input focus, how would that apply to my situation? Thanks. On Aug 21, 1:51 pm, Dianne Hackborn wrote: > Did you try passing 0 in for flags instead of HIDE_NOT_ALWAYS? > > Also note that only the window that currently has input focus can control > the IME. > > > > On Sat, Aug 21, 2010 at 11:46 AM, John Gaby wrote: > > I have several pages which are implemented using the ViewGroup class. > > I display a particular page by calling: > > > setContentView(vg); > > > Now if I go to a page which has an edit control, and touch within the > > control, the virtual keyboard is presented. If I now navigate to > > another page (and do a new setContentView) the virtual keyboard > > remains in place. How do I dismiss that keyboard programatically? I > > have tried the following with out success: > > > InputMethodManager inputManager = (InputMethodManager) > > this.getSystemService(Context.INPUT_METHOD_SERVICE); > > > inputManager.hideSoftInputFromWindow(vg.getWindowToken(), > > InputMethodManager.HIDE_NOT_ALWAYS); > > > and also > > > getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN); > > > Any Idea? > > > 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] Re: Data Transfer between Android Phone and PC
You might take a look at: http://code.google.com/p/android-notifier/ On Jan 22, 5:43 pm, Joseph bates wrote: > So, I'm in the early stages of developing an Android app that is > supposed to transfer data between it and the PC (Windows Only for > now). Not really files, but data. (I can't reveal what the app will be/ > do just yet. Sorry) > Anyways, I am having trouble thinking of a way to complete data > transfers. So far I've considered using Bluetooth, however I am having > trouble finding Bluetooth api's for Windows that use Visual C# (the > language im using). I was wondering if there was a way to do what > Google did with chrome2phone. I believe they transfered data through a > user's google account. If anyone has any other ideas, let me know! > 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] TextView with a top margin that is proportional to the height of the parent view
Is there a way to position text within a linear layout such that the position of the text is proportional to the height, rather than a fixed distance. For example, I would like the text to be displayed down from the top a distance equal to 20% of the height of the view. 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: TextView with a top margin that is proportional to the height of the parent view
That works great. Thanks! On Jan 29, 12:46 am, Kostya Vasilyev wrote: > John, > > You can do this with LinearLayout and layout_weight attribute that it > supports: > > > layout_height="0dp" > layout_weight="20"/> > layout_height="0dp" > layout_weight="80"/> > > > The top view acts as a spacer, taking up 20% of the screen height, and > the TextView starts below that. > > -- Kostya > > 29.01.2011 10:59, Jonathan Foley пишет: > > > > > > > Yes, but you'll have to do it at runtime as there is not a way to do > > proportional layout as you describe in xml. To prevent a visible > > transition from the xml size to the correct size, you'll probably want > > to extend LinearLayout and override its onLayout(). You'll want to > > layout your child textview within that and you'll want to use > > getHeight() to get the height of the LinearLayout at runtime. I'd > > suggest looking through the code of ListView or RelativeLayout to see > > how children are measured and layout. > > > The other option would be to do this after everything is inflated. You > > can override onFinishInflate of the LinearLayout and then adjust the > > height of the TextView from there. You'll need to invalidate the > > TextView after adjusting it's height. > > > Jonathan > > > On Jan 28, 9:48 pm, John Gaby wrote: > >> Is there a way to position text within a linear layout such that the > >> position of the text is proportional to the height, rather than a > >> fixed distance. For example, I would like the text to be displayed > >> down from the top a distance equal to 20% of the height of the view. > > >> Thanks. > > -- > Kostya Vasilyev -- 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] Cannot install App on HTC Hero
I have an application (which contains an NDK component) which will not install on my HTC Hero (OS ver = 2.1u1) It does install on the emulator, and on a Motorola Droid (OS ver = 2.2). The following is the logcat which seems to indicate some problem with installing my .so file. Does anyone have an idea at to what might be wrong here? Thanks 02-03 12:02:07.131: WARN/dalvikvm(92): disableGcForExternalAlloc: true 02-03 12:02:07.131: INFO/ActivityManager(92): Starting activity: Intent { dat=file:///sdcard/download/oubliettelite.1.3.apk cmp=com.android.packageinstaller/.InstallAppProgress (has extras) } 02-03 12:02:08.101: INFO/ActivityManager(92): Displayed activity com.android.packageinstaller/.InstallAppProgress: 930 ms (total 930 ms) 02-03 12:02:08.101: WARN/dalvikvm(92): disableGcForExternalAlloc: false 02-03 12:02:08.921: DEBUG/PackageParser(92): Scanning package: /data/ app/vmdl49598.tmp 02-03 12:02:10.291: INFO/PackageManager(92): /data/app/vmdl49598.tmp changed; unpacking 02-03 12:02:10.341: DEBUG/PackageManager(92): Caching shared lib lib/ armeabi/liboubliette-jni.so 02-03 12:02:10.351: WARN/PackageManager(92): Failed to cache package shared libs 02-03 12:02:10.351: WARN/PackageManager(92): java.io.IOException: Parent directory of file does not exist: /data/data/ com.gabysoft.oubliettelite/lib/tmp49599tmp 02-03 12:02:10.351: WARN/PackageManager(92): at java.io.File.createNewFile(File.java:1263) 02-03 12:02:10.351: WARN/PackageManager(92): at java.io.File.createTempFile(File.java:1330) 02-03 12:02:10.351: WARN/PackageManager(92): at com.android.server.PackageManagerService.cacheSharedLibLI(PackageManagerService.java: 2971) 02-03 12:02:10.351: WARN/PackageManager(92): at com.android.server.PackageManagerService.cachePackageSharedLibsForAbiLI(PackageManagerService.java: 2912) 02-03 12:02:10.351: WARN/PackageManager(92): at com.android.server.PackageManagerService.cachePackageSharedLibsLI(PackageManagerService.java: 2936) 02-03 12:02:10.351: WARN/PackageManager(92): at com.android.server.PackageManagerService.scanPackageLI(PackageManagerService.java: 2520) 02-03 12:02:10.351: WARN/PackageManager(92): at com.android.server.PackageManagerService.installNewPackageLI(PackageManagerService.java: 3863) 02-03 12:02:10.351: WARN/PackageManager(92): at com.android.server.PackageManagerService.installPackageLI(PackageManagerService.java: 4323) 02-03 12:02:10.351: WARN/PackageManager(92): at com.android.server.PackageManagerService.access $1600(PackageManagerService.java:109) 02-03 12:02:10.351: WARN/PackageManager(92): at com.android.server.PackageManagerService $5.run(PackageManagerService.java:3795) 02-03 12:02:10.351: WARN/PackageManager(92): at android.os.Handler.handleCallback(Handler.java:609) 02-03 12:02:10.351: WARN/PackageManager(92): at android.os.Handler.dispatchMessage(Handler.java:92) 02-03 12:02:10.351: WARN/PackageManager(92): at android.os.Looper.loop(Looper.java:123) 02-03 12:02:10.351: WARN/PackageManager(92): at android.os.HandlerThread.run(HandlerThread.java:60) 02-03 12:02:10.351: WARN/PackageManager(92): Package couldn't be installed in /data/app/com.gabysoft.oubliettelite.apk -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 install App on HTC Hero
Yes, they are compatible, in fact, I have previously installed this app on the Hero before and it has worked fine. The version I was tying to install was signed, so I decided to rebuild the app and install the Eclipse signed version (which previously worked). However now it tells me that it the signatures don't match even though I had deleted the old signed one from the phone before I tried to install the new one. On Feb 3, 12:36 pm, Kostya Vasilyev wrote: > John, > > The log mentions something about shared libs - are you native libraries > compatible with the Hero (which has a different processor from the > Motorola Droid / Milestone)? > > -- Kostya > > 03.02.2011 23:19, John Gaby пишет: > > > > > I have an application (which contains an NDK component) which will not > > install on my HTC Hero (OS ver = 2.1u1) It does install on the > > emulator, and on a Motorola Droid (OS ver = 2.2). The following is > > the logcat which seems to indicate some problem with installing my .so > > file. > > > Does anyone have an idea at to what might be wrong here? > > > Thanks > > > 02-03 12:02:07.131: WARN/dalvikvm(92): disableGcForExternalAlloc: true > > 02-03 12:02:07.131: INFO/ActivityManager(92): Starting activity: > > Intent { dat=file:///sdcard/download/oubliettelite.1.3.apk > > cmp=com.android.packageinstaller/.InstallAppProgress (has extras) } > > 02-03 12:02:08.101: INFO/ActivityManager(92): Displayed activity > > com.android.packageinstaller/.InstallAppProgress: 930 ms (total 930 > > ms) > > 02-03 12:02:08.101: WARN/dalvikvm(92): disableGcForExternalAlloc: > > false > > 02-03 12:02:08.921: DEBUG/PackageParser(92): Scanning package: /data/ > > app/vmdl49598.tmp > > 02-03 12:02:10.291: INFO/PackageManager(92): /data/app/vmdl49598.tmp > > changed; unpacking > > 02-03 12:02:10.341: DEBUG/PackageManager(92): Caching shared lib lib/ > > armeabi/liboubliette-jni.so > > 02-03 12:02:10.351: WARN/PackageManager(92): Failed to cache package > > shared libs > > 02-03 12:02:10.351: WARN/PackageManager(92): java.io.IOException: > > Parent directory of file does not exist: /data/data/ > > com.gabysoft.oubliettelite/lib/tmp49599tmp > > 02-03 12:02:10.351: WARN/PackageManager(92): at > > java.io.File.createNewFile(File.java:1263) > > 02-03 12:02:10.351: WARN/PackageManager(92): at > > java.io.File.createTempFile(File.java:1330) > > 02-03 12:02:10.351: WARN/PackageManager(92): at > > com.android.server.PackageManagerService.cacheSharedLibLI(PackageManagerService.java: > > 2971) > > 02-03 12:02:10.351: WARN/PackageManager(92): at > > com.android.server.PackageManagerService.cachePackageSharedLibsForAbiLI(PackageManagerService.java: > > 2912) > > 02-03 12:02:10.351: WARN/PackageManager(92): at > > com.android.server.PackageManagerService.cachePackageSharedLibsLI(PackageManagerService.java: > > 2936) > > 02-03 12:02:10.351: WARN/PackageManager(92): at > > com.android.server.PackageManagerService.scanPackageLI(PackageManagerService.java: > > 2520) > > 02-03 12:02:10.351: WARN/PackageManager(92): at > > com.android.server.PackageManagerService.installNewPackageLI(PackageManagerService.java: > > 3863) > > 02-03 12:02:10.351: WARN/PackageManager(92): at > > com.android.server.PackageManagerService.installPackageLI(PackageManagerService.java: > > 4323) > > 02-03 12:02:10.351: WARN/PackageManager(92): at > > com.android.server.PackageManagerService.access > > $1600(PackageManagerService.java:109) > > 02-03 12:02:10.351: WARN/PackageManager(92): at > > com.android.server.PackageManagerService > > $5.run(PackageManagerService.java:3795) > > 02-03 12:02:10.351: WARN/PackageManager(92): at > > android.os.Handler.handleCallback(Handler.java:609) > > 02-03 12:02:10.351: WARN/PackageManager(92): at > > android.os.Handler.dispatchMessage(Handler.java:92) > > 02-03 12:02:10.351: WARN/PackageManager(92): at > > android.os.Looper.loop(Looper.java:123) > > 02-03 12:02:10.351: WARN/PackageManager(92): at > > android.os.HandlerThread.run(HandlerThread.java:60) > > 02-03 12:02:10.351: WARN/PackageManager(92): Package couldn't be > > installed in /data/app/com.gabysoft.oubliettelite.apk > > -- > Kostya Vasilyev -- 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] Deleting cached SD card files on uninstall
I am downloading and caching some files to the SD card. I am placing the files at: /Android/data/com.gabysoft.myapp When the app is uninstalled, on some phones (e.g. the emulator and Motorola Droid), these files are automatically delete (which is what I want). On other phones (e.g. HTC Hero and HTC Legend), they are not. Where can I put these files so that they will be deleted on uninstall for all devices? 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: Deleting cached SD card files on uninstall
As a clarification, I am placing the files in the SD card folder as obtained via a call to getExternalStorageDirectory(), e.g: /sdcard/Android/data/com.gabysoft.myapp On Feb 17, 8:40 am, John Gaby wrote: > I am downloading and caching some files to the SD card. I am placing > the files at: > > /Android/data/com.gabysoft.myapp > > When the app is uninstalled, on some phones (e.g. the emulator and > Motorola Droid), these files are automatically delete (which is what I > want). On other phones (e.g. HTC Hero and HTC Legend), they are not. > > Where can I put these files so that they will be deleted on uninstall > for all devices? > > 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: Deleting cached SD card files on uninstall
So there is no way to clean up my files on pre 2.2 systems? On Feb 17, 8:52 am, Mark Murphy wrote: > You can't. Deleting files on uninstall via getExternalFilesDir() was > added in API Level 8 (a.k.a., Android 2.2). > > > > On Thu, Feb 17, 2011 at 11:40 AM, John Gaby wrote: > > I am downloading and caching some files to the SD card. I am placing > > the files at: > > > /Android/data/com.gabysoft.myapp > > > When the app is uninstalled, on some phones (e.g. the emulator and > > Motorola Droid), these files are automatically delete (which is what I > > want). On other phones (e.g. HTC Hero and HTC Legend), they are not. > > > Where can I put these files so that they will be deleted on uninstall > > for all devices? > > > 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 > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy > > _Android Programming Tutorials_ Version 3.1 Available! -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to make apps installable to SD card keeping them compatible to version 2.1 and lower ?
You have to use the 2.2 SDK when you build, but you can still set the minSdkVersion to an earlier version. You just need to make sure that you don't make any calls which are specific to 2.2 when running on an earlier version. On Mar 1, 2:17 am, Arpit Mittal wrote: > Hi, > > I have an app which compatible onwards from 2.1, but with feasibility > of installing apps from 2.2, i added the required attribute > android:installLocation="auto" > > But using this means i have to make the min version 8, which makes my > app not compatible with 2.1. > > I do not want my users of 2.1 to suffer because of incompatibility and > users of 2.2 for unable to install app on SD card. > > Is there any other way to achieve both i.e. compatibility and > installation to external memory ? > > Regards > Arpit Mittal -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Horizontal & Vertical Scroll View
I need to be able to have a view which scrolls both horizontally and vertically (e.g. like a browser view). I have seen several posts where people have put a horizontal scroll view inside a vertical scroll view. I have tried to do that, but I only get vertical scrolling. The following is the code I am using: public class ScrollTest extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); ScrollView sv = new ScrollView(this); HorizontalScrollView hsv = new HorizontalScrollView(this); ImageView iv = new ImageView(this); int id = getResources().getIdentifier(getPackageName() + ":drawable/level1", null, null); if (id != 0) { iv.setImageResource(id); } hsv.addView(iv, new ViewGroup.LayoutParams(1000, 1000)); sv.addView(hsv, new ViewGroup.LayoutParams(1000, 1000)); setContentView(sv); } } Note that if I create just a HorzontalScrollView or just a ScrollView, they both work independently. When I combine them, I only get a vertical scroll. Does anyone have an Idea about what is wrong here? 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: Horizontal & Vertical Scroll View
That is disappointing. From the other posts, it sure seemed like people had gotten it to work. I had actually found some code which modified the ScrollView code to do bidirectional scrolls, but it did not compile, and I was hoping that it would not be necessary to try and figure out why. This seems like something that a lot of people might need. Why is it not supported directly? What does the browser use (it allows you to scroll in both directions)? Thanks. On Dec 22, 5:52 pm, Dianne Hackborn wrote: > You can't put a horizontal scroll view in a vertical scroll view. You > probably just want to take the implementation of scroll view and modify it > to suit your needs. > > > > On Wed, Dec 22, 2010 at 3:21 PM, John Gaby wrote: > > I need to be able to have a view which scrolls both horizontally and > > vertically (e.g. like a browser view). I have seen several posts > > where people have put a horizontal scroll view inside a vertical > > scroll view. I have tried to do that, but I only get vertical > > scrolling. The following is the code I am using: > > > public class ScrollTest extends Activity { > > /** Called when the activity is first created. */ > > �...@override > > public void onCreate(Bundle savedInstanceState) > > { > > super.onCreate(savedInstanceState); > > > ScrollView sv = new ScrollView(this); > > HorizontalScrollView hsv = new HorizontalScrollView(this); > > ImageView iv = new ImageView(this); > > > int id = getResources().getIdentifier(getPackageName() + > > ":drawable/level1", null, null); > > > if (id != 0) > > { > > iv.setImageResource(id); > > } > > > hsv.addView(iv, new ViewGroup.LayoutParams(1000, 1000)); > > sv.addView(hsv, new ViewGroup.LayoutParams(1000, 1000)); > > > setContentView(sv); > > } > > } > > > Note that if I create just a HorzontalScrollView or just a ScrollView, > > they both work independently. When I combine them, I only get a > > vertical scroll. Does anyone have an Idea about what is wrong here? > > > 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] Re: Unique Phone ID
You could use ANDROID_ID, but be warned that I have found devices that return null for this value. http://developer.android.com/reference/android/provider/Settings.Secure.html#ANDROID_ID John On Dec 23, 10:21 am, Tommy wrote: > Hey evereyone, > > I was wondering if there is a way to get a unique ID for the users > phone. I imagine the IME and Serial Numbers are unique to each phone > right? Is there a way I can request the IME number or the serial > number or is there another number I can request that is unique to each > phone? This is used to help secure login to an app. > > Thanks, > > Tommy -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Memory Leak in 1.6
I seem to have a memory leak when running under version 1.6 of the OS. I have a custom view group which contains some controls and I set it to be the current view via a call to setContentView(vg). If I then create a second view group and set it as the active view via setContentView(newVg), the first view group is never freed (even when I force a garbage collection). Note that this works fine for versions 2.0 and above, so it is possible that 1.6 has some kind of bug. If so, does anyone know of a workaround? I can post a simple example of this problem if it would help. 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] Reusing BitmapDrawable objects
I have custom skinned buttons. I set the bitmaps for the button backgrounds using the addState method of the StateListDrawable class and pass in a BitmapDrawable which is loaded from a file on the SD card. Now I am having out of memory issues, so I thought that I would try and cache the BitmapDrawable and reuse them for all the buttons on a page, rather than creating a new one for each button. However, when I do this, the buttons don't display correctly. For example if I have two buttons of different sizes, the background is drawn at the same size for both, rather than have each scale. Also, if one button on the page is hidden, then the backgrounds for some of the other (still visible) buttons disappear. This does not happen if I create separate BitmapDrawable objects for each of the buttons. My question is, am I supposed to be able to reuse these objects in this manner? If not, how can I keep from duplicating the memory required to skin each button on a page? 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: Memory Leak in 1.6
Thanks for the response. I have worked out a work-around which fixes the problem. Instead of setting the view group via setContentView(vg), I am now setting a FrameLayout as the content view, and then setting the view group as the child of the FrameLayout. In addition, it was necessary to not remove the old view when setting a new view, but rather hide it. Then when subsequent views are set, the oldest view is removed. It seems that the problem stems from removing a view while processing a message from a child control in that view. If I don't do that, then the view is properly recycled. Again note that this seems to be a problem only for 1.6 (and possibly earlier). It seems to work properly with 2.0 and above. On Jan 2, 8:32 am, Prateek Jain wrote: > Hi John, > > If you can post the logs would help understand the reason of the > memory leak. Also, a small sample of code will be helpful. > > Cheers, > Prateek > > On Jan 1, 12:32 am, John Gaby wrote: > > > I seem to have a memory leak when running under version 1.6 of the > > OS. I have a custom view group which contains some controls and I set > > it to be the current view via a call to setContentView(vg). If I then > > create a second view group and set it as the active view via > > setContentView(newVg), the first view group is never freed (even when > > I force a garbage collection). > > > Note that this works fine for versions 2.0 and above, so it is > > possible that 1.6 has some kind of bug. If so, does anyone know of a > > workaround? I can post a simple example of this problem if it would > > help. > > > 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: Reusing BitmapDrawable objects
Thanks. On Jan 2, 10:59 pm, Doug wrote: > Look into bitmap mutations? > > http://developer.android.com/resources/articles/drawable-mutations.html > > On Dec 31 2010, 11:22 pm, John Gaby wrote: > > > I have custom skinned buttons. I set the bitmaps for the button > > backgrounds using the addState method of the StateListDrawable class > > and pass in a BitmapDrawable which is loaded from a file on the SD > > card. Now I am having out of memory issues, so I thought that I would > > try and cache the BitmapDrawable and reuse them for all the buttons on > > a page, rather than creating a new one for each button. However, when > > I do this, the buttons don't display correctly. For example if I have > > two buttons of different sizes, the background is drawn at the same > > size for both, rather than have each scale. Also, if one button on > > the page is hidden, then the backgrounds for some of the other (still > > visible) buttons disappear. This does not happen if I create separate > > BitmapDrawable objects for each of the buttons. > > > My question is, am I supposed to be able to reuse these objects in > > this manner? If not, how can I keep from duplicating the memory > > required to skin each button on a page? > > > 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: app2sd - not working
I believe that installing on the SD card is supported only for 2.2 devices (or higher). Your program will install on earlier versions, but it will not install to the SD card. On Jan 5, 6:12 am, André wrote: > So what could be the problem if I have minsdkversion 4 and put > targetversion 8 > > On Jan 5, 12:59 pm, Marcin Orlowski wrote: > > > > > Yes it would filter your app out. android:installLocation does not > > need target sdk to be 8 > > or higher. It's safe to have it in Manifest and still target earlier sdk as > > earlier android version will simply ignore it. > > So what could be the problem then since it doesn't work, if you have > any suggestions? > > YuviDroid Jan 5, 12:58 pm > > >I was talking about "targetSdkVersion", not "minSdkVersion". > >AThe entry in the manifest should look like this: >android:minSdkVersion="4" android:targetSdkVersion="8" /> > >Btw on your test phone can you install your app on sdcard? > > I have a 1.6 device, waiting for a new one right now. But it works > fine in the emulator! -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: LVL: possible to check license for a different app?
Interesting idea, but I do not believe that the Market will let you publish a free app which asks for CHECK_LICENSE permissions, so I don't think that your free app will not be allowed to use LVL. On Jan 6, 7:41 am, Brill Pappin wrote: > No, you don't remove LVL so its still used to check the market. > > BTW - I'm not sure I completely agree with Zsolt on the modification. > Fine to modify the library a little, but a non security/encryption expert is > likely to make easy holes in such a library, particularly messing with > the algorithms. > The fact is that a determined cracker is going to get at your app no matter > what you do. > > No, the idea is simply to use the LVL in the normal way, but communicate > with the paid version in another way. > Changes to LVL won't break it ether. > > - Brill Pappin -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] App Add-on
I have a game for which I would like to be able to sell add-on packs. I would prefer that there was some in-game way to make these purchases, but, alas, there does not appear to be any such mechanism. I am considering the idea of creating separate add-on apps which, when run, would add features to the game. I believe that I have seen this done by others. My question is, how do people deal with the refund process. I mean, the user will be able to purchase the add-on, run it, and then request a refund, which would result in them getting it for free. Has anyone else had experience with this model? Thanks -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: App Add-on
Yes, I would check for the existence of the add-on, however, it is likely that the user would like to get rid of it at some point so it does not clutter his desktop. It would be nice to allow for that. I have thought that I could check for its existence only for 24 hours, and then not check any more, but I would need to explain to the user that he need to leave the add-on installed for at least 24 hours. This seems quite messy to me. I was hoping that someone who has tried this could give me some feedback on their experience. Thanks On Jan 7, 10:59 am, TreKing wrote: > On Fri, Jan 7, 2011 at 12:55 PM, John Gaby wrote: > > I mean, the user will be able to purchase the add-on, run it, and then > > request a refund, which would result in them getting it for free. Has > > anyone else had experience with this model? > > I have not, but presumably your main app would check for the existence of > the add-on pack before running, or otherwise depend on it being installed, > such that refunding (and uninstalling) would revert the added functionality. > > - > TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago > transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: App Add-on
Thanks for the reply. So, it is possible to setup the intent so the app does not appear on the desktop? If so, how does the user run it for the first time (to install the add-on)? I am fairly new to Android development and not that experienced with setting up intents, so any help in that direction would be most appreciated. Thanks. On Jan 7, 11:16 am, TreKing wrote: > On Fri, Jan 7, 2011 at 1:06 PM, John Gaby wrote: > > Yes, I would check for the existence of the add-on, however, it is likely > > that the user would like to get rid of it at some point so it does not > > clutter his desktop. It would be nice to allow for that. > > Just use the right intent filters so your add-ons don't show up in the > launcher. You'll probably want it so it does open though (from the Market) > so you can explain to the dumber user how it works in a dedicated Help > activity. > > - > TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago > transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: App Add-on
Thanks for the links, they were most helpful. I worry, however, that if I remove it from the Launcher that the user may not understand why it is not there, and may not be able to figure out how to launch it. I don't suppose that there is any way to remove it from the launcher after it has been run? Has anyone used this model before? If so can you tell me what kind of problems with users you encountered? Thanks. On Jan 7, 11:48 am, TreKing wrote: > On Fri, Jan 7, 2011 at 1:42 PM, John Gaby wrote: > > So, it is possible to setup the intent so the app does not appear on the > > desktop? > > Let's clarify - on Android there's the HomeScreen (which more closely > resembles a "desktop") and a Launcher, where the apps are stored. The user > controls the appearance of apps on the HomeScreen. Your manifest controls > the appearance of icons in the Launcher. > > You would omit > this:http://developer.android.com/reference/android/content/Intent.html#CA... > and include > this:http://developer.android.com/reference/android/content/Intent.html#CA... > so the user can launch it from the Android Market (or, I would assume, other > app-launching apps) > > > If so, how does the user run it for the first time (to install the add-on)? > > Include the above category and they can open it from the Market, after > installing. > > - > TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago > transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: App Add-on
> Honestly though, you're already heading down a user-experience nightmare > path with this concept of add-on - seems like a simple concept but a lot of > users simply won't get it. The ones that do will probably understand why > it's missing. Good luck. I know. I really wish that Google had an in-app purchase mechanism like Apple (or would allow the use of 3rd party in-app purchasing like PayPal). Maybe I need to rethink this whole concept. Thanks much for your help! On Jan 7, 12:51 pm, TreKing wrote: > On Fri, Jan 7, 2011 at 2:46 PM, John Gaby wrote: > > I don't suppose that there is any way to remove it from the launcher after > > it has been run? > > Don't think so. But if it's launch-able from the Market, you can display an > Activity that explains this from there. If the user can't find it in the > launcher, that's probably where they'd check next, if for no other reason > than to leave you a stupid comment. At that point, the can see the "Open" > option from the Market. > > Honestly though, you're already heading down a user-experience nightmare > path with this concept of add-on - seems like a simple concept but a lot of > users simply won't get it. The ones that do will probably understand why > it's missing. Good luck. > > - > TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago > transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: App Add-on
Thanks for the link, it really cleared things up (*NOT*). It was an interesting read, however. His situation is very similar to mine. I would like to sell 'virtual content' from within the game. The way Google is making me do it is absurd. On Jan 7, 1:35 pm, TreKing wrote: > On Fri, Jan 7, 2011 at 3:22 PM, John Gaby wrote: > > I know. I really wish that Google had an in-app purchase mechanism like > > Apple (or would allow the use of 3rd party in-app purchasing like PayPal). > > Maybe I need to rethink this whole concept. > > Take a look at this > thread:http://www.google.com/support/forum/p/Android+Market/thread?tid=3c472... > > <http://www.google.com/support/forum/p/Android+Market/thread?tid=3c472...>Should > be an interesting read if nothing else. > > - > TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago > transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: App Add-on
Actually, there are a number of ways that I could provide and in-app purchase mechanism, but I am TRYING not to violate Google's TOS. They are making it really hard, though. On Jan 7, 2:30 pm, "Tommy" wrote: > Have you considered some kind of webportal with the use of paypal and using > the webview control? Then using an external SQL server to manage your > subscription for the add ons? > > -Original Message- > From: android-developers@googlegroups.com > > [mailto:android-develop...@googlegroups.com] On Behalf Of John Gaby > Sent: Friday, January 07, 2011 5:04 PM > To: Android Developers > Subject: [android-developers] Re: App Add-on > > Thanks for the link, it really cleared things up (*NOT*). It was an > interesting read, however. His situation is very similar to mine. I would > like to sell 'virtual content' from within the game. The way Google is > making me do it is absurd. > > On Jan 7, 1:35 pm, TreKing wrote: > > On Fri, Jan 7, 2011 at 3:22 PM, John Gaby wrote: > > > I know. I really wish that Google had an in-app purchase mechanism > > > like Apple (or would allow the use of 3rd party in-app purchasing like > PayPal). > > > Maybe I need to rethink this whole concept. > > > Take a look at this > thread:http://www.google.com/support/forum/p/Android+Market/thread?tid=3c472 > ... > > > <http://www.google.com/support/forum/p/Android+Market/thread?tid=3c472 > > ...>Should be an interesting read if nothing else. > > > -- > > --- TreKing > > <http://sites.google.com/site/rezmobileapps/treking> - Chicago transit > > tracking app for Android-powered devices > > -- > You received this message because you are subscribed to the Google Groups > "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com > For more options, visit this group > 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] Protecting files on non-rooted phones
I find that, when using a actual device that is not rooted, that I cannot see the contents folders created by my application. However, if I know the exact name and path of a file, I CAN pull or push it using ADB. Is there a way to prevent external access to application files (on a non-rooted phone, of course). 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: Protecting files on non-rooted phones
I must be setting the files as world readable then. I didn't know that if the app was debuggable that you could change the shell to run as an app uid. Can you tell me what version of Android that works for, and how I do that? Thanks. On Jan 7, 4:25 pm, Dianne Hackborn wrote: > On a user build, adb can not access any application files, with these > exceptions: > > - If the app has declared itself debuggable, recent versions of android will > allow the shell user to change to run as that app uid and thus access its > files. > - If you create files that are explicitly marked as world readable or > writeable, then the shell will be able to read/write those files as > indicated. > > > > On Fri, Jan 7, 2011 at 3:41 PM, John Gaby wrote: > > I find that, when using a actual device that is not rooted, that I > > cannot see the contents folders created by my application. However, > > if I know the exact name and path of a file, I CAN pull or push it > > using ADB. Is there a way to prevent external access to application > > files (on a non-rooted phone, of course). > > > 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] Re: Protecting files on non-rooted phones
Thanks for the tip. For the record, it works on 2.2. There have been a number of times that I have wanted to be able to see the files for my app, and I am glad to find that there is a way. Thanks again. On Jan 7, 6:55 pm, Dianne Hackborn wrote: > Unfortunately I don't recall exactly when it went in. Maybe 2.3? It is the > "run-as" command. > > > > On Fri, Jan 7, 2011 at 5:42 PM, John Gaby wrote: > > I must be setting the files as world readable then. > > > I didn't know that if the app was debuggable that you could change the > > shell to run as an app uid. Can you tell me what version of Android > > that works for, and how I do that? > > > Thanks. > > > On Jan 7, 4:25 pm, Dianne Hackborn wrote: > > > On a user build, adb can not access any application files, with these > > > exceptions: > > > > - If the app has declared itself debuggable, recent versions of android > > will > > > allow the shell user to change to run as that app uid and thus access its > > > files. > > > - If you create files that are explicitly marked as world readable or > > > writeable, then the shell will be able to read/write those files as > > > indicated. > > > > On Fri, Jan 7, 2011 at 3:41 PM, John Gaby wrote: > > > > I find that, when using a actual device that is not rooted, that I > > > > cannot see the contents folders created by my application. However, > > > > if I know the exact name and path of a file, I CAN pull or push it > > > > using ADB. Is there a way to prevent external access to application > > > > files (on a non-rooted phone, of course). > > > > > 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 > > -- > 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: App Add-on
Thanks for the input. Your solution would be nice IF Google would implement it. They could also implement an in-app purchase mechanism like Apple's, which works quite well. However, I wouldn't hold your breath waiting for either of those to happen. As for having a content provider keep track, there is no way to match purchases from the Market to user's devices. That means that the user would have to run the add-on app so that it could communicate with the server. This has the same problem that I am facing now, but also adds the requirement that the user have internet connectivity to run his app. On Jan 8, 1:29 am, Brill Pappin wrote: > First, let me point you at this > RFE:http://www.google.com/support/forum/p/Android+Market/thread?fid=2d690... > > I've noticed the LVL library has (and talks about) using a double > license check. > You could actually use this kind of pattern to add license levels to > your app in the way your talking about doing. The consumers act of > buying and installing would flag a feature in your db. > > I've also been considering another approach where your main app would > look up features in a content provider. This has the advantage that if > the enabling app was uninstalled, you would no longer be able to > access the new features. Also, your users would not get duplicate > icons in their launcher if you don't provide a main activity. > > - Brill Pappin > > On Jan 7, 1:55 pm, John Gaby wrote: > > > I have a game for which I would like to be able to sell add-on packs. > > I would prefer that there was some in-game way to make these > > purchases, but, alas, there does not appear to be any such mechanism. > > I am considering the idea of creating separate add-on apps which, when > > run, would add features to the game. I believe that I have seen this > > done by others. My question is, how do people deal with the refund > > process. I mean, the user will be able to purchase the add-on, run > > it, and then request a refund, which would result in them getting it > > for free. Has anyone else had experience with this model? > > > Thanks -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: First attempt at LVL Licensing
It has been my experience that LVL CANNOT be fully tested before publishing. Like you, I found that an unpublished app returns inconsistent results. If I set the response to denied, for example, on some phones I got the correct result, and on others I did not. After I published the app, it did seem to work correctly, but of course I could only see the results on the phones I had access to. You just have to take your best shot and hope for the best. On Jan 9, 5:24 am, Neilz wrote: > The app is new, and is a saved draft. > > I've just discovered a thread buried deep in this forum where a Google > rep states that the testing only works with fully published apps (not > drafts)... and that they would update the documentation to reflect > this. That post was made in August, and the docs never were updated, > so that's one irritation that caused me a lot of wasted time. > > Stranger still, I've given a copy of the app to another person to > test, and we're both getting different responses back. I get the > allowed response, he gets an unauthorized response. It all seems > rather odd and considering we're supposed to be going live tomorrow, > rather worrying. > > Thanks for the link, I'll have a read. > > On Jan 9, 12:59 pm, MarcoAndroid wrote: > > > Is it an existing app published before? Then make sure you have > > pressed Save. Also watch the version nr you are using. Some more > > pitfalls etc you can find > > here:http://ttlnews.blogspot.com/2010/11/my-experience-with-android-market... > > > On 8 jan, 23:55, Neilz wrote: > > > > More info. > > > > I've now put my app up onto the market account, but haven't clicked > > > 'Publish'. Now, the license check just returns 'LICENSING RESULT : > > > Allow the user access' every time. I have even set the test response > > > to say 'NOT_LICENSED' but I still get the above response. > > > > Anyone have any experience with this? -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] App Widget
I am trying to create an App Widget for the Home screen which displays a line of text. When the user clicks on the Widget, I want the text to change. I have pieced together the following which seems to work, however I am concerned about how I am providing access to the AppWidgetManager in the onReceive call. I need the AppWidgetManager there because I wish to change the text. I tried adding a class member variable, 'm_appWidgetManager', which I set during the onUpdate call. However when I get the onReceive call, this value is null. Is this because the onReceive is called with a different instance of my class, and if so, why is that? If I chang m_appWidgetManager to be static, and it all seems to work, but this does not seem like the correct solution. Can anyone tell me how to do the properly? Thanks. package com.gabysoft.appwidgettest; import android.app.PendingIntent; import android.appwidget.AppWidgetManager; import android.appwidget.AppWidgetProvider; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.util.Log; import android.widget.RemoteViews; public class HelloWidget extends AppWidgetProvider { public static String ACTION_WIDGET_RECEIVER = "ActionReceiverWidget"; static AppWidgetManager m_appWidgetManager; @Override public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) { m_appWidgetManager= appWidgetManager; Log.d("GabySoft", "HelloWidget:onUpdate: m_appWidgetManager = " + m_appWidgetManager); RemoteViews remoteViews = new RemoteViews(context.getPackageName(), R.layout.main); Intent active = new Intent(context, HelloWidget.class); active.setAction(ACTION_WIDGET_RECEIVER); PendingIntent pendingIntent = PendingIntent.getBroadcast(context, 0, active, 0); remoteViews.setOnClickPendingIntent(R.id.widget_textview, pendingIntent); appWidgetManager.updateAppWidget(appWidgetIds, remoteViews); } @Override public void onReceive(Context context, Intent intent) { Log.d("GabySoft", "HelloWidget:onReceive: manager = " + m_appWidgetManager); if (intent.getAction().equals(ACTION_WIDGET_RECEIVER)) { RemoteViews remoteViews = new RemoteViews(context.getPackageName(), R.layout.main); ComponentName thisWidget = new ComponentName(context, HelloWidget.class); remoteViews.setTextViewText(R.id.widget_textview, "Some other text"); m_appWidgetManager.updateAppWidget(thisWidget, remoteViews); } super.onReceive(context, 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
[android-developers] Re: App Widget
> AppWidgetManager manager = AppWidgetManager.getInstance(context); > That is exactly what I needed, thanks much! On Jan 11, 12:21 am, Kostya Vasilyev wrote: > 11.01.2011 5:14, John Gaby пишет: > > > I tried adding a class > > member variable, 'm_appWidgetManager', which I set during the onUpdate > > call. However when I get the onReceive call, this value is null. > Right. > > Is > > this because the onReceive is called with a different instance of my > > class, and if so, why is that? > > Broadcast receivers are only guaranteed to stay around long enough for > their onReceive to complete. They can be destroyed after that, and a new > instance will be created if needed later. > > This is what you are seeing - one instance processes onUpdate, then gets > destroyed, and then a new one is created for the next onReceive. > > > If I chang m_appWidgetManager to be > > static, and it all seems to work, but this does not seem like the > > correct solution. > > AppWidgetManager manager = AppWidgetManager.getInstance(context); > > -- > Kostya Vasilyev -- 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: App Widget
> Broadcast receivers are only guaranteed to stay around long enough for > their onReceive to complete. They can be destroyed after that, and a new > instance will be created if needed later. > Given that it creates a new instance of my AppWidgeProvider class for each call, is there a way to have persistent data associated with my widget? That is how can I store data that will still be present on the next call (other than writing it to disk)? Thanks On Jan 11, 12:21 am, Kostya Vasilyev wrote: > 11.01.2011 5:14, John Gaby пишет: > > > I tried adding a class > > member variable, 'm_appWidgetManager', which I set during the onUpdate > > call. However when I get the onReceive call, this value is null. > Right. > > Is > > this because the onReceive is called with a different instance of my > > class, and if so, why is that? > > Broadcast receivers are only guaranteed to stay around long enough for > their onReceive to complete. They can be destroyed after that, and a new > instance will be created if needed later. > > This is what you are seeing - one instance processes onUpdate, then gets > destroyed, and then a new one is created for the next onReceive. > > > If I chang m_appWidgetManager to be > > static, and it all seems to work, but this does not seem like the > > correct solution. > > AppWidgetManager manager = AppWidgetManager.getInstance(context); > > -- > Kostya Vasilyev -- 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] Debugging App Widgets
I am trying to debug an App Widget and I find that if I set a breakpoint in the onReceive message, that I can only leave it stopped in the debugger for 30 seconds or so, before my process is killed. If I look in logcat, I see line about a 'Timeout of broadcast BroadcastRecord...' and then my process is killed. Is this because the Home page is waiting for a response and gives up after 30 seconds? Is there a way to increase or eliminate this timeout so I can trace through my code? 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: JNI working
I believe that there are devices (e.g. some tablets) out there that use MIPS processors rather than ARM. Correct me if I am wrong, but I do not believe that code compiled for an ARM device will work on a MIPS device. On Jan 11, 11:35 am, Kumar Bibek wrote: > Yes, It will work on all devices... > > Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com > > On Wed, Jan 12, 2011 at 1:03 AM, Richard Sámela wrote: > > > Hi, > > I would like to know something about JNI. How it works in android? > > does it work on all devices? does it work on tablest with android? > > I want to use toolkit in C++ programing language. > > > -- > > You received this message because you are subscribed to the Google > > Groups "Android Developers" group. > > To post to this group, send email to android-developers@googlegroups.com > > To unsubscribe from this group, send email to > > android-developers+unsubscr...@googlegroups.com > > For more options, visit this group at > >http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Screen rotation with App Widgets loses onClick connection
I have an App Widget on the Home screen which works fine until the screen is auto-rotated. At that point, the onClick connection (set up via a call to setOnClickPendingIntent) is lost. The only way I seem to be able to get it back is to delete the Widget from the Home screen and then add it back. Is there some kind of message that tells me that the screen has rotated that I need to respond to (and reestablish the connection)? 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: Screen rotation with App Widgets loses onClick connection
> There is no onUpdate on configuration changes. The home screen recreates > your widget, then takes the most recent RemoteViews and applies it to the > widget. > I figured that it was recreating the Widget on rotation. The problem is, I don't seem to be getting any messages to that effect, and have no way (that I can see) of re-establishing the connection. How can I determine that a rotate has happened and set up a new onClick connection? Thanks On Jan 14, 1:28 am, Kostya Vasilyev wrote: > Each and every update you push to the wigdget with RemoteViews has to have > complete widget state, including all images, text, and pending intents. > > There is no onUpdate on configuration changes. The home screen recreates > your widget, then takes the most recent RemoteViews and applies it to the > widget. > > If your codes tries to update the widget incrementally, piece-by-piece, with > one RemoteViews specifying the intent, and another, repeated, update setting > some changing information, then you end up with the most recent RemoteViews > only having your changing text, but no PendingIntent. > > This is very much unlike how Activities work, where the entire view > hierarchy is kept in memory for as long as the activity is on the screen > (and maybe longer). > > -- Kostya > > 2011/1/14 Anbu > > > It is because, the widget becomes unresponsive when the display mode > > is changed from portrait to landscape. I had the same issue and I what > > I had done is for every RemoteView update I had send all the > > pendingintent to make it work > > > On Jan 14, 4:26 pm, John Gaby wrote: > > > I have an App Widget on the Home screen which works fine until the > > > screen is auto-rotated. At that point, the onClick connection (set up > > > via a call to setOnClickPendingIntent) is lost. The only way I seem > > > to be able to get it back is to delete the Widget from the Home screen > > > and then add it back. Is there some kind of message that tells me > > > that the screen has rotated that I need to respond to (and reestablish > > > the connection)? > > > > Thanks > > > -- > > You received this message because you are subscribed to the Google > > Groups "Android Developers" group. > > To post to this group, send email to android-developers@googlegroups.com > > To unsubscribe from this group, send email to > > android-developers+unsubscr...@googlegroups.com > > For more options, visit this group at > >http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 phone for development
I am using a Motorola Droid and an HTC Hero (both purchased used through ebay), and find them to both work well. The phone does not need to be rooted or unlocked, and no phone service is required, unless your app make use of phone services. Also if you want to be able to test on a lot of different devices, there is a service which allows you to connect to phones remotely. It has it's problems, but have found it somewhat useful (although it is a bit pricey). http://www.deviceanywhere.com/index.aspx On Jan 11, 8:52 am, Nabin Shrestha wrote: > Hi all, > > I am newbe in Android application development. I have been using SDK > emulator with Eclipse IDE. Now I am thinking of getting Adroid phone for > testing my applications. I am not sure what kind of phone is good for > development purpose. Which phone or developement system you guys recommend? > I appreciate any information. Thanks. > > Regards, > > Nabin Shrestha -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Screen rotation with App Widgets loses onClick connection
Got it, thanks! On Jan 14, 8:27 am, Kostya Vasilyev wrote: > [see below] > > 2011/1/14 John Gaby > > > > There is no onUpdate on configuration changes. The home screen recreates > > > your widget, then takes the most recent RemoteViews and applies it to the > > > widget. > > > I figured that it was recreating the Widget on rotation. The problem > > is, I don't seem to be getting any messages to that effect, and have > > no way (that I can see) of re-establishing the connection. How can I > > determine that a rotate has happened and set up a new onClick > > connection? > > Like I said, you don't (determine or respond to an orientation change). > > What you do, is make sure that every time your code pushes a RemoteViews > object into the home application for your widget, it's complete in all > respects: > > - Has image resource ids; > - Has text stings; > - Has pending intents. > > Don't do "incremental" widget updates, like you would do with a regular > activity - don't set the intents first, then the images, then the text > reflecting current information. > > The home app runs as a separate process, and its state can get out-of-step > with your widget receiver. When it does, the only thing it has for > re-creating your widget is your most recent RemoteViews object. If it's > complete, and has all the parts, everything will work just fine. If it only > has the most recent text or image change, the earlier updates which had the > intents will be lost. > > http://kmansoft.wordpress.com/2010/05/23/widgets-and-orientation-chan... > > -- Kostya > > > Thanks > > > On Jan 14, 1:28 am, Kostya Vasilyev wrote: > > > Each and every update you push to the wigdget with RemoteViews has to > > have > > > complete widget state, including all images, text, and pending intents. > > > > There is no onUpdate on configuration changes. The home screen recreates > > > your widget, then takes the most recent RemoteViews and applies it to the > > > widget. > > > > If your codes tries to update the widget incrementally, piece-by-piece, > > with > > > one RemoteViews specifying the intent, and another, repeated, update > > setting > > > some changing information, then you end up with the most recent > > RemoteViews > > > only having your changing text, but no PendingIntent. > > > > This is very much unlike how Activities work, where the entire view > > > hierarchy is kept in memory for as long as the activity is on the screen > > > (and maybe longer). > > > > -- Kostya > > > > 2011/1/14 Anbu > > > > > It is because, the widget becomes unresponsive when the display mode > > > > is changed from portrait to landscape. I had the same issue and I what > > > > I had done is for every RemoteView update I had send all the > > > > pendingintent to make it work > > > > > On Jan 14, 4:26 pm, John Gaby wrote: > > > > > I have an App Widget on the Home screen which works fine until the > > > > > screen is auto-rotated. At that point, the onClick connection (set > > up > > > > > via a call to setOnClickPendingIntent) is lost. The only way I seem > > > > > to be able to get it back is to delete the Widget from the Home > > screen > > > > > and then add it back. Is there some kind of message that tells me > > > > > that the screen has rotated that I need to respond to (and > > reestablish > > > > > the connection)? > > > > > > Thanks > > > > > -- > > > > You received this message because you are subscribed to the Google > > > > Groups "Android Developers" group. > > > > To post to this group, send email to > > android-developers@googlegroups.com > > > > To unsubscribe from this group, send email to > > > > android-developers+unsubscr...@googlegroups.com > > > > > > > For more options, visit this group at > > > >http://groups.google.com/group/android-developers?hl=en > > > -- > > You received this message because you are subscribed to the Google > > Groups "Android Developers" group. > > To post to this group, send email to android-developers@googlegroups.com > > To unsubscribe from this group, send email to > > android-developers+unsubscr...@googlegroups.com > > For more options, visit this group at > >http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] App Widget disappears on reboot
I have an App Widget which I place on my home screen. It seems to work fine, but when I reboot the phone, it is not only gone from the home page, but is missing from the App Widget list, so I cannot add it again. Does anyone have any idea what might be going on here? 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: App Widget disappears on reboot
Actually, after playing with it a bit, I have determined that the problem lies with installing the app on the SD card. Apparently the card is not mounted in time during a reboot. I presume that it is simply a bad idea to have a Widget that runs from the SC card, because the user can unmount it at any time. My Widget is part of a larger app, which I would still like to install on the SD card. I don't suppose that there is any way to install a second APK file for the Widget on the phone, is there? Thanks. On Jan 15, 5:15 pm, Mark Murphy wrote: > On Sat, Jan 15, 2011 at 8:11 PM, John Gaby wrote: > > I have an App Widget which I place on my home screen. It seems to > > work fine, but when I reboot the phone, it is not only gone from the > > home page, but is missing from the App Widget list, so I cannot add it > > again. Does anyone have any idea what might be going on here? > > Is your package mentioned anywhere in LogCat after the reboot? > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy > > Android App Developer Books:http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: App Widget disappears on reboot
> You have to admit, that's not a reasonable expectation for the user > having to download a seperate app. It's an invitation to 1-stars (and > understandably so) if the user cannot find the widget. Yes, that is what I was thinking as well (I was asking if there was an automatic way to install a second APK, I did realize that the user could manually install one). If I put up a message when the app is first installed telling them that they can install the Widget app, and providing a link to the Market, do you think that I will get a lot of flack. Note that use of the Widget is an optional feature, and there may be many who simply will not use it at all. Considering that many phones don't have a lot of internal storage, I really don't want to force the user to install the whole app on the phone just to get a Widget that he may not really want anyway. On Jan 15, 7:02 pm, Zsolt Vasvari wrote: > > So, it's a > > bit of a pain for all involved, but it would allow you to have the > > main APK installable to the SD card. > > You have to admit, that's not a reasonable expectation for the user > having to download a seperate app. It's an invitation to 1-stars (and > understandably so) if the user cannot find the widget. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Variable size App Widget
Is there a way to allow the user to choose the size of the App Widget when he places it on his Home screen? I tried creating 2 ... sections in the manifest for 2 different sizes, but only the first shows up. 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] Sharing files between apps
I have two applications which can access each others files. To get a path to a file in the other app, I am using the context.getDir(...) function to get a path to the file for the running app, and then changing the package name component of that path to the package name of the other app. This seems to work, but I am wondering if this is a reliable way of doing this, or if there is another more appropriate way. 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: Sharing files between apps
> If you want to find out about an application, use > Context.createPackageContext() to create a Context configured for another > application. > This seems to be what I am looking for, however, when I call it with the package name of the other app, it returns null (I get nothing from logCat either). I can use the PackageManager and retrieve the info for that same package, so I am pretty sure I have the name correct and the app is installed. Do you have any ideas about what might be wrong? > And if you are using sharedUserId for this... please do reconsider, this > locks you into that forever and has pretty deep repercussions on the apps > since they are now one unified entity whose permissions must be the union of > both apps etc.) I am using a sharedUserId, however, the two apps are unified. In fact, I would much rather have just a SINGLE app. However, I want the user to be able to install the app to the SD card, but it includes a AppWidget component (which is optionally used) which cannot reside on the SC card. This seems to be forcing me to create two apps, may main app, and a separate app to handle the AppWidget. If there is a better way to do this, I am all ears. Thanks On Jan 16, 2:54 pm, Dianne Hackborn wrote: > That can break, there is no guarantee the apps are installed the same place, > for example if one is on the SD card and one isn't. > > If you want to find out about an application, use > Context.createPackageContext() to create a Context configured for another > application. > > (I assume you are doing tricks like creating the files world read/write to > allow access between them. If so, note this can open up security holes. I > would strongly recommend using one of the standard facilities for > interacting between them, such as a receiver, service, or content provider. > And if you are using sharedUserId for this... please do reconsider, this > locks you into that forever and has pretty deep repercussions on the apps > since they are now one unified entity whose permissions must be the union of > both apps etc.) > > > > On Sun, Jan 16, 2011 at 2:27 PM, John Gaby wrote: > > I have two applications which can access each others files. To get a > > path to a file in the other app, I am using the context.getDir(...) > > function to get a path to the file for the running app, and then > > changing the package name component of that path to the package name > > of the other app. This seems to work, but I am wondering if this is a > > reliable way of doing this, or if there is another more appropriate > > way. > > > 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] Re: Sharing files between apps
> Well no idea from just your paragraph description there. :) This API > certainly works -- it is used a lot, for things like inflating the UI of app > widgets. > The following is the routine that I wrote to test the function. The call to manager.getPackageInfo works, but the call to GetPackageContents returns null. private void Test() { String pkg = "com.gabysoft.quizardwidget"; PackageManager manager= getPackageManager(); PackageInfoinfo; try { info = manager.getPackageInfo(pkg, 0); int v = info.versionCode; } catch (NameNotFoundException e) { } Context c = GetPackageContext(pkg, CONTEXT_INCLUDE_CODE); File file = c.getDir("data", Context.MODE_PRIVATE); String path = file.getAbsolutePath(); } > Oh my. Well personally I would really strongly discourage doing that. I > think you are going to end up with continual pain in app maintenance, not to > mention support for your users dealing with multiple apps like this. I actually tend to agree, but I really hate to force the user to install the app to internal memory (there is a fair amount of content). The feedback I have gotten so far from the users that I have asked is that they would rather see a separate app than loose the ability to install on the SD card. Is there ANY other way to deal with this? Thanks. On Jan 16, 4:46 pm, Dianne Hackborn wrote: > On Sun, Jan 16, 2011 at 4:21 PM, John Gaby wrote: > > This seems to be what I am looking for, however, when I call it with > > the package name of the other app, it returns null (I get nothing from > > logCat either). I can use the PackageManager and retrieve the info > > for that same package, so I am pretty sure I have the name correct and > > the app is installed. Do you have any ideas about what might be > > wrong? > > Well no idea from just your paragraph description there. :) This API > certainly works -- it is used a lot, for things like inflating the UI of app > widgets. > > > I am using a sharedUserId, however, the two apps are unified. In > > fact, I would much rather have just a SINGLE app. However, I want the > > user to be able to install the app to the SD card, but it includes a > > AppWidget component (which is optionally used) which cannot reside on > > the SC card. This seems to be forcing me to create two apps, may main > > app, and a separate app to handle the AppWidget. If there is a better > > way to do this, I am all ears. > > Oh my. Well personally I would really strongly discourage doing that. I > think you are going to end up with continual pain in app maintenance, not to > mention support for your users dealing with multiple apps like this. > > -- > 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: Sharing files between apps
> What is "GetPackageContext" in your code? Is that just a typo and should be > "getPackageContext"? Well, now don't I feel sheepish! It was indeed a typo, and the ever so helpful editor created a GetPackageContext for me and returned null. Sorry about wasting your time. As for your other suggestion about using a broadcast to get the data, that does seem like a good idea. In fact, the widget itself uses a broadcast intent when the user click on it to get the next set of data to display. I assume that I could send that broadcast to my main app just as easily as it does to the Widget app. Thanks for the help and suggestions. On Jan 16, 5:57 pm, Dianne Hackborn wrote: > On Sun, Jan 16, 2011 at 5:19 PM, John Gaby wrote: > > The following is the routine that I wrote to test the function. The > > call to manager.getPackageInfo works, but the call to > > GetPackageContents returns null. > > What is "GetPackageContext" in your code? Is that just a typo and should be > "getPackageContext"? > > > I actually tend to agree, but I really hate to force the user to > > install the app to internal memory (there is a fair amount of > > content). The feedback I have gotten so far from the users that I > > have asked is that they would rather see a separate app than loose the > > ability to install on the SD card. Is there ANY other way to deal > > with this? > > Well for transferring data between apps, I will say the same thing I already > have: I would very much recommend using a receiver, service, or content > provider. Don't use shared user IDs. Your widget could just for example > send a broadcast to your app when it needs to populate data. As a bonus, > your main app could be the one in charge of the data and send a broadcast to > the widget app when it has changed to give it the new data. I think you'll > find this a much cleaner solution than trying to directly access data files. > > At any rate, offering your users a small add-on app that they can optionally > download to provide a widget is probably not too bad I guess. Heck you > could turn it into an advantage and make it paid so it is an additional > feature they can purchase for your app. ;) > > But I do think you should architect it so that the interaction between these > pieces is through app components, not data. It will result in a much > cleaner and more maintainable design. > > -- > 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: AESObfuscator is very slow
On a real device (Motorola Droid) it is faster but it still takes about 8-10 seconds which is way to long to have to wait every time the program starts. I have gotten around the problem by putting the license check (including the call to AESObfuscator) in a separate thread (note that the network connect part already ran in a separate thread, it was the creating of the Obfuscator that was taking all the time in the main thread) Thanks On Oct 28, 10:21 am, MB wrote: > Android emulator is superrr slow. After a while and some complaining, > you will get used to the slowness. > There are quite a few discussions on this group as to why it is slow > compared to iphone/other emulators. > > I bet on a real device it would be at least 10x faster. Still, you > should do license check in a separate thread since it involves network > connectivity. > > On Oct 27, 9:45 pm, John Gaby wrote: > > > I am trying to implement the Market License Checker, and am following > > the sample application. I am using the AESObfuscator class, but find > > that it takes a VERY long time (23 seconds on the emulator) to > > instantiate, which greatly delays the startup of my application. Is > > this normal, or am I doing something wrong? If it is normal, can I > > put the license check in a separate thread, or does it need to run in > > the main thread? > > > 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: Eclipse bug cripples Android app?
Are you using version 3.6 of Eclipse by any chance? I had no end of problems with that version and switched back to 3.5. I later read somewhere that there are know issues with 3.6, but the post didn't say what they were. On Oct 25, 10:36 pm, Andrew Smith wrote: > Dear all, > > First time posting here, and I write in severe desperation! :-) > > I'm using Eclipse. Today I made an error when adding a class to my > project. Instead of creating a file called ClassName.java I created it > as ClassName. So I deleted it, created ClassName.java and wrote the > code. When I launched the app on my phone it crashed immediately. > > This is a huge project that has been in development for 4 months, > mostly 16-hour days. Now for some reason it is crashing in the > onCreate routine of my Activity class. > > These lines work: > > super.onCreate(savedInstanceState); > requestWindowFeature(Window.FEATURE_NO_TITLE); > getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, > WindowManager.LayoutParams.FLAG_FULLSCREEN); > > This line crashes: > > g.assetManager=this.getAssets(); > > ("g" is a class used for global variables. "assetManager" is defined > as public static AssetManager assetManager) > > Another project, which launches in the same way, still works > perfectly. > > I can only assume that something, somewhere, has become corrupted. > When I tell you that I have been trying to fix this problem for the > past 4 hours you can imagine that I have tried all of the obvious > solutions -- restoring from backup, deleting Eclipse project files, > reinstalling the Android SDK, etc. I have even re-created my project > with a different package name. Nothing has worked. > > Does anybody have any idea what may have happened, and how to fix it? > > Please help! -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Setting File Permissions
If I have a File object which points to a non-existent directory (which is within my apps 'app_data' space), I can call file.mkdir() or file.mkdirs() to create the directories. However, if I do this, the directories seem to be created with permissions set for access only by the owner (i.e. drwx--). Then if I write a .mp3 file into that directory, I cannot later play that .mp3 file using the MediaPlayer, apparently because it does not have permission to read the file (note that if I put the .mp3 file directly in the 'app_data' directory, it works fine). How can I set the permissions on the directories that I create so that the MediaPlayer can access the files? Thanks. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Problem with ListView on a 480x854 device
I have a ListView where the rows are not scaled properly under certain circumstances. If I build my project using the following manifest, then the ListView looks like: http://gabysoft.com/images/androidgood.png. However, if I change the minSdkVersion to 4 (and that is the ONLY change), then the ListView looks like: http://gabysoft.com/images/androidbad.png. Note that if I run on a 320x480 device, then everything works fine. Can anyone explain what is going on here? Thanks http://schemas.android.com/apk/res/android"; package="com.gabysoft.myapp" android:versionCode="1" android:versionName="1.0"> -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Problem with ListView on a 480x854 device
Thanks for the link, that was most helpful. On Oct 29, 8:16 pm, Lance Nanek wrote: > http://developer.android.com/guide/practices/screens_support.html#attrs > > On Oct 29, 10:17 pm, John Gaby wrote: > > > I have a ListView where the rows are not scaled properly under certain > > circumstances. If I build my project using the following manifest, > > then the ListView looks like:http://gabysoft.com/images/androidgood.png. > > However, if I change the minSdkVersion to 4 (and that is the ONLY > > change), then the ListView looks > > like:http://gabysoft.com/images/androidbad.png. > > Note that if I run on a 320x480 device, then everything works fine. > > > Can anyone explain what is going on here? > > > Thanks > > > > > http://schemas.android.com/apk/res/android"; > > package="com.gabysoft.myapp" > > android:versionCode="1" > > android:versionName="1.0"> > > > > > > > > > android:debuggable="true" android:icon="@drawable/icon"> > > > android:label="@string/app_name" > > android:theme="@android:style/Theme.NoTitleBar" > > android:configChanges="orientation|keyboardHidden"> > > > > > > > android:name="android.intent.category.LAUNCHER" /> > > > > > > > > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Setting File Permissions
Thanks for the input. I decided that the SD card is the proper place for the files anyway, so I am trying to make that work. Since I want to support pre 2.2 versions, I am doing the following: String state = Environment.getExternalStorageState(); if (Environment.MEDIA_MOUNTED.equals(state)) { File root = Environment.getExternalStorageDirectory(); File ext = new File(root, "Android/data/" + m_activity.getPackageName() + "/files/"); boolean b = ext.mkdirs(); String s = ext.getAbsolutePath(); ... Unfortunately, the ext.mkdirs() call is returning false, and the directories are not being created. I did a web search, and it seems like this is the proper way to create my directory. Do you have any idea why it is not working for me? Thanks. On Oct 29, 11:19 pm, Mark Murphy wrote: > On Fri, Oct 29, 2010 at 6:03 PM, John Gaby wrote: > > If I have a File object which points to a non-existent directory > > (which is within my apps 'app_data' space), I can call file.mkdir() or > > file.mkdirs() to create the directories. However, if I do this, the > > directories seem to be created with permissions set for access only by > > the owner (i.e. drwx--). Then if I write a .mp3 file into that > > directory, I cannot later play that .mp3 file using the MediaPlayer, > > apparently because it does not have permission to read the file (note > > that if I put the .mp3 file directly in the 'app_data' directory, it > > works fine). How can I set the permissions on the directories that I > > create so that the MediaPlayer can access the files? > > Literally, I think the only answer is: > > Runtime.getRuntime().exec("chmod 755 " + fileName); > > If you create files via openFileOutput(), you can specify permission > bits, but that only works for files immediately in the app-local file > store. > > Or, put the files on the SD card. > > Or, create a content provider that serves up the files to the > MediaPlayer. This is probably the best answer (does not assume > command-line binaries that may or may not exist). > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy > > Android 2.2 Programming Books:http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Setting File Permissions
Much better! Now that you mention that I remember reading about that before, but had forgotten. Thanks again On Oct 30, 12:09 pm, Mark Murphy wrote: > Make sure you have the WRITE_EXTERNAL_STORAGE permission. > > > > On Sat, Oct 30, 2010 at 3:02 PM, John Gaby wrote: > > Thanks for the input. I decided that the SD card is the proper place > > for the files anyway, so I am trying to make that work. Since I want > > to support pre 2.2 versions, I am doing the following: > > > String state = Environment.getExternalStorageState(); > > > if (Environment.MEDIA_MOUNTED.equals(state)) > > { > > File root = > > Environment.getExternalStorageDirectory(); > > File ext = new File(root, "Android/data/" + > > m_activity.getPackageName() + "/files/"); > > boolean b = ext.mkdirs(); > > String s = ext.getAbsolutePath(); > > > ... > > > Unfortunately, the ext.mkdirs() call is returning false, and the > > directories are not being created. I did a web search, and it seems > > like this is the proper way to create my directory. Do you have any > > idea why it is not working for me? > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy > > Android 2.2 Programming Books:http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] MediaPlayer
I am using the MediaPlayer to play some .mp3 files. The files seem to play correctly, however, every time I play one I see the following in LogCat: 10-31 00:24:43.953: INFO/StagefrightPlayer(34): setDataSource('/mnt/ sdcard/Android/data/com.gabysoft.myapp/cache/Audio/Aud00.mp3') 10-31 00:24:43.963: DEBUG/AudioSink(34): bufferCount (4) is too small and increased to 12 10-31 00:24:44.694: ERROR/MP3Extractor(34): Unable to resync. Signalling end of stream. Is this 'Unable to resync' error something I need to be concerned about? 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] Soft Keyboard Control
Is there a way to get the soft keyboard to come up in the same mode as it was left the last time it was brought up. For example, if the user had switched to entering numbers, is there a way to set it up so that the next time he brings up the keyboard, it will default to entering numbers? Failing that, is there some way to control the current input mode (e.g. alpha or numbers) for the keyboard? 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: AESObfuscator is very slow
As an update to others who run into this problem, oddly enough, the long delay seems to only happen when I debug the app. If I run it without debugging, the whole license check (including creating the AESObfuscator object) take only a couple of seconds. On Oct 28, 12:12 pm, John Gaby wrote: > On a real device (Motorola Droid) it is faster but it still takes > about 8-10 seconds which is way to long to have to wait every time the > program starts. I have gotten around the problem by putting the > license check (including the call to AESObfuscator) in a separate > thread (note that the network connect part already ran in a separate > thread, it was the creating of the Obfuscator that was taking all the > time in the main thread) > > Thanks > > On Oct 28, 10:21 am, MB wrote: > > > Android emulator is superrrslow. After a while and some complaining, > > you will get used to the slowness. > > There are quite a few discussions on this group as to why it isslow > > compared to iphone/other emulators. > > > I bet on a real device it would be at least 10x faster. Still, you > > should do license check in a separate thread since it involves network > > connectivity. > > > On Oct 27, 9:45 pm,JohnGaby wrote: > > > > I am trying to implement the Market License Checker, and am following > > > the sample application. I am using the AESObfuscator class, but find > > > that it takes a VERY long time (23 seconds on the emulator) to > > > instantiate, which greatly delays the startup of my application. Is > > > this normal, or am I doing something wrong? If it is normal, can I > > > put the license check in a separate thread, or does it need to run in > > > the main thread? > > > > 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: AESObfuscator is very slow
I have noticed that as well. I have some list views which are very sluggish when I fling through the list while debugging, but are perfectly fast when not debugging. I have never seen this big of a difference, however (23 seconds when debugging to < 2 seconds without). John On Nov 3, 2:07 pm, Kostya Vasilyev wrote: > Debugging seems toslow*everything* down a lot. > > Sometimes even simple UI updates become a slide show. Once you run > without debugging, it's back to normal. > > This is weird, since I'm seeing this on 2.1, so it's not caused by JIT > being disabled (since there is no JIT on 2.1), but it's definitely there. > > -- Kostya > > 03.11.2010 23:57,JohnGabyпишет: > > > > > As an update to others who run into this problem, oddly enough, the > > long delay seems to only happen when I debug the app. If I run it > > without debugging, the whole license check (including creating the > > AESObfuscator object) take only a couple of seconds. > > > On Oct 28, 12:12 pm,JohnGaby wrote: > >> On a real device (Motorola Droid) it is faster but it still takes > >> about 8-10 seconds which is way to long to have to wait every time the > >> program starts. I have gotten around the problem by putting the > >> license check (including the call to AESObfuscator) in a separate > >> thread (note that the network connect part already ran in a separate > >> thread, it was the creating of the Obfuscator that was taking all the > >> time in the main thread) > > >> Thanks > > >> On Oct 28, 10:21 am, MB wrote: > > >>> Android emulator is superrrslow. After a while and some complaining, > >>> you will get used to the slowness. > >>> There are quite a few discussions on this group as to why it isslow > >>> compared to iphone/other emulators. > >>> I bet on a real device it would be at least 10x faster. Still, you > >>> should do license check in a separate thread since it involves network > >>> connectivity. > >>> On Oct 27, 9:45 pm,JohnGaby wrote: > I am trying to implement the Market License Checker, and am following > the sample application. I am using the AESObfuscator class, but find > that it takes a VERY long time (23 seconds on the emulator) to > instantiate, which greatly delays the startup of my application. Is > this normal, or am I doing something wrong? If it is normal, can I > put the license check in a separate thread, or does it need to run in > the main thread? > Thanks. > > -- > Kostya Vasilyev -- 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] Shared User ID and Signing
I am trying to have 2 applications which can access each other's data. I have a two test applications which I am experimenting with. I set the 'Shared user id' for each to 'com.gabysoft.sharedfiles'. However, when I sign the first app and try and install it, I get the error: 11-05 16:50:33.422: ERROR/PackageManager(61): Package com.gabysoft.sharedfiles1 has no signatures that match those in shared user com.gabysoft.sharedfiles; ignoring! Clearly, I am not signing it correctly (I am using Eclipse's "Export signed application package" function). How do I properly sign the .apk file so that I don't have this problem? 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: Shared User ID and Signing
Actually, I didn't miss that at all, they ARE both signed using the same certificate. However, the problem occurs when I try and install the FIRST application (the second on has not yet been installed). When I try and do that I get the error I described. On Nov 5, 12:17 pm, Marcin Orlowski wrote: > On 5 November 2010 17:55, John Gaby wrote: > > > However, when I sign the first app and try and install it, I get the > > > > While android docs are far from perfect, some elements are documented. > This is what you missed: > > "[...]provided that they are also signed by the same certificate" > > http://developer.android.com/guide/topics/manifest/manifest-element.h... -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Shared User ID and Signing
As an update, I created a new clean emulator, and I am able to get both apps to install, and they seem to be able to read each other's data. However, on the first emulator, I still cannot install either one, even if I delete all of the app first. Any idea why that is? Thanks On Nov 5, 3:12 pm, John Gaby wrote: > Actually, I didn't miss that at all, they ARE both signed using the > same certificate. However, the problem occurs when I try and install > the FIRST application (the second on has not yet been installed). > When I try and do that I get the error I described. > > On Nov 5, 12:17 pm, Marcin Orlowski wrote: > > > On 5 November 2010 17:55, John Gaby wrote: > > > > However, when I sign the first app and try and install it, I get the > > > > > > While android docs are far from perfect, some elements are documented. > > This is what you missed: > > > "[...]provided that they are also signed by the same certificate" > > >http://developer.android.com/guide/topics/manifest/manifest-element.h... -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en