[android-developers] Incoming HTTP requests
Hi all, for the sole purpose of performance analysis I want to allow HTTP incoming requests to be enabled on an Android device - I am running a custom made HTTP server on it. Currently the client phone resides in the same LAN as the server and it can ping it. The server opens a port 5000 and waits for incoming requests. The client get a connection refused exception once it tries to connect to the server. I am running this on a number of versions from Android 1.6 to 3+. 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] Remote control of apps
Hi all, I remember that you can launch apps remotely on a phone using: adb shell am start -n ... I never looked for one that would terminate the app remotely. Is there one? May be I can write scripts that can grep the ps on the device and send a remote kill but (i) that is not possible on devices that are not rooted and (ii) may be not a good idea. So most likely I will have to write a receptor on an app that when a term app commands comes in over a socket it can then schedule itself with Android for termination. Has anyone tried this before? 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] Camera access
Hi all, I have been running an activity that access the phone's camera (on Froyo), puts it in preview mode and then snaps and stores a picture. This has been working fine on one phone but on a second phone with the same OS and specs I get the following: I/#LGIME ( 1481): onStartInput: restarting=false, fieldId=-1 I/System.out( 6895): surface created - calling picture ... E/CameraService( 1291): CameraService::connect X (pid 6895, new client 0x1bfc8) rejected. (old pid 5261, old client 0x22798) E/CameraService( 1291): forcefully terminating old client.. ref count Has anyone seen this before? What would cause the camera service to reject connections to it since the Manifest for the app is the same as on the other phone and it does allow Camera access. Any ideas would be appreciated. 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: Camera access
Right on Mark, One of the reasons I found out was a lingering process that was locked it. I killed that process and the camera service responds fine now. The second time it did this I found out that after the camera goes into preview, an image is snapped (this is the app I am testing that takes pictures automatically every few seconds) but right after the first picture is snapped on this phone the Camera service dies. This is still puzzling cause like I said earlier this app works fine on an identical phone. I will check to see if I am setting the resolution of the preview or the picture to be something outside what this camera can handle? Also I saw messages that the Rolloff feature is not supported, no idea what that is. When I set the autofocus in the manifest the phone (again running 2.2) said that this feature is not available, which makes no sense since 2.2 does support autofocus. On Nov 15, 5:53 pm, Mark Murphy mmur...@commonsware.com wrote: It seems like the CameraService thinks that the camera is in use. Only one application can use the camera at a time. And if an application leaks the camera (by not closing it), it might be tied up until the process gets terminated or you reboot the phone. On Tue, Nov 15, 2011 at 5:17 PM, kypriakos demet...@ece.neu.edu wrote: Hi all, I have been running an activity that access the phone's camera (on Froyo), puts it in preview mode and then snaps and stores a picture. This has been working fine on one phone but on a second phone with the same OS and specs I get the following: I/#LGIME ( 1481): onStartInput: restarting=false, fieldId=-1 I/System.out( 6895): surface created - calling picture ... E/CameraService( 1291): CameraService::connect X (pid 6895, new client 0x1bfc8) rejected. (old pid 5261, old client 0x22798) E/CameraService( 1291): forcefully terminating old client.. ref count Has anyone seen this before? What would cause the camera service to reject connections to it since the Manifest for the app is the same as on the other phone and it does allow Camera access. Any ideas would be appreciated. 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 Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Camera access
Well this is what I found out - first time the activity is launched the camera goes into preview mode, snaps a pic, stores the pic and then tries to get into preview mode again. I removed the last step and still the pic is taken and it stays stuck on the screen. I realized that the camera service usually will ask the user if he/she wants to save the pic. Either way it then returns to the preview mode. In the case of my app it is supposed to snap the pic, save it and return to preview. This exact code works on teh G1 but on the LG after the pic is snapped it remains on the screen. Would the camera service be different across Froyo-based mobiles? I wouldn't thjnk so ... On Nov 15, 6:05 pm, kypriakos demet...@ece.neu.edu wrote: Right on Mark, One of the reasons I found out was a lingering process that was locked it. I killed that process and the camera service responds fine now. The second time it did this I found out that after the camera goes into preview, an image is snapped (this is the app I am testing that takes pictures automatically every few seconds) but right after the first picture is snapped on this phone the Camera service dies. This is still puzzling cause like I said earlier this app works fine on an identical phone. I will check to see if I am setting the resolution of the preview or the picture to be something outside what this camera can handle? Also I saw messages that the Rolloff feature is not supported, no idea what that is. When I set the autofocus in the manifest the phone (again running 2.2) said that this feature is not available, which makes no sense since 2.2 does support autofocus. On Nov 15, 5:53 pm, Mark Murphy mmur...@commonsware.com wrote: It seems like the CameraService thinks that the camera is in use. Only one application can use the camera at a time. And if an application leaks the camera (by not closing it), it might be tied up until the process gets terminated or you reboot the phone. On Tue, Nov 15, 2011 at 5:17 PM, kypriakos demet...@ece.neu.edu wrote: Hi all, I have been running an activity that access the phone's camera (on Froyo), puts it in preview mode and then snaps and stores a picture. This has been working fine on one phone but on a second phone with the same OS and specs I get the following: I/#LGIME ( 1481): onStartInput: restarting=false, fieldId=-1 I/System.out( 6895): surface created - calling picture ... E/CameraService( 1291): CameraService::connect X (pid 6895, new client 0x1bfc8) rejected. (old pid 5261, old client 0x22798) E/CameraService( 1291): forcefully terminating old client.. ref count Has anyone seen this before? What would cause the camera service to reject connections to it since the Manifest for the app is the same as on the other phone and it does allow Camera access. Any ideas would be appreciated. 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 Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Camera access
Just in case this will help anyone else - i figured out the issue. I was snapping a picture and then restarting the preview right away. With the slower phones (G1) this was ok but with newer phones that are faster this won't work. I moved the preview to start inside the jpegcallback and after the picture was stored and it works fine now. Thanks On Nov 16, 12:41 am, kypriakos demet...@ece.neu.edu wrote: Well this is what I found out - first time the activity is launched the camera goes into preview mode, snaps a pic, stores the pic and then tries to get into preview mode again. I removed the last step and still the pic is taken and it stays stuck on the screen. I realized that the camera service usually will ask the user if he/she wants to save the pic. Either way it then returns to the preview mode. In the case of my app it is supposed to snap the pic, save it and return to preview. This exact code works on teh G1 but on the LG after the pic is snapped it remains on the screen. Would the camera service be different across Froyo-based mobiles? I wouldn't thjnk so ... On Nov 15, 6:05 pm, kypriakos demet...@ece.neu.edu wrote: Right on Mark, One of the reasons I found out was a lingering process that was locked it. I killed that process and the camera service responds fine now. The second time it did this I found out that after the camera goes into preview, an image is snapped (this is the app I am testing that takes pictures automatically every few seconds) but right after the first picture is snapped on this phone the Camera service dies. This is still puzzling cause like I said earlier this app works fine on an identical phone. I will check to see if I am setting the resolution of the preview or the picture to be something outside what this camera can handle? Also I saw messages that the Rolloff feature is not supported, no idea what that is. When I set the autofocus in the manifest the phone (again running 2.2) said that this feature is not available, which makes no sense since 2.2 does support autofocus. On Nov 15, 5:53 pm, Mark Murphy mmur...@commonsware.com wrote: It seems like the CameraService thinks that the camera is in use. Only one application can use the camera at a time. And if an application leaks the camera (by not closing it), it might be tied up until the process gets terminated or you reboot the phone. On Tue, Nov 15, 2011 at 5:17 PM, kypriakos demet...@ece.neu.edu wrote: Hi all, I have been running an activity that access the phone's camera (on Froyo), puts it in preview mode and then snaps and stores a picture. This has been working fine on one phone but on a second phone with the same OS and specs I get the following: I/#LGIME ( 1481): onStartInput: restarting=false, fieldId=-1 I/System.out( 6895): surface created - calling picture ... E/CameraService( 1291): CameraService::connect X (pid 6895, new client 0x1bfc8) rejected. (old pid 5261, old client 0x22798) E/CameraService( 1291): forcefully terminating old client.. ref count Has anyone seen this before? What would cause the camera service to reject connections to it since the Manifest for the app is the same as on the other phone and it does allow Camera access. Any ideas would be appreciated. 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 Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Camera autofocus
I am wondering if I upgrading to 2.3 may help the cause but it makes no sense for a method out of a standard package to be missing. The permission for the camera hardware is set in the manifest. Any ideas will be greatly appreciated. Thanks On Oct 29, 9:52 pm, kypriakos demet...@ece.neu.edu wrote: And I do think Froyo still has the autofocus avaliable in its API ... hmm On Oct 29, 9:44 pm, kypriakos demet...@ece.neu.edu wrote: Hi all, I am getting the famous Failure [INSTALL_FAILED_MISSING_FEATURE] on an Optimus LG 350P running Froyo (2.2.1). Checking the logging I see the following: E/PackageManager( 1376): Package org.mortbay.ijetty requires unavailable feature android.hardware.camera.autofocus; failing! What ??? The phone does have the autofocus feature on the phone. And the app works fine on the G1 ... would this mean that the autofocus is not enabled hardware wise on the device? Or is something else missing from the app's point of 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] Camera autofocus
Hi all, I am getting the famous Failure [INSTALL_FAILED_MISSING_FEATURE] on an Optimus LG 350P running Froyo (2.2.1). Checking the logging I see the following: E/PackageManager( 1376): Package org.mortbay.ijetty requires unavailable feature android.hardware.camera.autofocus; failing! What ??? The phone does have the autofocus feature on the phone. And the app works fine on the G1 ... would this mean that the autofocus is not enabled hardware wise on the device? Or is something else missing from the app's point of 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: Camera autofocus
And I do think Froyo still has the autofocus avaliable in its API ... hmm On Oct 29, 9:44 pm, kypriakos demet...@ece.neu.edu wrote: Hi all, I am getting the famous Failure [INSTALL_FAILED_MISSING_FEATURE] on an Optimus LG 350P running Froyo (2.2.1). Checking the logging I see the following: E/PackageManager( 1376): Package org.mortbay.ijetty requires unavailable feature android.hardware.camera.autofocus; failing! What ??? The phone does have the autofocus feature on the phone. And the app works fine on the G1 ... would this mean that the autofocus is not enabled hardware wise on the device? Or is something else missing from the app's point of 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: Google Development phones
Hi all, the Market lists only one phone, the Nexus One and it says it is not longer available. Does that mean that Google is out of stock or does it mean that they are simply switching to a new phone and so this was off their pages? Thanks On Aug 18, 1:26 pm, Mark Ayers markthe...@gmail.com wrote: The Nexus phones will always get updates quickest, though I'd be willing to bet that after the Nexus Prime, they will all be made by Motoogle. On Aug 18, 2011 6:06 AM, ColorTheorist colortheorydevelo...@gmail.com wrote: Sorry, that was just a throwaway comment. Eventually Motorola will become the gold standard for Android phones due to their proximity to the software, but in the short term they're no different than any other device. If whoever it was needs a phone today any of the phones that are out there should be fine. That's not entirely true. Motorola phones are still on top of their updates faster than most other devices, while other cheaper phones might not receive updates at all, or take quite an extensive amount of time to get the newest releases. As a developer it is useful to get the newest updates in a timely manner if you plan on using them anywhere near the newest OS release. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Google Development phones
Good point - and I think the Nexus S is a bit overpriced. I had G1 phones for a while (both the development and the retail versions) running 1.6 but I have not been able to upgrade the retail ones to 2.1 or 2.2. I am assuming the only images I can find are the Cyanmodegen ones? A Verizon developer told me they are developing on primarily Motorola phones and it seems that they are still using Droids which makes your point valid. I did check out the pie chart of the Android OS distribution on devices and yes 2.1 is still at 18% and the bulk of it is on 2.2 etc. So it makes sense to take it easy on the platforms I should use. Is it easy to root such phones? I know that it is not necessary to go through the risk of rooting phones since non rooted phones can suffice. On Sep 21, 12:59 pm, Christopher Van Kirk christopher.vank...@gmail.com wrote: The original developer phone was the G1. Then came the Magic/G2. Then came the Nexus One. The current developer phone is the Nexus S, but it's an open question whether you really want to get one. The Nexus S is always closest to the bleeding edge of the phone operating system. The rest of the market, however, is still pretty far behind (I think something like 60% still runs Android 2.2, and if you look at Verizon's stable of phones, very few are 2.2). So if you're developing for mass consumption it might be better to get something a bit more retro. On 9/22/2011 12:17 AM, Kristopher Micinski wrote: The original development phone was the nexus one, however the concept of an official development phone hasn't been around for a long time, and people just generally use their own devices for development these days. As long as you buy a nice device (for what you want to do with it) you should be fine, optionally one that you think you can quickly root. Kris On Wed, Sep 21, 2011 at 9:55 AM, kypriakosdemet...@ece.neu.edu wrote: Hi all, the Market lists only one phone, the Nexus One and it says it is not longer available. Does that mean that Google is out of stock or does it mean that they are simply switching to a new phone and so this was off their pages? Thanks On Aug 18, 1:26 pm, Mark Ayersmarkthe...@gmail.com wrote: The Nexus phones will always get updates quickest, though I'd be willing to bet that after the Nexus Prime, they will all be made by Motoogle. On Aug 18, 2011 6:06 AM, ColorTheoristcolortheorydevelo...@gmail.com wrote: Sorry, that was just a throwaway comment. Eventually Motorola will become the gold standard for Android phones due to their proximity to the software, but in the short term they're no different than any other device. If whoever it was needs a phone today any of the phones that are out there should be fine. That's not entirely true. Motorola phones are still on top of their updates faster than most other devices, while other cheaper phones might not receive updates at all, or take quite an extensive amount of time to get the newest releases. As a developer it is useful to get the newest updates in a timely manner if you plan on using them anywhere near the newest OS release. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Older stuff
Hi all, does anyone know if there are any OTA updates archives for updating any older phones (HTC G1 and the like) from Android 1.1 to 1.5 or 1.6. The attempt is to eventually upgrade these phones to 2.2 but I think I will need to go through the older updates first before I get there? Plus I am not sure 2.2 will work on them anyway so at least I can get to 1.6 and get these phones to be functional for us. Thanks in advace -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Databases
Hi all, I create a database in the assets of a project and install and start the app. When does Android copy the database in the /data/data/app name/databases directory? I don't see it listed there until I open an sqlite3 DB handler to it in the code. Is this right? 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: Databases
Please ignore the posting below: the database was not being created in the OnCreate so thought that the Android was scheduling the creation at a later point in time. I do have methods that transfer the DB from the assets to the appropriate directories. I apologize for the extra email. Thanks On Sep 19, 5:30 pm, kypriakos demet...@ece.neu.edu wrote: Hi all, I create a database in the assets of a project and install and start the app. When does Android copy the database in the /data/data/app name/databases directory? I don't see it listed there until I open an sqlite3 DB handler to it in the code. Is this right? 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: Older stuff
Thanks Chris. I looked around including URLs at Google (http:// android.clients.google.com/packages/) but these images are nowhere to be found (Cupcake or Donut). Not sure if I can build them myself eventually off the source code. I did look around XDA Devs but didn't see the link below so I will follow up on that. I think G1 does support 2.2 (or at least that's what people claim) so I can give it a shot but I need to get it off the ground first from 1.1 and into 1.5/1.6 first. And like you said, matching the various packages is the trick. On Sep 19, 4:06 pm, Chris crehb...@gmail.com wrote: You can flash newer firmware on older phones if the phone supports it. You're probably not going to get an update pushed over the air, though, you'll probably have to find a copy of the firmware and flash it yourself. Keep in mind that radio and bootloader firmwares will have to be updated, and those can be trickier than just a system firmware. For reference, this is a good xda-developers thread for G1/Magichttp://forum.xda-developers.com/showthread.php?t=668090. I still have a Magic with GingerYoshi running on it (a 2.3 derivative) And yes, as long as you match up your radios, bootloaders and system roms you can jump from, eg. 1.5 to 2.2. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Upgrading from 1.6 to 2.2+
Ok thanks Mark. The only strange things they did (since they were written a while back from not so experienced developers) was read and write files (log files) on the SD Card using File I/O classes and use the file:///android_asset/ ... from WebViews for opening html files locally. Has access to storage been disabled after 2.2 using file:// or is that a misleading information I read in a posting? On Sep 8, 4:50 pm, Mark Murphy mmur...@commonsware.com wrote: On Thu, Sep 8, 2011 at 4:40 PM, kypriakos demet...@ece.neu.edu wrote: Would such phones run apps written with API 4 without major overhaul? Unless your apps are doing something very strange, they should run fine. Again, if these app are on the Market, they are probably already running on newer versions of Android. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android Training in NYC:http://marakana.com/training/android/ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Upgrading from 1.6 to 2.2+
Excellent - ok thanks Mark I appreciate the responses. On Sep 9, 10:21 am, Mark Murphy mmur...@commonsware.com wrote: On Fri, Sep 9, 2011 at 9:42 AM, kypriakos demet...@ece.neu.edu wrote: Ok thanks Mark. The only strange things they did (since they were written a while back from not so experienced developers) was read and write files (log files) on the SD Card using File I/O classes and use the file:///android_asset/ ... from WebViews for opening html files locally. Has access to storage been disabled after 2.2 using file:// or is that a misleading information I read in a posting? file:///android_asset works for WebViews. file:// works for WebViews, at least for newer versions of Android (it didn't originally, not sure when they enabled it). -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android Training...At Your Office:http://commonsware.com/training -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Upgrading from 1.6 to 2.2+
Hi all, we are in the process of moving a number of apps and their convoluted logic from older OSes (1.6) to 2.2. Are versions 2.2+ backwards compatible for the most part with older versions? What are the most profound changes that need to be done? Most of these apps make use of data on the SD card (read and write to it) but the rest of the functionality is modest. I know this is a loaded question and I am not looking for a comprehensive answer but more like major points/directions to follow. I was thinking also that Mark's books may come handy since they do progressively walk through versions. 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: Upgrading from 1.6 to 2.2+
Hi guys, apologies for the vagueness. We wrote apps using API 4 to run on HTC G1 development phones that can run at the max Android 1.6. We wanted to port a number of them to Android 2.2+ without (which was the first mistake) testing them on actual hardware that does run that OS. Would such phones run apps written with API 4 without major overhaul? @ Diane - The diffs are primarily incremental right? Each new API compared to the one before it? Still this helps! @ Mark - is Marakana only providing sessions on the West Coast? Do they have anything planned for the NorthEast? On Sep 8, 12:22 pm, Dianne Hackborn hack...@android.com wrote: Information about the major changes in each version is available here: http://developer.android.com/sdk/index.html On the left is the section for each version. This includes an overview of the major new feature, as well as detailed API diffs of the new APIs introduced in that version. Your question isn't specific enough to be able to answer much more than that. On Thu, Sep 8, 2011 at 8:53 AM, kypriakos demet...@ece.neu.edu wrote: Hi all, we are in the process of moving a number of apps and their convoluted logic from older OSes (1.6) to 2.2. Are versions 2.2+ backwards compatible for the most part with older versions? What are the most profound changes that need to be done? Most of these apps make use of data on the SD card (read and write to it) but the rest of the functionality is modest. I know this is a loaded question and I am not looking for a comprehensive answer but more like major points/directions to follow. I was thinking also that Mark's books may come handy since they do progressively walk through versions. 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: Upgrading from 1.6 to 2.2+
Scratch the without (which was the first mistake) testing them on actual hardware that does run that OS. We are planning this upgrade now but we don't have the hardware for it yet so we will be testing them on emulators. That was a different posting I had - I cannot see any dev phones on the Market. On Sep 8, 4:40 pm, kypriakos demet...@ece.neu.edu wrote: Hi guys, apologies for the vagueness. We wrote apps using API 4 to run on HTC G1 development phones that can run at the max Android 1.6. We wanted to port a number of them to Android 2.2+ without (which was the first mistake) testing them on actual hardware that does run that OS. Would such phones run apps written with API 4 without major overhaul? @ Diane - The diffs are primarily incremental right? Each new API compared to the one before it? Still this helps! @ Mark - is Marakana only providing sessions on the West Coast? Do they have anything planned for the NorthEast? On Sep 8, 12:22 pm, Dianne Hackborn hack...@android.com wrote: Information about the major changes in each version is available here: http://developer.android.com/sdk/index.html On the left is the section for each version. This includes an overview of the major new feature, as well as detailed API diffs of the new APIs introduced in that version. Your question isn't specific enough to be able to answer much more than that. On Thu, Sep 8, 2011 at 8:53 AM, kypriakos demet...@ece.neu.edu wrote: Hi all, we are in the process of moving a number of apps and their convoluted logic from older OSes (1.6) to 2.2. Are versions 2.2+ backwards compatible for the most part with older versions? What are the most profound changes that need to be done? Most of these apps make use of data on the SD card (read and write to it) but the rest of the functionality is modest. I know this is a loaded question and I am not looking for a comprehensive answer but more like major points/directions to follow. I was thinking also that Mark's books may come handy since they do progressively walk through versions. 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] Android Dev Phone
Hi all, is the only dev phone in Android Market the Nexus One which by the way is listed as no longer available? How is everyone else developing apps if no dev phones are available? I was under the impression that the retail phones do not come rooted and thus the su command is not available. Is this the case? 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] Git and source code
Hi all, I am getting connect failures on repo init -u git://android.git.kernel.org/platform/manifest.git -b froyo I was able to download the source in the past but not the past couple of days. Anything missing? 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: Git and source code
Aha - thanks! I found outdated posts but not this one. On Sep 7, 3:44 pm, Mark Murphy mmur...@commonsware.com wrote: On Wed, Sep 7, 2011 at 3:01 PM, kypriakos demet...@ece.neu.edu wrote: I am getting connect failures on repo init -u git://android.git.kernel.org/platform/manifest.git -b froyo I was able to download the source in the past but not the past couple of days. Anything missing? http://stackoverflow.com/questions/7294796/access-denied-to-android-g... -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android Training...At Your Office:http://commonsware.com/training -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Activity comms
Hi all, I start Activity B from Activity A using: Intent intent = new Intent(); intent.setClass(androidContext, org.myActB..class); intent.setFlags(intent.FLAG_ACTIVITY_SINGLE_TASK); intent.putExtra(from act A, Hello); androidContext.startActivity(intent); Now if Activity A is terminated and restarted, is there a way to get a handler to Activity B again? If it calls the above statements again and since the SINGLE_TASK flag is called I am expecting that Activity B won't be regenerated which means if I change the Extras then Activity B should receive the new data? But I am not sure if that's possible unless a OnNewActivity method is called that will force Activity B to read the new data. Is this correct? I am not 100% clear as to how activities can communicate in a iterative manner through the new intent method. 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: Terminating apps
I think I understand the termination process a bit better now. I guess calling finish() on an activity (and finish() will execute immediately) it is as if you are scheduling it for termination by the OS. And I guess that will justify the existance of the finishing() method that can return that a particular activity has been requested to terminate. On Aug 27, 10:41 pm, kypriakos demet...@ece.neu.edu wrote: I am wondering if it is possible to exit the activity but subsequently ask Android to terminate it immediately ... If by it, you mean the process, please do not do this. Please let Android terminate it when it is ready to. Whatever problem you are trying to solve can be solved better some other way. I know I know - and thus the questions. I don't feel it's the right thing to do by doing so and I am trying to find a way around it. On a different note - how far back do your books go? Did you cover 1.6 and 2.1? Yes. 1.5, even. Mostly, I cover Android and try to point out when various new-ish features were added to the OS. Good! That's a good approach. I like to study the OS but through its transitions and the lessons learned. I will check them out. Ack on the rest - good info. 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] SSH to device
Hi all, I have the SSHDroid running on the device and I can ping it. But ssh- ing to it asks for a root passwd and I am assuming that means the phone needs to be rooted, or a root login added to it? Not sure. Since the ssh server is running on a particular port and I get a login prompt back I am assuming that there should be a login of some sort i can use to access the shell? Any ideas? 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: SSH to device
Agreed. A more general question: What does the adb connect do exactly? Not much info on the adb page about it. If I run it it says that it's connected to the device but it shows it as offline. Is this supposed to be used in combination with any 3rd party app or I should be able to issue commands to the device remotely? I have been using the USB connection and issue adb shell on the device I can use 'su' to be able to let's say kill apps that are not responding. I want to be able to do that without the USB connection and via TCP. On Aug 27, 10:49 am, Mark Murphy mmur...@commonsware.com wrote: Support for SSHDroid is presumably provided by the SSHDroid authors, not this list. On Sat, Aug 27, 2011 at 10:41 AM, kypriakos demet...@ece.neu.edu wrote: Hi all, I have the SSHDroid running on the device and I can ping it. But ssh- ing to it asks for a root passwd and I am assuming that means the phone needs to be rooted, or a root login added to it? Not sure. Since the ssh server is running on a particular port and I get a login prompt back I am assuming that there should be a login of some sort i can use to access the shell? Any ideas? 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 3.1 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: SSH to device
Really? Well that's what I need - thanks Mark I will follow up! On Aug 27, 11:21 am, Mark Murphy mmur...@commonsware.com wrote: On Sat, Aug 27, 2011 at 11:03 AM, kypriakos demet...@ece.neu.edu wrote: What does the adb connect do exactly? Not much info on the adb page about it. Sorry, I've never used it. I want to be able to do that without the USB connection and via TCP. I can tell you that I've used QuickSSHd (http://teslacoilsw.com/quicksshd). You supply the SSH password in the QuickSSHd activity and use that to log in with a semi-arbitrary user name, or you can use SSH shared keys. I can't speak to the `su` stuff, but QuickSSHd does appear to support root. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android 3.1 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] Terminating apps
Hi again, I issue a finish() on a single process app, it exits to the home screen of the phone but a ps shows that the process is still running. Is this the proper way to terminate an app? I thought so. 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: Terminating apps
Aha ... With eventually you mean that if Android does not need RAM the process could be around for a while (or until the phone is rebooted)? Is finish() synchronous and it occurs immediately? I am wondering if it is possible to exit the activity but subsequently ask Android to terminate it immediately ... On a different note - how far back do your books go? Did you cover 1.6 and 2.1? On Aug 27, 12:03 pm, Mark Murphy mmur...@commonsware.com wrote: On Sat, Aug 27, 2011 at 11:56 AM, kypriakos demet...@ece.neu.edu wrote: I issue a finish() on a single process app, it exits to the home screen of the phone but a ps shows that the process is still running. Android will terminate the process eventually. Android keeps the process running initially, in case the user happens to pop right back into it, so they can get into the app more quickly and with less battery use. Once Android starts needing RAM for other apps, though, your unused process will be terminated. Is this the proper way to terminate an app? I thought so. finish() is the proper way to exit an activity. You do not terminate an app on Android any more than you terminate a Web app. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android 3.1 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: SSH to device
Yes the security aspect is important so I agree with the suggestion. However, I think I did try something along these lines a while back but it didn't work. Is this the right approach? With the phone on USB: setprop service.adb.tcp.port stop adbd start adbd Rebooting the phone removed the property. Thanks On Aug 27, 1:15 pm, Chris Stratton cs07...@gmail.com wrote: On Saturday, August 27, 2011 11:03:26 AM UTC-4, kypriakos wrote: What does the adb connect do exactly? Not much info on the adb page about it. You would use it to connect to a device which has an adbd listening on something other than the USB, for example listening on TCP so that you can have ADB over wireless (or even wired ethernet on some non-handheld platforms). For something you would leave running, ssh could be preferable as ADB has no security. In either case though, excepting system-level debugging its probably preferable to have the daemon started/stopped by an android app control panel, with status bar notification while it is on, so that you only have it on when you expect to be using 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: Terminating apps
I am wondering if it is possible to exit the activity but subsequently ask Android to terminate it immediately ... If by it, you mean the process, please do not do this. Please let Android terminate it when it is ready to. Whatever problem you are trying to solve can be solved better some other way. I know I know - and thus the questions. I don't feel it's the right thing to do by doing so and I am trying to find a way around it. On a different note - how far back do your books go? Did you cover 1.6 and 2.1? Yes. 1.5, even. Mostly, I cover Android and try to point out when various new-ish features were added to the OS. Good! That's a good approach. I like to study the OS but through its transitions and the lessons learned. I will check them out. Ack on the rest - good info. 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: GPS vs Network
I agree - thanks. I ended up testing that last night and you are right. SO I check first for the most accurate info (if gps is enable) and if not there I get the next available which is the network. On Aug 25, 11:28 pm, lbendlin l...@bendlin.us wrote: yes, if you register your location listener for both sources you will get data from both. That data will contain the accuracy information so you can decide which one to use. if you unsubscribe from the GPS location service then I would expect the lastknownlocation to be fed from the network location service. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] 1.6 to later versions
Hi all, we have some legacy apps running on 1.6 phones. Would 2.1 be the next (and only probably) compatible version that such apps can run on without issues? I think 2.2+ is when the apps may need to be modified. Is that a correct assessment? 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] Remote execution
Hi all, I am able to access one of the development phones I have over the network and start activities using: $ ./adb.exe shell am start -n package name/activity name However I noticed that in such cases the activity does not connect to a remote host (via sockets). If I start the activity manually on the phone then that works fine. Is the above command running the activity isolated from the phone's services (network etc)? Also, is there a way to reboot a phone remotely from the shell? 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] GPS vs Network
Hi all, is there anywhere where I can find more information as to how these work? In other words, when I have them both turned on I do get coords from both of them (programmatically) even though the Network seems to be a bit off, which is expectable. What's not clear is, if I enable the GPS in the phone's configuration, let it pick up a set of coords and then disable it, shouldn't that be the lastknownlocation? It seems to me if the GPS is disabled that value is also gone. Is that correct? 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] Communicating between servlet and activity
Hi all, I am running a servlet on iJetty that uses startActivity(intent) to start an activity. I can send data to the activity through Bundles but not sure how to send data back from the activity. I cannot use the startActivityForResult since the servet extends the HttpServlet. It has however the app context: android.content.Context androidContext = (android.content.Context)config.getServletContext().getAttribute(org.mortbay.ijetty.context); For now I am using my own implementation of shared mem on the SDCard but that's not a standard method I want to keep around. Any ideas on how this can be accomplished? A singleton class or extend the Application class? The two classes (servlet and activity) are in two separate projects. 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] Location providers on Android
Hi all, I have two phones on which I am running location-based apps. Both work fine with GPS provider enabled but when I enable Network (and while both of them are connected to the local Wi Fi) only one returns its location, the other returns null. The two apps running on the phones are the same copy of the same source and the phones are fairly identical in configuration. Is there a discrepancy across phones with as to which provider is enabled? Do I need to manually enable a provider on a phone? 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] SQLite exceptions?
Hi all, I am getting this exception but I am not sure what it's all about - I am not really using a DB in my app and this started happening a couple of days ago. Any hints would certainly help me chase it. Thanks: I/dalvikvm( 878): Uncaught exception thrown by finalizer (will be discarded): I/dalvikvm( 878): Ljava/lang/IllegalStateException;: Finalizing cursor android.database.sqlite.SQLiteCursor@4380fe20 on null that has not been deactivated or closed I/dalvikvm( 878): at android.database.sqlite.SQLiteCursor.finalize(SQLiteCursor.java:596) I/dalvikvm( 878): at dalvik.system.NativeStart.run(Native Method) I/dalvikvm( 878): Uncaught exception thrown by finalizer (will be discarded): I/dalvikvm( 878): Ljava/lang/IllegalStateException;: Finalizing cursor android.database.sqlite.SQLiteCursor@437fd090 on null that has not been deactivated or closed I/dalvikvm( 878): at android.database.sqlite.SQLiteCursor.finalize(SQLiteCursor.java:596) I/dalvikvm( 878): at dalvik.system.NativeStart.run(Native Method) I/dalvikvm( 878): Uncaught exception thrown by finalizer (will be discarded): I/dalvikvm( 878): Ljava/lang/IllegalStateException;: Finalizing cursor android.database.sqlite.SQLiteCursor@437e9370 on null that has not been deactivated or closed I/dalvikvm( 878): at android.database.sqlite.SQLiteCursor.finalize(SQLiteCursor.java:596) I/dalvikvm( 878): at dalvik.system.NativeStart.run(Native Method) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Google Development phones
Exactly - buyer beware ... I will certainly weight the options. Last night NightLine had a story on about Google buying Motorola and one of the executives at the Android labs was advertizing the Nexus S ... I am going to stick with a cheap working one for now ;) On Aug 16, 11:43 pm, Kristopher Micinski krismicin...@gmail.com wrote: On Tue, Aug 16, 2011 at 11:25 PM, kypriakos demet...@ece.neu.edu wrote: Good pt Chris - for now the Use Cases we are after only require good camera resolution and wi-fi connectivity (which is mostly standard on all of these phones). I am assuming is easy to root most of these phones? Swappa.com seems to have some good deals so I will follow up with that one as well as with TigerDirect. I looked at it: never pay $200 for a used nexus one ;-). But yeah, all valid points, same as buying anything cheap: you get what you pay for. Kris -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Google Development phones
Thanks to all for the responses - I need the phone immediately and I don't necessarily need the best and greatest. Actually if I could get something close to what I had before (HTC Dream G1 dev phone 1 or 2) that would suffice. Even if I am running on 1.6 I am ok with it. Now I am assuming running apps written for 1.6 should have no problems running on later phones right? Going from newer APIs to older would be a problem but from older to newer I am assuming the apps are supported. I will try ebay and the like and I will also check out the Market. From what the Android site says, that's the place to get such phones but I don't hear many people saying they bought such phones off the Market. On Aug 16, 3:21 am, Mark Ayers markthe...@gmail.com wrote: I would get the one that will be up to date the fastest and the longest, ie the Prime. If you need to test for slower devices, you can always underclock, but you can't go the other way nearly as easily. On Aug 16, 2011 12:10 AM, Zsolt Vasvari zvasv...@gmail.com wrote: I wouldn't get the best or fastest device as a development phone as 99% of your users won't have such a device and you may not get the true feel for the performance of your app. On Aug 16, 10:58 am, Mark Ayers markthe...@gmail.com wrote: Wait til September, then get either a Nexus Prime or a quad core tablet. Those will be far better development devices than the Nexus S. If you can't wait till then, get an ASUS Transformer, as it will open up a whole bunch more new APIs than the Nexus S will sooner, but it might take a touch longer to get an Ice Cream Sandwich update. On Aug 15, 2011 7:28 PM, kypriakos demet...@ece.neu.edu wrote: Hi all, one of the Android pages points to the Market for buying development phones (as long as I pay the $25 fee). Has anyone bought such phones from there? I have two HTC Dream G1 Dev phones (old - running 1.6 on them) and it would be good if I can find a couple of more of the same or (of course) newer models. 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-Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Google Development phones
And no I don't necessarily need the phone as a phone but it would be nice to test the app's response over the Operator's network. For these phones I had I used the On-the-go SIM cards from T-Mobile and they worked fine. On Aug 16, 3:21 am, Mark Ayers markthe...@gmail.com wrote: I would get the one that will be up to date the fastest and the longest, ie the Prime. If you need to test for slower devices, you can always underclock, but you can't go the other way nearly as easily. On Aug 16, 2011 12:10 AM, Zsolt Vasvari zvasv...@gmail.com wrote: I wouldn't get the best or fastest device as a development phone as 99% of your users won't have such a device and you may not get the true feel for the performance of your app. On Aug 16, 10:58 am, Mark Ayers markthe...@gmail.com wrote: Wait til September, then get either a Nexus Prime or a quad core tablet. Those will be far better development devices than the Nexus S. If you can't wait till then, get an ASUS Transformer, as it will open up a whole bunch more new APIs than the Nexus S will sooner, but it might take a touch longer to get an Ice Cream Sandwich update. On Aug 15, 2011 7:28 PM, kypriakos demet...@ece.neu.edu wrote: Hi all, one of the Android pages points to the Market for buying development phones (as long as I pay the $25 fee). Has anyone bought such phones from there? I have two HTC Dream G1 Dev phones (old - running 1.6 on them) and it would be good if I can find a couple of more of the same or (of course) newer models. 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-Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Google Development phones
Good pt Chris - for now the Use Cases we are after only require good camera resolution and wi-fi connectivity (which is mostly standard on all of these phones). I am assuming is easy to root most of these phones? Swappa.com seems to have some good deals so I will follow up with that one as well as with TigerDirect. On Aug 16, 4:20 pm, Christopher Van Kirk christopher.vank...@gmail.com wrote: Be careful here. If you're looking for a phone with 'advanced' graphics hardware, one of those el-cheapo things won't do the trick for you. It's probably a good idea to narrow your field down to some set of models that you are interested in based on what you're planning to develop. E.g. a G2 lacks the hardware to support OpenGL ES2. On 8/17/2011 1:32 AM, Kristopher Micinski wrote: If you're looking for something really cheap(?), I believe sites such as TigerDirect have them for as cheap as $99. (I think I saw that ad earlier this week?.) Even though at this point they're quite old, they are pretty useful once you load them with a cyanogenmod. (up to 2.2, I doubt 2.3 runs on that. But... ?) Kris On Tue, Aug 16, 2011 at 12:40 PM, Nico Balestra nicobales...@gmail.com mailto:nicobales...@gmail.com wrote: Just to double check.. does swappa dispatch to UK or is US only? Cheers, Nico 2011/8/16 Jake Wharton jakewhar...@gmail.com mailto:jakewhar...@gmail.com You should also look at swappa.com http://swappa.com for inexpensive, used phones. Any of them should suffice for development. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com mailto:android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com mailto:android-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com mailto:android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com mailto:android-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Google Development phones
Hi all, one of the Android pages points to the Market for buying development phones (as long as I pay the $25 fee). Has anyone bought such phones from there? I have two HTC Dream G1 Dev phones (old - running 1.6 on them) and it would be good if I can find a couple of more of the same or (of course) newer models. 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] Image orientation
Hi all, I am using an older version of Android (1.6) for some old phones we are testing with. i was able to set the preview orientation as portrait but the images still appear as landscape when I save them on sdcard and extract them to a laptop for viewing. If I reverse the params for the setPictureSize to (320,480) I get the pics orientation to be portrait but the contents are still horizontal. Any ideas? Thanks public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) { Camera.Parameters parameters = mCamera.getParameters(); parameters.set(orientation, portrait); parameters.setPreviewSize(480,320); parameters.setPictureSize(480,320); mCamera.setParameters(parameters); mCamera.startPreview(); } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Intents
You have legitimate points Dianne .. thanks for the detailed feedback. I am running a web server on the phone (iJetty) and the servlet that handles incoming requests starts an activity that puts the phone into a camera preview. This works fine. I wanted subsequent service calls to reach the same activity and stop the preview. Not sure if this is questionable or not to most but this is what I am after. Let's take what I am after out of the equation. Is it possible to communicate with Activity B from Activity A using subsequent statements of Intent intent = new Intent() and set the Extras bundle? I do see the subsequent intent calls reach Activity B through the onNewIntent but the Extras are null. Someone pointed out that using FLAG_ACTIVITY_NEW_TASK is not the way to go - but if that's omitted and I only use FLAG_ACTIVITY_SINGLE_TOP then I get the exception: Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag Thanks What do you mean by servlet? Do you mean a Service? This design seems questionable to me. Trying to communicate with an existing activity like this is fraught with peril -- what if the user pressed home, you are popping yourself on top of whatever they are now doing; what if they pressed back, you are launching a new instance; what if they went down deeper in your activity stack, you are now doing ghod knows what to the stack by pushing at it from the service. Generally if an activity wants to find out about state changes from a service, it binds to the service and receives callbacks from it in any of a number of ways -- through messengers, aidl, PendingIntent to deliver a result, etc. Or if this is all one app running all one process, just have a singleton that keeps track of the service and your activity can get it to see if it is running and add a java interface callback for state changes. -- 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: Intents
Ok the answer to what I asked last is yes, I was able to get the Activities to communicate via the Extras. The Preview starts, snaps pictures and then the subsequent call stops the preview. Now regarding to what Dianne pointed out, I will look into her suggestions and see where we need to inject such logic to avoid user issues going up and down an undeterministic stack. Thanks to all for the invaluable feedback - I appreciate it! On Aug 10, 2:32 am, Dianne Hackborn hack...@android.com wrote: On Tue, Aug 9, 2011 at 7:56 AM, kypriakos demet...@ece.neu.edu wrote: I am running a servlet on the phone that starts an Intent on an Activity class. The class starts the camera preview and takes a picture. Then I have a subsequent Intent start on the same Activity class to stop the preview. The second Intent will fall into the OnNewIntent. It also carries a set of extra parameters that I want to read and use iwthin the OnNewIntent. How do I access those Extra params? I have used Extra bundles before and I know how they work. So what do you mean I need to remember the Intent? What do you mean by servlet? Do you mean a Service? This design seems questionable to me. Trying to communicate with an existing activity like this is fraught with peril -- what if the user pressed home, you are popping yourself on top of whatever they are now doing; what if they pressed back, you are launching a new instance; what if they went down deeper in your activity stack, you are now doing ghod knows what to the stack by pushing at it from the service. Generally if an activity wants to find out about state changes from a service, it binds to the service and receives callbacks from it in any of a number of ways -- through messengers, aidl, PendingIntent to deliver a result, etc. Or if this is all one app running all one process, just have a singleton that keeps track of the service and your activity can get it to see if it is running and add a java interface callback for state changes. -- 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: Intents
I am not sure what you mean Dianne - and that's probably because I am still not sure the way I think of this is the right way. I am running a servlet on the phone that starts an Intent on an Activity class. The class starts the camera preview and takes a picture. Then I have a subsequent Intent start on the same Activity class to stop the preview. The second Intent will fall into the OnNewIntent. It also carries a set of extra parameters that I want to read and use iwthin the OnNewIntent. How do I access those Extra params? I have used Extra bundles before and I know how they work. So what do you mean I need to remember the Intent? Thanks for the response On Aug 9, 2:17 am, Dianne Hackborn hack...@android.com wrote: No. That is telling you about the new Intent. If you want to remember it, you will need to remember it yourself. On Mon, Aug 8, 2011 at 8:43 PM, kypriakos demet...@ece.neu.edu wrote: Exactly! I am getting nulls when accessing the extras that I set from the launching intent: @Override protected void onNewIntent(Intent intent){ // super.onNewIntent(intent); setIntent(intent); Log.v(NotifServImpl,# = +intent.getExtras().getString(from)); Bundle extras = intent.getExtras(); ... I was under the impression that setting the intent in this method would guarantee that i am working with the newest intent. Is this the right approach? On Aug 8, 2:56 pm, Mark Murphy mmur...@commonsware.com wrote: On Mon, Aug 8, 2011 at 2:27 PM, kypriakos demet...@ece.neu.edu wrote: Never mind - most likely missing the Override allows for anything ;) Bingo. @Override has no effect at runtime, but it's a compile-time sanity check. Rather useful, particularly for classes with lots of generics (e.g., AsyncTask). -- Mark Murphy (a Commons Guy)http://commonsware.com| http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android 3.1 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 -- 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: Intents
Blech. he he ;) Use the Intent supplied to onNewIntent(). The Intent returned by getIntent() will always be the original Intent used to create the activity. But I am - and that's where the null exception occurs. Not sure if the setIntent or the super are needed. I will poke around a bit more to see what is going on. But if the Intent supplied by the onNewIntent() is what I need then that puts me on the right path. Thanks again guys -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Intents
Gotcha - but do you agree that the following should work and return the Extras bundle? @Override protected void onNewIntent(Intent intent){ Bundle extras = intent.getExtras(); ... Like Mark said, the intent var that is passed to the onNewIntent each time I start a new intent on a particular activity should hold a ref to that new intent and I should be able to access the data from it. No? On Aug 9, 1:26 pm, Jim secondphonea...@gmail.com wrote: Since setIntent() stores a reference to the intent sent to onNewIntent(), you need to either capture the data there or copy the Intent to a local variable and reference it. Once onNewIntent() finishes, the Intent goes away and your reference is null. Try that... -Jim On Aug 9, 10:46 am, kypriakos demet...@ece.neu.edu wrote: Blech. he he ;) Use the Intent supplied to onNewIntent(). The Intent returned by getIntent() will always be the original Intent used to create the activity. But I am - and that's where the null exception occurs. Not sure if the setIntent or the super are needed. I will poke around a bit more to see what is going on. But if the Intent supplied by the onNewIntent() is what I need then that puts me on the right path. Thanks again guys -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Intents
And I start the intents each time with this: Intent intent = new Intent(); intent.setClass(androidContext, myClass.class); intent.setFlags(intent.FLAG_ACTIVITY_NEW_TASK); intent.addFlags(intent.FLAG_ACTIVITY_SINGLE_TOP); intent.putExtra(from, stop); androidContext.startActivity(intent); On Aug 9, 1:26 pm, Jim secondphonea...@gmail.com wrote: Since setIntent() stores a reference to the intent sent to onNewIntent(), you need to either capture the data there or copy the Intent to a local variable and reference it. Once onNewIntent() finishes, the Intent goes away and your reference is null. Try that... -Jim On Aug 9, 10:46 am, kypriakos demet...@ece.neu.edu wrote: Blech. he he ;) Use the Intent supplied to onNewIntent(). The Intent returned by getIntent() will always be the original Intent used to create the activity. But I am - and that's where the null exception occurs. Not sure if the setIntent or the super are needed. I will poke around a bit more to see what is going on. But if the Intent supplied by the onNewIntent() is what I need then that puts me on the right path. Thanks again guys -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Intents
@Jim Yes it does get called. I added the NEW_TASK and the SINGLE_TOP flags to be able to start the intent and then to start subsequent ones. But as you note here if I don't remove the NEW_TASK flag each tiem I revisit the launching code I will keep generating a new intent - right? Regarding your previous post, yes the Extras bundle include strings and keys and in fact that's the code I use in the OnCreate to pass other params to the intent and it works so I am sure that's not the case. if you right above then this explains what's going on. @Kostya A very legitimate pt ;) I should have included this in the original posting. The exception occurs once I reference the intent handler. If Jim is right from above I am assuming I will need to call use the NEW_TASK flag only once to launch the original intent? I/System.out( 341): # 1 = onNewIntent has been called ... E/AndroidRuntime( 341): java.lang.NullPointerException E/AndroidRuntime( 341):at org.mortbay.ijetty.snapPic2.mysnapPic2ServiceImpl.onNewIntent(mysnapPic2ServiceImpl.java: 164) E/AndroidRuntime( 341):at android.app.Instrumentation.callActivityOnNewIntent(Instrumentation.java: 1195) E/AndroidRuntime( 341):at android.app.ActivityThread.deliverNewIntents(ActivityThread.java:2471) E/AndroidRuntime( 341):at android.app.ActivityThread.performNewIntents(ActivityThread.java:2483) E/AndroidRuntime( 341):at android.app.ActivityThread.handleNewIntent(ActivityThread.java:2491) E/AndroidRuntime( 341):at android.app.ActivityThread.access $2900(ActivityThread.java:116) E/AndroidRuntime( 341):at android.app.ActivityThread $H.handleMessage(ActivityThread.java:1840) E/AndroidRuntime( 341):at android.os.Handler.dispatchMessage(Handler.java:99) E/AndroidRuntime( 341):at android.os.Looper.loop(Looper.java: 123) E/AndroidRuntime( 341):at android.app.ActivityThread.main(ActivityThread.java:4203) E/AndroidRuntime( 341):at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime( 341):at java.lang.reflect.Method.invoke(Method.java:521) E/AndroidRuntime( 341):at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:791) E/AndroidRuntime( 341):at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549) E/AndroidRuntime( 341):at dalvik.system.NativeStart.main(Native Method) On Aug 9, 3:46 pm, Jim secondphonea...@gmail.com wrote: Didn't see your previous post... FLAG_ACTIVITY_SINGLE_TOP causes a call to onNewIntent, but FLAG_ACTIVITY_NEW_TASK starts a new task and new activity. Is onNewIntent even being called? It shouldn't be since FLAG_ACTIVITY_NEW_TASK means the activity can't be recycled, it must be created in the current new task. You probably want FLAG_ACTIVITY_CLEAR_TOP and FLAG_ACTIVITY_SINGLE_TOP... -Jim On Aug 9, 1:59 pm, Jim secondphonea...@gmail.com wrote: That's true. Do you do anything in onResume() to alter the data? And, this might sound silly, but are you sure a String was stored where getString is called? (For example, if you putExtra a bundle, then getExtra returns a Bundle, not a string...) Hope that helps. -Jim On Aug 9, 1:16 pm, kypriakos demet...@ece.neu.edu wrote: Gotcha - but do you agree that the following should work and return the Extras bundle? @Override protected void onNewIntent(Intent intent){ Bundle extras = intent.getExtras(); ... Like Mark said, the intent var that is passed to the onNewIntent each time I start a new intent on a particular activity should hold a ref to that new intent and I should be able to access the data from it. No? On Aug 9, 1:26 pm, Jim secondphonea...@gmail.com wrote: Since setIntent() stores a reference to the intent sent to onNewIntent(), you need to either capture the data there or copy the Intent to a local variable and reference it. Once onNewIntent() finishes, the Intent goes away and your reference is null. Try that... -Jim On Aug 9, 10:46 am, kypriakos demet...@ece.neu.edu wrote: Blech. he he ;) Use the Intent supplied to onNewIntent(). The Intent returned by getIntent() will always be the original Intent used to create the activity. But I am - and that's where the null exception occurs. Not sure if the setIntent or the super are needed. I will poke around a bit more to see what is going on. But if the Intent supplied by the onNewIntent() is what I need then that puts me on the right path. Thanks again guys -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http
[android-developers] Re: Intents
Hi Mark, right on! An oversight on my part. Thanks On Aug 7, 6:38 am, Mark Murphy mmur...@commonsware.com wrote: On Sun, Aug 7, 2011 at 4:25 AM, kypriakos demet...@ece.neu.edu wrote: I start an new intent on an activity: Intent intent = new Intent(); intent.seClass (..); intent.setFlags(...NEW_TASK); intent.addFlags(...SINGLE_TOP); startActivity(intent). In the target Activity I have the onNewIntent() that simply has code for doing some processing. I see the OnCreate get created but any subsequent executions of the above block does not call the OnNewIntent. Does the launcheMode=singleTask need to be defined in the manifest for this to work? No. Make sure you have the @Override annotation on onNewIntent() so you are implementing the right method signature. Is there anything else that is necessary to get this to work? Not that I am aware of. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 2.0 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Intents
One additional question - I see that both OnNewIntent and onNewIntent compile fine. Is there a difference between the two? On Aug 7, 6:38 am, Mark Murphy mmur...@commonsware.com wrote: On Sun, Aug 7, 2011 at 4:25 AM, kypriakos demet...@ece.neu.edu wrote: I start an new intent on an activity: Intent intent = new Intent(); intent.seClass (..); intent.setFlags(...NEW_TASK); intent.addFlags(...SINGLE_TOP); startActivity(intent). In the target Activity I have the onNewIntent() that simply has code for doing some processing. I see the OnCreate get created but any subsequent executions of the above block does not call the OnNewIntent. Does the launcheMode=singleTask need to be defined in the manifest for this to work? No. Make sure you have the @Override annotation on onNewIntent() so you are implementing the right method signature. Is there anything else that is necessary to get this to work? Not that I am aware of. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 2.0 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Intents
Never mind - most likely missing the Override allows for anything ;) On Aug 7, 6:38 am, Mark Murphy mmur...@commonsware.com wrote: On Sun, Aug 7, 2011 at 4:25 AM, kypriakos demet...@ece.neu.edu wrote: I start an new intent on an activity: Intent intent = new Intent(); intent.seClass (..); intent.setFlags(...NEW_TASK); intent.addFlags(...SINGLE_TOP); startActivity(intent). In the target Activity I have the onNewIntent() that simply has code for doing some processing. I see the OnCreate get created but any subsequent executions of the above block does not call the OnNewIntent. Does the launcheMode=singleTask need to be defined in the manifest for this to work? No. Make sure you have the @Override annotation on onNewIntent() so you are implementing the right method signature. Is there anything else that is necessary to get this to work? Not that I am aware of. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 2.0 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Intents
Exactly! I am getting nulls when accessing the extras that I set from the launching intent: @Override protected void onNewIntent(Intent intent){ // super.onNewIntent(intent); setIntent(intent); Log.v(NotifServImpl,# = +intent.getExtras().getString(from)); Bundle extras = intent.getExtras(); ... I was under the impression that setting the intent in this method would guarantee that i am working with the newest intent. Is this the right approach? On Aug 8, 2:56 pm, Mark Murphy mmur...@commonsware.com wrote: On Mon, Aug 8, 2011 at 2:27 PM, kypriakos demet...@ece.neu.edu wrote: Never mind - most likely missing the Override allows for anything ;) Bingo. @Override has no effect at runtime, but it's a compile-time sanity check. Rather useful, particularly for classes with lots of generics (e.g., AsyncTask). -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android 3.1 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: Comms with Intent
And in fact the onNewIntent (which still compiles if it is OnNewIntent!) is never called .. so something is not being set right. On Aug 7, 1:39 am, kypriakos demet...@ece.neu.edu wrote: Actually never mind that - I should have been using addFlags the second time and not setFlags on both flags. Still the issue seems to be that the preview freezes after the first pic is snapped and every additional call to the service takes pictures the same size as before regardless of where the phone points. Interesting ... And I don't see the OnNewIntent get called each subsequent time ... On Aug 7, 12:33 am, kypriakos demet...@ece.neu.edu wrote: Well - the issue I am running into now is this: Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want? I start the activity with the NEW_TASK flag and it works fine. If I use the SINGLE_TOP then the exception above occurs. Is there a way to combine intent flags in Android? intent.setClass(androidContext, org.mortbay.ijetty.snapPic2.mysnapPic2ServiceImpl.class); // intent.setFlags(intent.FLAG_ACTIVITY_NEW_TASK); intent.setFlags(intent.FLAG_ACTIVITY_SINGLE_TOP); On Aug 2, 10:35 am, Nikolay Elenkov nikolay.elen...@gmail.com wrote: On Tue, Aug 2, 2011 at 11:29 PM, kypriakos demet...@ece.neu.edu wrote: Actually one more question - since I want the Activity to keep alive with the camera preview on, would the subsequent Intent launching (and calls to OnNewIntent) allow me to control the open preview. I think yes since the Activity (unless I call finish()) should still be active right? As long as you don't start another activity, your preview activity should stay in the foreground. How well that will work with controlling the actual preview, I don't know. Try it out. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Intents
Hi all, I start an new intent on an activity: Intent intent = new Intent(); intent.seClass (..); intent.setFlags(...NEW_TASK); intent.addFlags(...SINGLE_TOP); startActivity(intent). In the target Activity I have the onNewIntent() that simply has code for doing some processing. I see the OnCreate get created but any subsequent executions of the above block does not call the OnNewIntent. Does the launcheMode=singleTask need to be defined in the manifest for this to work? Is there anything else that is necessary to get this to 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] Re: Comms with Intent
Well - the issue I am running into now is this: Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want? I start the activity with the NEW_TASK flag and it works fine. If I use the SINGLE_TOP then the exception above occurs. Is there a way to combine intent flags in Android? intent.setClass(androidContext, org.mortbay.ijetty.snapPic2.mysnapPic2ServiceImpl.class); // intent.setFlags(intent.FLAG_ACTIVITY_NEW_TASK); intent.setFlags(intent.FLAG_ACTIVITY_SINGLE_TOP); On Aug 2, 10:35 am, Nikolay Elenkov nikolay.elen...@gmail.com wrote: On Tue, Aug 2, 2011 at 11:29 PM, kypriakos demet...@ece.neu.edu wrote: Actually one more question - since I want the Activity to keep alive with the camera preview on, would the subsequent Intent launching (and calls to OnNewIntent) allow me to control the open preview. I think yes since the Activity (unless I call finish()) should still be active right? As long as you don't start another activity, your preview activity should stay in the foreground. How well that will work with controlling the actual preview, I don't know. Try it out. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Comms with Intent
Actually never mind that - I should have been using addFlags the second time and not setFlags on both flags. Still the issue seems to be that the preview freezes after the first pic is snapped and every additional call to the service takes pictures the same size as before regardless of where the phone points. Interesting ... And I don't see the OnNewIntent get called each subsequent time ... On Aug 7, 12:33 am, kypriakos demet...@ece.neu.edu wrote: Well - the issue I am running into now is this: Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want? I start the activity with the NEW_TASK flag and it works fine. If I use the SINGLE_TOP then the exception above occurs. Is there a way to combine intent flags in Android? intent.setClass(androidContext, org.mortbay.ijetty.snapPic2.mysnapPic2ServiceImpl.class); // intent.setFlags(intent.FLAG_ACTIVITY_NEW_TASK); intent.setFlags(intent.FLAG_ACTIVITY_SINGLE_TOP); On Aug 2, 10:35 am, Nikolay Elenkov nikolay.elen...@gmail.com wrote: On Tue, Aug 2, 2011 at 11:29 PM, kypriakos demet...@ece.neu.edu wrote: Actually one more question - since I want the Activity to keep alive with the camera preview on, would the subsequent Intent launching (and calls to OnNewIntent) allow me to control the open preview. I think yes since the Activity (unless I call finish()) should still be active right? As long as you don't start another activity, your preview activity should stay in the foreground. How well that will work with controlling the actual preview, I don't know. Try it out. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Comms with Intent
Well that's what I was actually aiming at and I think we agree - OnNewIntent is afterall a method in the Activity called by the underlying framework on each launching - makes sense! Thanks NE On Aug 1, 9:56 pm, Nikolay Elenkov nikolay.elen...@gmail.com wrote: On Tue, Aug 2, 2011 at 4:18 AM, kypriakos demet...@ece.neu.edu wrote: You could launch the activity using the FLAG_ACTIVITY_SINGLE_TOP flag. Then when you call startActivity() again, a new instance won't be created, the intent will be delivered to onNewIntent(). So if I still have a handle to the intent when I relaunch it as you describe above, would I still be able to call methods on it. You can make a new intent every time, and change the data/extras as needed. Then in your Activity's onNewInent() you look at each received intent's contents and decide what to do. Calling methods on an Intent doesn't communicate with the Activitiy, you need to deliver the 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: Comms with Intent
Actually one more question - since I want the Activity to keep alive with the camera preview on, would the subsequent Intent launching (and calls to OnNewIntent) allow me to control the open preview. I think yes since the Activity (unless I call finish()) should still be active right? On Aug 1, 9:56 pm, Nikolay Elenkov nikolay.elen...@gmail.com wrote: On Tue, Aug 2, 2011 at 4:18 AM, kypriakos demet...@ece.neu.edu wrote: You could launch the activity using the FLAG_ACTIVITY_SINGLE_TOP flag. Then when you call startActivity() again, a new instance won't be created, the intent will be delivered to onNewIntent(). So if I still have a handle to the intent when I relaunch it as you describe above, would I still be able to call methods on it. You can make a new intent every time, and change the data/extras as needed. Then in your Activity's onNewInent() you look at each received intent's contents and decide what to do. Calling methods on an Intent doesn't communicate with the Activitiy, you need to deliver the 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: Comms with Intent
Sure will man thanks. But that was the idea so you were right on! On Aug 2, 10:35 am, Nikolay Elenkov nikolay.elen...@gmail.com wrote: On Tue, Aug 2, 2011 at 11:29 PM, kypriakos demet...@ece.neu.edu wrote: Actually one more question - since I want the Activity to keep alive with the camera preview on, would the subsequent Intent launching (and calls to OnNewIntent) allow me to control the open preview. I think yes since the Activity (unless I call finish()) should still be active right? As long as you don't start another activity, your preview activity should stay in the foreground. How well that will work with controlling the actual preview, I don't know. Try it out. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Comms with Intent
Thanks for the response Nikolay --- Assuming the servlet runs in a separate thread, no. Not directly at least. That's what I was afraid of ... You could launch the activity using the FLAG_ACTIVITY_SINGLE_TOP flag. Then when you call startActivity() again, a new instance won't be created, the intent will be delivered to onNewIntent(). Worth trying. Alternatively, you could use a Handler to send messages to the GUI thread. The hard part may be how to get a GUI-thread Handler to your servlet container though. Assuming the whole app server is started from the GUI thread, you have to create a Handler (on the GUI thread) and find a way to stuff it in a globally accessible place (Application static field, etc.) Yes I agree, not sure how I can get the Handler but I will look into it. Not a bad idea at all! Thakns -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Comms with Intent
You could launch the activity using the FLAG_ACTIVITY_SINGLE_TOP flag. Then when you call startActivity() again, a new instance won't be created, the intent will be delivered to onNewIntent(). So if I still have a handle to the intent when I relaunch it as you describe above, would I still be able to call methods on it. The idea is for me to be able to start the preview, let it run on the server, keep snapping pics whenever a request comes in and then stop it. I can do a single shot for now only .. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Comms with Intent
Hi all, I launch an Intent from a servlet once a request for it comes in. The Intent launches a SnapPic activity that puts the phone into a preview mode and then snaps a pic and send it back to the requester. This works fine - I am now truing to keep the phone in the preview mode (I don't call the finish()) on the activity and for any subsequent requests I am trying to snap more pictures. Can calls to methods of the launched Activity be made from the servlet? In other words, how can one app communicate with an activity that it launches? I think this is a matter of communicating threads so I am wondering if there's an alternative way to approach 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] Android Google Maps API
Hi all, I am accessing the Google Maps API from the device. The app is managed using maven and during development I added the necessary dependencies to include the Maps library: dependency groupIdcom.google.android.maps/groupId artifactIdmaps/artifactId version4_r2/version scopeprovided/scope /dependency The app compiles fine and by using the 'provided' scope as suggested by the maven pages on Android, the app should use the phone's maps.jar at runtime. But it doesn't. I get the following - the MapActivity class cannot be resolved and I get the cross-loader issue. Looking at the apk's dex classes I do see that the maps.jar classes are included in the apk. Has anyone seen this before? Could this be a maven issue? W/dalvikvm( 1764): Class resolved by unexpected DEX: LgoogleMapView; (0x437441e8):0x1af988 ref [Lcom/google/android/maps/MapActivity;] Lcom/ google/android/maps/MapActivity;(0x437441e8):0x1a4068 W/dalvikvm( 1764): Unable to resolve superclass of LgoogleMapView; (86) W/dalvikvm( 1764): Link of class 'LgoogleMapView;' failed D/AndroidRuntime( 1764): Shutting down VM W/dalvikvm( 1764): threadid=3: thread exiting with uncaught exception (group=0x4001da28) E/AndroidRuntime( 1764): Uncaught handler: thread main exiting due to uncaught exception E/AndroidRuntime( 1764): java.lang.NoClassDefFoundError: googleMapView E/AndroidRuntime( 1764):at E/AndroidRuntime( 1764): Caused by: java.lang.IllegalAccessError: cross-loader access from pre-verified class E/AndroidRuntime( 1764):at dalvik.system.DexFile.defineClass(Native Method) E/AndroidRuntime( 1764):at dalvik.system.DexFile.loadClass(DexFile.java:193) E/AndroidRuntime( 1764):at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:203) E/AndroidRuntime( 1764):at java.lang.ClassLoader.loadClass(ClassLoader.java:573) E/AndroidRuntime( 1764):at java.lang.ClassLoader.loadClass(ClassLoader.java:532) E/AndroidRuntime( 1764):... 10 more I/Process ( 86): Sending signal. PID: 1764 SIG: 3 I/dalvikvm( 1764): threadid=7: reacting to signal 3 I/dalvikvm( 1764): Wrote stack trace to '/data/anr/traces.txt' 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] Emulator connectivity
Hi all, I have been working with real devices for a while and returning back to emulators now. I am able to port forward the iJetty web server (which is running on 10.0.2.15:8080) and I can now access it from the browser running on the local machine using localhost:8080. But to be able to see this server now remotely I will most likely need a port forwarding pipe - is that true? To be able to bridge the localhost to the actual machine's IP address? (I remember a tool called tcppipe once). Is this the best approach in such a case to expose the emulator to remote machines? Thanks in advance -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Android and Google Maps
Hi, I tried the link below - in fact it is fairly similar to the Professional Android book example ;) The app starts fine and it does display a map grid but no map. I am using the google map api key assigned to my account for Android access to the maps. Any idea as to why this map shows up blank? Thanks again On Jul 16, 10:50 am, kypriakos demet...@ece.neu.edu wrote: Good link - thanks. Have you tried building such Android projects using maven? On Jul 16, 2:19 am, nageswara rao rajana nagu.raj...@gmail.com wrote: try this link http://marakana.com/forums/android/examples/311.html -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Start Intent
HI all, from an activity class A I start another activity process (class B belongin to the same package) using the following: Intent intent = new Intent(); intent.setClass(myContext, org.myClass.ServiceImpl.class); intent.setFlags(intent.FLAG_ACTIVITY_NEW_TASK); myContext.startActivity(intent); What is the context of class B? What is the setClass method setting? If I want to start yet another activity from inside another class (class C) does the context get passed across these classes? Shouldn't the 'this' grab the app's context? 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] Android and Google Maps
HI all, I am adding the Google Maps library through the AndroidManifest.xml in my app using: uses-library android:name=com.google.android.maps”/ But it does not seem to pick it up ... Is there anything else that needs to be done other than this? Is there a particular path that needs to be added (I am using Eclipse for the development) to the project's classpath which already includes all the Android framework's classes? 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: Android and Google Maps
Good link - thanks. Have you tried building such Android projects using maven? On Jul 16, 2:19 am, nageswara rao rajana nagu.raj...@gmail.com wrote: try this link http://marakana.com/forums/android/examples/311.html -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Dialog boxes
Hi all, are asynchronous alert boxes the only dialog model that Android allows? For example, if I want to notify the user of an operation that a background process is about to perform and ask his/hers permission while blocking that process, would that be possible? Thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Android and OSGi/Apache Felix
I think Knopflerfish is close to releasing a version of their OSGi spec implentation for Android ... Regarding the rest, security, android lifecycle and the rest of worries I am reading here I didn't get enough time to look into it but I do see many benefits of OSGi on mobile platforms - ex. Titan that Sprint used. No idea how it did but their intent was pretty novel. And I think you got some good feedback in this thread as I can see - cool! On Jul 8, 5:04 am, Daniel Drozdzewski daniel.drozdzew...@gmail.com wrote: On 7 July 2011 23:07, Jesse gotosl...@gmail.com wrote: I have looked at that, but the EZDroid community hasn't been updated since 2009 and there is practically no content on their site. This makes me think it is completely abandoned. They do link to some code which was presented at a conference a few years back: https://opensource.luminis.net/wiki/display/SITE/Apache+Felix+on+Andr... The code is extremely basic though and it doesn't address any of my concerns. In their example projects, they create all views through code. They don't reference any Android resources, such as layout files. There is no discussion on what happens to the view created by the bundle if the bundle needs to be updated or removed. Also, there is the fact that it is impossible to add an activity or service to an application without modifying the Android manifest. Jesse, That presentation that you linked shows few things that might be of help: - Android does not allow apps to dynamically load classes, but there are workarounds (app has root or all access allowed to /data/dalvik-cache - Apache Felix is portable (no crazy dependencies), so you can keep porting newer versions as you need to Android What I understand is that you can achieve OSGI on a servce/business logic layer Resources (layouts, strings, graphics, ...) in Android are pre-packaged and pre-compiled into binary bundle and then statically referenced through R class, so here things get complicated. I don't think that by dropping a new class or a set of classes (bundle), which is what OSGI enables, you could swap binary resources files into an application and R class with it. In other words OSGI allows dynamic deployment of classes and services, rather than dynamic deployment of arbitrary files. This means that you would have to expose your layouts through the service. In other words have your layouts defined in code, rather than XML files and your activities would have to use the coded layouts served by the OSGI service running as a part of your app. Your layouts would have to come with their resources and you would be loading those resources using your custom code rather than Android APIs. You could have service exposed and managed through OSGI to retrieve activities, which the Apache Felix presentation shows. That would essentially be, what you need. Only thing that I am not sure about is the security and implications of such setup... Apps need digital signing, activities and services need upfront declaring through the manifest file. The presentations asks Google for dynamic class loading and dynamic security policies, which suggests that they have had some troubles. It is not clear whether they have managed to work around these. If you are in charge of the device, there might be a way around such limitation, say by installing your certificate as trusted one, so that provisioned code signed with your key would be trusted. Again this is a question to a platform engineer. Luminis website [*] certainly has some demo code next to that presentation, so give it a go and see what can and cannot be achieved. Good Luck and if possible, please share your findings. Daniel [*]https://opensource.luminis.net/wiki/display/SITE/Apache+Felix+on+Andr... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Intent / PendingIntent
Right - and this is not a blocking operation but rather an asynchronous callback to the onActivityResult right? For some reason the callback was not occurring but I think I found an issue in the spawned thread. Thanks Kostya, I got it ... On Jun 30, 1:53 pm, Kostya Vasilyev kmans...@gmail.com wrote: Um, startActivityForResult? -- Kostya Vasilyev 30.06.2011 21:47 пользователь kypriakos demet...@ece.neu.edu написал: Hi all, I have a process that creates and starts an Intent with the startActivity. I want the process to wait for continuous results returned from the activity while the activity is executing and a final result once it is finished. Would the PendingActivity API help me with this or is there anything else in the API I can use? 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] Intent / PendingIntent
Hi all, I have a process that creates and starts an Intent with the startActivity. I want the process to wait for continuous results returned from the activity while the activity is executing and a final result once it is finished. Would the PendingActivity API help me with this or is there anything else in the API I can use? 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] Stream live camera preview
Hi all, I have been trying to stream the camera preview across phones. I am using the setPreviewCallback to get notified for each frame and then tried to stream it across to other peers. I am not sure this can be done over HTTP so I am looking into SIP. I found out the SIP only works in Android 2.3+ so I am wondering if there's any other method pre-2.3 that can be used in this case. If anyone has managed to do this I will appreciate any hints to follow. 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] Camera preview, video streaming across phones
Hi all, Not sure if i am asking something that could be impossible to accomplish (that's why I am asking it anyway ;) ) - Currently I can remotely put the Android phone into a Picture preview, instruct it to snap a Picture and then view the picture on the remote site (through a browser). Is it possible to stream the Picture preview to another phone or a remote device? On a related note, would it be possible to stream video across phones? I haven't found much by searching on this (may be I am using the wrong keywords) but it anyone has any info that something like this has been done it will certainly help me avoid reinventing the wheel. Thanks very much in advance -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Multiple databases
Actually the DB is only 15KB (very few entries). This is a bit strange - actually I did a Clean on 3 other projects and when I built them they all cannot generate the apk. So it seems that this is global issue in Eclipse now. I read that Locale was an issue, others said the jvm you start Eclipse with etc. Still none of them work in this case. The code compiles fine but packaging it does not work .. any ideas? Thanks On May 25, 11:31 pm, Nikolay Elenkov nikolay.elen...@gmail.com wrote: On Thu, May 26, 2011 at 6:54 AM, kypriakos demet...@ece.neu.edu wrote: An easy question - you can create and include multiple databases in the assets directory of an Android app? I had one database in there and it worked fine. I created a new one and Eclipse ADT won't create an apk file at the end of Clean/Build Project. Any error messages? Assets files are limited in size, around or 1MB IIRC. So if your DB file is bigger than that, you will get an error. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Eclipse stopped creating APKs
Hi all, this is a separate issue from the question I posted regarding multiple databases in the same Android app so I am posting it in a different thread. I was able to create, compile and deploy android projects from version 1.6 to now without many issues in Eclipse Galileo. All the sudden this has changed. Now a Clean/Build on a project generates the classes but the apk is never created. If I create a project from scratch and compile it the same occurs - all but an apk file. I checked Eclipses memory setting and they seem to be optimal, no other errors occur during the compilation. Some older postings mentioned that may be the Locale on the Win Xp machine was set wrong, that the debug.keystore needs to be removed and replace etc. No concrete explanation for this so I was wondering if there is a knowledge base around this issue here or any hints on what I can look for. Thanks very much in advance -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Multiple databases
An easy question - you can create and include multiple databases in the assets directory of an Android app? I had one database in there and it worked fine. I created a new one and Eclipse ADT won't create an apk file at the end of Clean/Build Project. 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: Save to SD
Well I am not doing anything fancy - I am using the following code segment to write the image to the card - are you doing something similar? String path = Environment.getExternalStorageDirectory().toString() + /p2pSOA; OutputStream outS = null; File file = new File(path, IMAGE.jpg); outS = new FileOutputStream(file); long sTime = System.currentTimeMillis(); Log.i(p2pSOA,write start at +sTime); for (int i=0; idata.length; i++) { outS.write(data[i]); if ( (i%10) == 0 ) Log.i(p2pSOA,wrote +i of bytes); } long eTime = System.currentTimeMillis()-sTime; Log.i(p2pSOA,write took +eTime/1000+ secs); outS.flush(); outS.close(); On May 23, 12:09 am, Zsolt Vasvari zvasv...@gmail.com wrote: In my app, copying a 4MB file to the SD card takes maybe 5 seconds. I am using the Commons IO library. So you are doing something wrong if it takes more than a couple of seconds for a 1MB file. On May 23, 11:27 am, kypriakos demet...@ece.neu.edu wrote: First, good to hear from you Mark - I hope all is well! Well I expected the two (instead of three) letter response - I ended up playing around with the code (which is nothing other than using the FileOutputStream to write out the jpeg. I found out that if I replace the println statements (I was checking what was being written out and didn't expect it to cause so much overhead) with Log.i the image can be written in around 95 seconds ( 1 MB). Still slow but not as bad as an hour. Of course still 95 seconds is a bit too much. Anything else I can try? May be an SD card profile / performance test would be help determine if something is going on there? Thanks again On May 21, 1:58 pm, Mark Murphy mmur...@commonsware.com wrote: On Sat, May 21, 2011 at 1:55 PM, kypriakos demet...@ece.neu.edu wrote: I am saving jpeg image on sdcard through an activity - about 1 MB takes literally close to an hour ... is that normal? No. -- 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-Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Save to SD
Thanks Kostya, Miquel and Mark, yes I agree, inefficient I/O algorithms would kills ya particularly on constrained devices. I posted the one byte at at time segment but I did try buffering data before writing it and using what Kostya pointed out below (outS.write(data, 0, data.length). I am also wondering if there are other processes running that I am not aware of so I will look into that and I think I will go ahead and mount the card to the pc and run some tests there. I will also swap it with another one. Good pointers all around - thanks. On May 23, 12:07 pm, Kostya Vasilyev kmans...@gmail.com wrote: You are writing one byte at a time. outS.write(data[i]); This is going to be incredibly slow Try this: outS.write(data, 0, data.length) or just this: outS.write(data); -- Kostya 23.05.2011 20:01, kypriakos пишет: Log.i(p2pSOA,write start at +sTime); for (int i=0; idata.length; i++) { outS.write(data[i]); if ( (i%10) == 0 ) Log.i(p2pSOA,wrote +i of bytes); } -- Kostya Vasilyev --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: Save to SD
I think since both methods of either buffering in memory and then writing all bytes at once OR writing a byte at a time are both slow it makes me believe is the hardware. I tried the tests that you guys suggested and the pushing files to it is slow as hell. I am assuming that means the good ol' card is dying - I will replace and verify but most likely that should be it. Thanks again guys On May 23, 7:13 am, Mark Murphy mmur...@commonsware.com wrote: Agree with all the above. Er, below. What Miguel said. :-) A lot of I/O problems stem from inefficient writing algorithms (e.g., byte-at-a-time). Another test you can try is using DDMS File Manager or adb push to write a file to the SD card. If that is similarly slow, then the problem may be with hardware. On Mon, May 23, 2011 at 4:09 AM, Miguel Morales therevolti...@gmail.com wrote: Yep that's ridiculously slow. What are you writing to the file? Are you streaming it from the internet? Have you tried posting the code one stackoverflow? Have you tried mounting the sdcard on your computer and moving a file there to check what the time should be? Try using a BufferedOutputStream to buffer some data to memory before it is written to disk. On Sun, May 22, 2011 at 9:09 PM, Zsolt Vasvari zvasv...@gmail.com wrote: In my app, copying a 4MB file to the SD card takes maybe 5 seconds. I am using the Commons IO library. So you are doing something wrong if it takes more than a couple of seconds for a 1MB file. On May 23, 11:27 am, kypriakos demet...@ece.neu.edu wrote: First, good to hear from you Mark - I hope all is well! Well I expected the two (instead of three) letter response - I ended up playing around with the code (which is nothing other than using the FileOutputStream to write out the jpeg. I found out that if I replace the println statements (I was checking what was being written out and didn't expect it to cause so much overhead) with Log.i the image can be written in around 95 seconds ( 1 MB). Still slow but not as bad as an hour. Of course still 95 seconds is a bit too much. Anything else I can try? May be an SD card profile / performance test would be help determine if something is going on there? Thanks again On May 21, 1:58 pm, Mark Murphy mmur...@commonsware.com wrote: On Sat, May 21, 2011 at 1:55 PM, kypriakos demet...@ece.neu.edu wrote: I am saving jpeg image on sdcard through an activity - about 1 MB takes literally close to an hour ... is that normal? No. -- 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-Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- ~ Jeremiah:9:23-24 Android 2D MMORPG: http://solrpg.com/, http://www.youtube.com/user/revoltingx -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 _The Busy Coder's Guide to Android Development_ Version 3.6 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Save to SD
First, good to hear from you Mark - I hope all is well! Well I expected the two (instead of three) letter response - I ended up playing around with the code (which is nothing other than using the FileOutputStream to write out the jpeg. I found out that if I replace the println statements (I was checking what was being written out and didn't expect it to cause so much overhead) with Log.i the image can be written in around 95 seconds ( 1 MB). Still slow but not as bad as an hour. Of course still 95 seconds is a bit too much. Anything else I can try? May be an SD card profile / performance test would be help determine if something is going on there? Thanks again On May 21, 1:58 pm, Mark Murphy mmur...@commonsware.com wrote: On Sat, May 21, 2011 at 1:55 PM, kypriakos demet...@ece.neu.edu wrote: I am saving jpeg image on sdcard through an activity - about 1 MB takes literally close to an hour ... is that normal? No. -- 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] Save to SD
I am saving jpeg image on sdcard through an activity - about 1 MB takes literally close to an hour ... is that normal? 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: startActivityForResult
Ah sleep is good ... Ok revisiting this I can see the wrong path I went down to ... I built a servlet for the ijetty web server that launches an Activity once a particular remote request comes in. The ijetty code provides the AndroidContext in all servlets through: Object o = config.getServletContext().getAttribute(org.mortbay.ijetty.contentResolver); android.content.ContentResolver resolver = (android.content.ContentResolver)o; androidContext = (android.content.Context)config.getServletContext().getAttribute(org.mortbay.ijetty.context); So while implementing the methods for the servlet I got carried away with the fact that I had the appropriate context available and used the Context's startActivity method and the Intent object to launch the Activity (after I declared it in the ijetty's AndroidManifest). I kept looking in there for the startActivityForResult I needed a bit more reading on the difference between the two startActivity methods across two different classes in the inheritance. The code snippet I sent out does work but I cannot of course use the startActivityForResult. Up to this pt I was having the launched activity save the results in a file and then had the servlet poll for them but that's not an ideal solution. The servlet itself implements HttpServlet so by not being an Activity I could not see how any callback to it would be possible - what do you think? @Kostya If this case, use a broadcast, a pending intent, or a handler message (just some of the options) to send/receive the result. I agree with that but I need to figure out how the servlet fits into this. I could launch the activity as a service. Oh, and I see that the intent you're trying to start is for a service. Using startActivity (for result or not) with a service intent just doesn't make sense. Where do you see that? The intent I am starting is an Activity class. Can you explain please? Thanks again for the feedback to all fo you - it certainly helps -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: startActivityForResult
He he - I hear ya, since I am in the context of a web server as well I need to be careful with my naming Thanks Kostya ;) On May 20, 12:49 pm, Kostya Vasilyev kmans...@gmail.com wrote: 20.05.2011 18:51, kypriakos ?: Oh, and I see that the intent you're trying to start is for a service. Using startActivity (for result or not) with a service intent just doesn't make sense. Where do you see that? The intent I am starting is an Activity class. Can you explain please? Intent intent = new Intent(); intent.setClass(androidContext, mysnapPic2ServiceImpl.class); You class is named ...Pic2*Service*Impl, so I assumed it was a Service. If it's an Activity, well, so it is - you know your code, whereas I could only guess from the class name :) -- Kostya Vasilyev --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: startActivityForResult
Research - and oh man, the times I heard that question ;) On May 20, 11:01 am, Nikolay Elenkov nikolay.elen...@gmail.com wrote: On Fri, May 20, 2011 at 11:51 PM, kypriakos demet...@ece.neu.edu wrote: Ah sleep is good ... Ok revisiting this I can see the wrong path I went down to ... I built a servlet for the ijetty web server that launches an Activity once a particular remote request comes in. The ijetty code provides the AndroidContext in all servlets through: If you could take a step back, why are you using Jetty in the first place? Sounds interesting and all, but unless this is a research project, what have you got to gain by running a servlet engine on your phone? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: startActivityForResult
That's a good point to note - thanks! On May 20, 1:00 pm, luiX_ lui...@gmail.com wrote: Haven't read carefully all the responses but just a quick note: It's not a good idea to declare the request code as a local variable, I usually declare them as constants because you'll need it in the onActivityResult method :) 2011/5/20 Kostya Vasilyev kmans...@gmail.com 20.05.2011 18:51, kypriakos пишет: Oh, and I see that the intent you're trying to start is for a service. Using startActivity (for result or not) with a service intent just doesn't make sense. Where do you see that? The intent I am starting is an Activity class. Can you explain please? Intent intent = new Intent(); intent.setClass(androidContext, mysnapPic2ServiceImpl.class); You class is named ...Pic2*Service*Impl, so I assumed it was a Service. If it's an Activity, well, so it is - you know your code, whereas I could only guess from the class name :) -- Kostya Vasilyev --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 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: startActivityForResult
Great thanks - much appreciated it. But I was also asking as to whether the startActivityforResult() is part of the Android 1.6 API since the compilation fails there. Any idea? On May 19, 12:27 am, Our-Android sachin.worldnet.prog...@gmail.com wrote: hi, find the link below you will get complete code for startActivityforResult() http://our-android.blogspot.com/2011/05/passing-data-returning-data-b... Thanks On May 19, 8:44 am, kypriakos demet...@ece.neu.edu wrote: Hi all, I am writing apps for some old phones (Android 1.6). I can call startActivity(intent) without issues but the startActivityForResult(intent, int) fails on compile? Was this method introduced after 1.6? How can one see what's been deprecated across versions? 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: startActivityForResult
Excellent! Thanks. So the API level 4 (to which cupcake/1.6 is based on) does not have the startActivityForResult - which is in line with the fact that the compilation fails. Anyway knows as to what provision was available back then for allowing an activity to call back a calling class? Or no such luck? Will I need to use some kind of shared mem or a file method to pass results back? Thanks On May 19, 12:16 am, Giorgio Vespucci giorgio.vespu...@gmail.com wrote: In the upper right corner of API page there is a scrollbox you can use to filter the minimum API level you want to see. Hope this helps. :) Il giorno 19/mag/2011 05:44, kypriakos demet...@ece.neu.edu ha scritto: -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: startActivityForResult
That's what I said too - huh? ;) Intent intent = new Intent(); intent.setClass(androidContext, mysnapPic2ServiceImpl.class); intent.setFlags(intent.FLAG_ACTIVITY_NEW_TASK); intent.putExtra(from, 1); final int result=1; // androidContext.startActivity(intent); androidContext.startActivityForResult(intent, result); The startActivity method (commented out) is found fine when used - the one below it gives: [ERROR] snapPic2Servlet.java:[89,22] cannot find symbol symbol : method startActivityForResult(android.content.Intent,int) location: class android.content.Context It has to be something stupid I can't see right now ... On May 19, 2:12 pm, Kostya Vasilyev kmans...@gmail.com wrote: Huh? http://developer.android.com/reference/android/app/Activity.html#star..., int) Since API level 1 - i.e. Android 1.0. Perhaps you could post a code snippet showing the compile error. -- Kostya 19.05.2011 22:04, kypriakos пишет: So the API level 4 (to which cupcake/1.6 is based on) does not have the startActivityForResult - which is in line with the fact that the compilation fails. -- Kostya Vasilyev --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: startActivityForResult
I think there is a startActivity method in the Context class and that's why I got a bit confused regarding the startActivityForResult - I think it makes a bit more sense now. I need to start an Activit for now and not a service and I think I intermixed the two. I do get the Activity to start with the context.startActivity and it does what I want it to do - but I do see now what you are saying. Thanks Kostya On May 19, 5:51 pm, Kostya Vasilyev kmans...@gmail.com wrote: StartActivityForResult is a method of Activity, not Context. You can typecast if appropriate. If not (i.e. your Context is a service or a receiver), then it doesn't make sense - because the result callback used by startActivityForResult is also a method of Activity. If this case, use a broadcast, a pending intent, or a handler message (just some of the options) to send/receive the result. Oh, and I see that the intent you're trying to start is for a service. Using startActivity (for result or not) with a service intent just doesn't make sense. 20.05.2011 1:41 пользователь kypriakos demet...@ece.neu.edu написал: That's what I said too - huh? ;) Intent intent = new Intent(); intent.setClass(androidContext, mysnapPic2ServiceImpl.class); intent.setFlags(intent.FLAG_ACTIVITY_NEW_TASK); intent.putExtra(from, 1); final int result=1; // androidContext.startActivity(intent); androidContext.startActivityForResult(intent, result); The startActivity method (commented out) is found fine when used - the one below it gives: [ERROR] snapPic2Servlet.java:[89,22] cannot find symbol symbol : method startActivityForResult(android.content.Intent,int) location: class android.content.Context It has to be something stupid I can't see right now ... On May 19, 2:12 pm, Kostya Vasilyev kmans...@gmail.com wrote: Huh? http://developer.android.com/reference/android/app/Activity.html#star..., int) Since API level 1 - i.e. Android 1.0. Perhaps you could post a code snippet showing the compile error. -- Kostya 19.05.2011 22:04, kypriakos пишет: So the API level 4 (to which cupcake/1.6 is based on) does not have the startActivityForResult - which is in line with the fact that the compilation fails. -- Kostya Vasilyev --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 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Saving an image
HI all, I use the mCamera.takePicture(null, null, jpegCallback); to snap a picture through an activity. When the callback occurs I do see the data (approx 1.5 MB in length) and I use the following to write it to the sdcard - but the image length written is 0. Any ideas as to why this occurs? String path = Environment.getExternalStorageDirectory().toString(); OutputStream out = null; File file = new File(path, IMAGE.jpg); out = new FileOutputStream(file); System.out.println(Wrote image to =[+path+]); out.close(); 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: startActivityForResult
Thanks to all of you - I did mix up the startActivities in two different classes down the inheritance. The androidcontext is passed to the servlet I am running from the ijetty web server. It is defined as Context and thus he compiler error - silly mistake on my part not to see that in the first place ;) Thanks again On May 19, 5:52 pm, Streets Of Boston flyingdutc...@gmail.com wrote: startActivityForResult is only implemented for an Activity, not for a Context! If 'androidContext' in your code-snippet above is declared as a Context, trying to call 'startActivityForResult' will result in a compiler error. If 'androidContext' in your code-snippet is declared as an Activity, it should not raise a compiler error. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] startActivityForResult
Hi all, I am writing apps for some old phones (Android 1.6). I can call startActivity(intent) without issues but the startActivityForResult(intent, int) fails on compile? Was this method introduced after 1.6? How can one see what's been deprecated across versions? 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] Android and camera
Hi all, I am working on an app to use the phone's cam periodically. I used the appropriate entries in the app's manifest file etc. uses-permission android:name=android.permission.CAMERA / uses-feature android:name=android.hardware.camera / uses-feature android:name=android.hardware.camera.autofocus / At runtime I get: ava.lang.RuntimeException: Fail to connect to camera service at android.hardware.Camera.native_setup(Native Method) at android.hardware.Camera.init(Camera.java:85) at android.hardware.Camera.open(Camera.java:67) Is there anything else that needs to be done to achieve this? From the Camera class description and all examples (including the Preview in the APIDemos) I think I am using everything necessary to achieve 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: Remote access to phones
Hi all - trying this once again - has anyone managed to access Android phones remotely with ssh? Any hits you can share that would certainly help. Thanks On Apr 5, 3:48 pm, kypriakos demet...@ece.neu.edu wrote: Hi all, I am trying to figure out a way to access the htc phones (running Android 1.6 and 2.2) over ssh. I used the following I found from a posting: setprop service.adb.tcp.port stop adbd (by the way this means reboot unless you have a terminal on the phone) start adbd and from remote node use adb connect ip addr: Is there an open-source ssh server package somewhere? I didn't find one on Market. 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: Remote access to phones
To which humble SDK users group I belong as well ;) He he - thanks Kostya that's a good pointer, I will follow up with them. On Apr 8, 9:37 am, Kostya Vasilyev kmans...@gmail.com wrote: I haven't, but you may want to ask on android-porting. Those folks deal with setprop and ports much more than us humble SDK users :) -- Kostya 08.04.2011 17:20, kypriakos пишет: Hi all - trying this once again - has anyone managed to access Android phones remotely with ssh? Any hits you can share that would certainly help. Thanks -- Kostya Vasilyev --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