[android-developers] Re: Importing java apps into the Android
Or in certain cases just a launching portal - some of the apps we want to run offer lower layer functionalities (peer-to-peer) so a comprehensive UI is not necessary. Thanks Mark On Jun 24, 3:56 pm, Mark Murphy mmur...@commonsware.com wrote: On Thu, Jun 24, 2010 at 3:31 PM, kypriakos demet...@ece.neu.edu wrote: Or would generating a project from scratch and importing the classes incrementally into the project from the existing project the best way? Generally, yes. Existing Java projects will use a different UI than what Android offers. -- 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
Re: [android-developers] ListView - Row Background Animation
On Fri, Jun 25, 2010 at 11:58 AM, Daniel Lew danle...@gmail.com wrote: Does anyone have any ideas on how to make a temporary fading background on particular rows in a ListView? AnimationDrawable, maybe? -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.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
Re: [android-developers] Re: ItemizedOverlay database items: When do I update the OverlayItem list?
On Fri, Jun 25, 2010 at 11:57 AM, Pedro Teixeira pedroteixeir...@gmail.com wrote: So what you're saying is that: from getLatitudeSpan() and getLongitudeSpan() I have the distance from top/bottom left/right of the part of the map being displayed in latitude/longitude values? So if I get a reference point, let's say the center. I can actually get the values from each corner right? Yes, though there is a built-in Projection class in the Maps add-on that can handle GeoPoint-pixel conversions for you for the currently-displayed map. http://code.google.com/android/add-ons/google-apis/reference/com/google/android/maps/Projection.html -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.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] Can't mark errors as old in the market developer console
Hi, in the developer console, I have a couple of errors, which although fixed in the code and marked old in the console, still show up on the front page. And I highly suspect that this is affecting the rank of my apps. This is obviously a bug in the developer console: 1. at the developer console homepage it says (in bold face): Errors (2) 2. when I click on Errors, it shows: Freezes Crashes 1 new 1 new 0 reports 0 reports 1 old 3 old 2 reports 7 reports 3. When I click on 1 New in the Freezes column, it displays: Old ANR keyDispatchingTimedOut 2 reports 0 reports/week 4. When I click on 1 New in the Crashes column, it says: Old NullPointerException 1 reports 0 reports/week Old IllegalArgumentException 1 reports 0 reports/week Old NullPointerException 5 reports 0 reports/week As you can see these errors are all marked old, and on individual error pages, there is only a Mark as new button. Also, one of my apps, TapeMachine, has 4.5 stars, 973 downloads, and 83% active installs. For certain keyword searches in the market it has been the first result for many weeks. And since these (bogus) errors are here, it has lost its rank falling under many applications with lower ratings. A similar issue happened with the free version, which has 4 stars and about 20k downloads. Is there a workaround or a fix for this situation? -- Olivier -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Application is not installed on your phone error on Nexus One
Hey guys, I have an interesting problem I just can't seem to get through. I hung out yesterday in the IRC during office hours in hopes to find someone, but I guess the Google guys are swamped and couldn't make it. We have an app that we have tested successfully across 10 different devices on 4 different networks without a problem. However, our app will not work on ANY Nexus One devices, tested across 4 different carriers. The work flow is like this: 1. Via the browser, visit a URL to download the apk file OTA. 2. Install app. App shows up on the device. 3. Click the icon to run the app. An error occurs saying Application is not installed on your phone At this point, we can see the app is trying to run. LogCat shows the following interesting bit: 06-22 16:23:53.477: ERROR/Launcher(148): java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x1020 cmp=com.mycompany.TestApp/.TestApp } from ProcessRecord{44879720 148:com.android.launcher2/10016} (pid=148, uid=10016) requires android.permission.INTERNET The funny thing is, I have android.permission.INTERNET use-permission in the manifest, and no other devices seem to have a problem with the permissions set there. Anyone have any ideas WHY this behaviour is isolated to Nexus One devices? -- Regards, Dana Epp -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] How to click multiple buttons through sliding motion
On Sat, Jun 19, 2010 at 3:55 AM, yousefm yousef...@gmail.com wrote: I was wondering if there is a way to click multiple items (buttons,checkboxes,radiobuttons,etc) by doing a sliding over multiple items in one motion. No idea, but I would look into Gestures. - TreKing - Chicago transit tracking app for Android-powered devices http://sites.google.com/site/rezmobileapps/treking -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Mapping (x,y) to (latitude,longitude)
Please tell what values you get from mymap.getProjection().fromPixels(0, 0) versus what values you get from mymap.getMapCenter(). -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Reference Chooser
On Sat, Jun 19, 2010 at 7:58 AM, bartek mobilbarth...@googlemail.comwrote: Hi, where can i find a Reference Chooser like this: In Eclipse? - TreKing - Chicago transit tracking app for Android-powered devices http://sites.google.com/site/rezmobileapps/treking -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] how to test if app is installed on sd
Here is how you can force app to sd : http://forum.androidcentral.com/motorola-droid-roms-hacks/17931-how-force-apps-sd.html I already have a generic warning, but not sure if everybody reads them... Thnks anyway. On Jun 25, 2010 4:51 PM, TreKing treking...@gmail.com wrote: On Mon, Jun 21, 2010 at 12:37 PM, arnold ligthart arn...@fortuin.nl wrote: User's can force a ... How, exactly? So i want to test for sd install and warn users if they did. Just put up a generic warning message, regardless if they're installed on the SD card or not, when they update the app or mount the SD card. - Tr... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Moto Droid ADB Drivers no longer work after HTC Evo was used.
I have owned my Droid since day 1 and I have been doing Android development, with ADB working, on my Windows 2003 Server laptop all this time. I'll try to be as detailed as possible. Things to note right off the bat: - Motorola Droid 2.1 - Windows Server 2003 laptop - ADB has worked perfectly with this for ~ 8 months My work gave me a HTC Evo to do some development on. I installed the HTC drivers, ADB worked fine, did my development and now I am done with the Evo. The problem is my Droid no longer works with ADB. Here are some steps that I have tried: Attempt A: 1. In device manager I have listed Android Phone-Android ADB Interface 2. Right click-Uninstall 3. Scan for new hardware-Device shows up 4. Select this device, pick the usb drivers that come with the SDK 5. Various items install like ADB and Moto A855 6. Device manager looks exactly as it did in step 1. 7. ADB Doesnt work Attempt B: 1. Start up USBDeview 2. Delete the HTC entry, Delete all the Motorola A855 entries 3. Go through the steps in Attempt A. 4. ADB Doesnt work Attempt C: 1. Download Motorola 4.6.0 driver package and install it 2. Uninstall the current driver in device manager 3. Scan for drivers automatically 4. Drivers from SDK are automatically used 5. ADB not working 6. Go back and pick have disk for the driver. Tried every driver than came with Mtorola 4.6.0 driver package and none would install. Now I'm just stumped. Also important to note that the phone and ADB still work fine on other computers that I never installed the HTC drivers on. Thanks for any tips! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] android menu and selection
On Sat, Jun 19, 2010 at 2:57 PM, Kroepoek frod...@gmail.com wrote: I'm trying to create a menu. What I've managed so far is create a imageview and some normal text under it with textview. Why are you making a menu out of Text and Image views when Android has a menu system that handles all that for you? - TreKing - Chicago transit tracking app for Android-powered devices http://sites.google.com/site/rezmobileapps/treking -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] ServerSocket problem
Hi, folks I'm now facing a very strange server socket problem, I have a server that will listen on a TCP port, I use the following code to do this work. public class RequestListenerThread extends Thread { private final ServerSocket serversocket; public RequestListenerThread(int port, final String docroot) throws IOException { this.serversocket = new ServerSocket(port); setDaemon(true); } public void run() { Log.v(FE, SMB Server Listening on port + this.serversocket.getLocalPort()); while (!Thread.interrupted()) { try { // Setup incoming client connection Socket socket = this.serversocket.accept(); Log.v(FE, Incoming connection from + socket.getInetAddress()); // Start worker thread Thread t = new WorkerThread(socket); t.start(); } catch (InterruptedIOException ex) { break; } catch (IOException e) { Log.v(FE, Network I/O error: + e.getMessage()); break; } } } } My target device is running on Android 1.6. When I run this code, it can start to listen on port but can't accept any incoming connections. When it runs into serversocket.accept function, it never return, just like dead lock. Does anybody has the same issue? How do you solve this problem? Thanks very much Alex -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] ServerSocket problem
more on this problem... it works great in emulator, but always failed on real device On Sat, Jun 26, 2010 at 1:03 AM, Alex Xin xinxi...@gmail.com wrote: Hi, folks I'm now facing a very strange server socket problem, I have a server that will listen on a TCP port, I use the following code to do this work. public class RequestListenerThread extends Thread { private final ServerSocket serversocket; public RequestListenerThread(int port, final String docroot) throws IOException { this.serversocket = new ServerSocket(port); setDaemon(true); } public void run() { Log.v(FE, SMB Server Listening on port + this.serversocket.getLocalPort()); while (!Thread.interrupted()) { try { // Setup incoming client connection Socket socket = this.serversocket.accept(); Log.v(FE, Incoming connection from + socket.getInetAddress()); // Start worker thread Thread t = new WorkerThread(socket); t.start(); } catch (InterruptedIOException ex) { break; } catch (IOException e) { Log.v(FE, Network I/O error: + e.getMessage()); break; } } } } My target device is running on Android 1.6. When I run this code, it can start to listen on port but can't accept any incoming connections. When it runs into serversocket.accept function, it never return, just like dead lock. Does anybody has the same issue? How do you solve this problem? Thanks very much Alex -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Android paid apps in Ireland
On Mon, Jun 21, 2010 at 3:37 AM, skooter500 skooter...@gmail.com wrote: 1. When will the Android paid app marketplace be available in Ireland There is no ETA - assume never. 2. If its not going to be for a while, how do I sell my app in Ireland withough using the Android Marketplace? Use third party sites like AndAppStore or SlideMe. Consider putting a free version on the Android Marketplace that's limited in functionality and points users in non-paid countries to your alternate market offerings. Good luck. - TreKing - Chicago transit tracking app for Android-powered devices http://sites.google.com/site/rezmobileapps/treking -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Android to be published and sold on private website
On Sun, Jun 20, 2010 at 1:01 PM, SaiSriOrl sridhar.rangasw...@gmail.comwrote: Regarding the publishing strategy in response to Linkedin. What publishing strategy? Response to what on LinkedIn? The Apps will be published and sold on private web sites Not Andorid market, or Not App Store. What are The Apps? What the hell are you talking about? So we are seeking code imbedded in the apps to prevent duplication. What? - TreKing - Chicago transit tracking app for Android-powered devices http://sites.google.com/site/rezmobileapps/treking -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: ListView - Row Background Animation
I think you still end up with the same issue with AnimationDrawable - I'd like something to inform me when the animation has completed. At least with that one I can tell when it's ended, though. -Daniel On Jun 25, 11:08 am, Mark Murphy mmur...@commonsware.com wrote: On Fri, Jun 25, 2010 at 11:58 AM, Daniel Lew danle...@gmail.com wrote: Does anyone have any ideas on how to make a temporary fading background on particular rows in a ListView? AnimationDrawable, maybe? -- 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 1.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
Re: [android-developers] ServerSocket problem
do you know what's the ip address you got on the real device. There are chances the real device is on NAT network. In such a case you wont be able to talk directly to the device. On Fri, Jun 25, 2010 at 12:04 PM, Alex Xin xinxi...@gmail.com wrote: more on this problem... it works great in emulator, but always failed on real device On Sat, Jun 26, 2010 at 1:03 AM, Alex Xin xinxi...@gmail.com wrote: Hi, folks I'm now facing a very strange server socket problem, I have a server that will listen on a TCP port, I use the following code to do this work. public class RequestListenerThread extends Thread { private final ServerSocket serversocket; public RequestListenerThread(int port, final String docroot) throws IOException { this.serversocket = new ServerSocket(port); setDaemon(true); } public void run() { Log.v(FE, SMB Server Listening on port + this.serversocket.getLocalPort()); while (!Thread.interrupted()) { try { // Setup incoming client connection Socket socket = this.serversocket.accept(); Log.v(FE, Incoming connection from + socket.getInetAddress()); // Start worker thread Thread t = new WorkerThread(socket); t.start(); } catch (InterruptedIOException ex) { break; } catch (IOException e) { Log.v(FE, Network I/O error: + e.getMessage()); break; } } } } My target device is running on Android 1.6. When I run this code, it can start to listen on port but can't accept any incoming connections. When it runs into serversocket.accept function, it never return, just like dead lock. Does anybody has the same issue? How do you solve this problem? Thanks very much Alex -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] how to test if app is installed on sd
On Fri, Jun 25, 2010 at 12:47 PM, arnold ligthart arn...@fortuin.nl wrote: Here is how you can force app to sd : http://forum.androidcentral.com/motorola-droid-roms-hacks/17931-how-force-apps-sd.html First, this is for an unreleased operating system. Second, this is for rooted devices running an unreleased operating system. So, I'd wait until there is an Android 2.2 before worrying too much, as it is possible this avenue will have been closed off. Even then, unless your app specifically targets users of rooted devices, the percentage of the audience who would be affected by this is going to be rather small. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.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
Re: [android-developers] Re: Avoiding GPL
On Tue, Jun 22, 2010 at 11:32 PM, Naveen Maheshwari naveen...@gmail.comwrote: Yeah David is right.If you link your application with open source libraries you have to open your code. This is not necessary if you're talking about open source libraries in general. They are plenty of open-source license that allow you to keep your own source code closed: BSD, MIT and even the LGPL (under certain conditions). The GPL is more restrictive in the way it requires you to distribute your _own_ sources if they link to anything GPL. That's why what I am trying to do is the code that uses open source I make it as separate module and run that as remote service. Now since this service is running as a separate process so I am oblized to open only source code for this service... So the basic idea is *A* my app has some data and it needs to process this data... When it needs to process this data it runs a remote service *B*. This service process the data and returns back to *A*. *B* is the service that is using open source code and is running as a remote service. which is different process than app *A*. Source code for *B *will be made open source. So as far as I know there should not be any legal issues and all can go as same .apk. Thanks On Wed, Jun 23, 2010 at 3:14 PM, Chi Kit Leung michaelchi...@gmail.comwrote: I think david is very right about that. On Wed, Jun 23, 2010 at 4:04 PM, David Turner di...@android.com wrote: On Tue, Jun 22, 2010 at 9:33 PM, HaMMeReD adamhamm...@gmail.com wrote: If you can use it without modifying the source then just do it, and provide credit to the library creator clearly in your app. this is wrong on many levels. As soon as you *distribute* the binaries (e.g. through Market), you must provide the sources of _all_ your program if you link against the GPLed sources. This is true of GPLv2 or GPLv3. The LGPL is different, but conditions are very specific, and probably corresponds more to what you describe. However, this does not apply to the GPLv3. Please read the GPL Faq, it contains useful information. If you need to modify the source, then you need to be able to provide the modifications. If you need to integrate it with your app deeply so that you can't use the modified version without your app, then you need to open source the entire thing. IANAL but using a open source library in a closed source project without any modification should not provide any serious legal issues as long as everyone is properly credited and there is no stipulations in the license or on the creators website. I wouldn't recommend doing complex workarounds, because it just increases the amount of changes and dependencies between your app and the open source app, and shows that you were trying to circumvent things. Just do your best to not change it, and check the creators site to see if they sell alternate licenses that might server your needs better, if you do need to modify the source in certain ways. Adam Hammer On Jun 22, 12:10 am, Naveen naveen...@gmail.com wrote: Hi! I need to use some open source code with GPL3. As usual I don't want to open source code for full application. Now what I understand is if I make two separate process one with my main application code and other as a service or something with Open source library then in that case I have to open source code only for the other one. Now the question is what is the best way to do so in Android. Suppose My Main App is A Open Source code is B So A will give some data to B. B will process this and sends data back to A. B may not need to have any UI. 1. Is it possible to install 2 seperate applications / processes from one APK? 2. What is the best way ?Should B be a service? How will be the communication between A and B ? 3. Is it possible to run/call B from A? Pls. advice Thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Regards, Michael Leung http://www.itblogs.info http://www.michaelleung.info -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to
[android-developers] Re: Accidentally made my paid app free
On Jun 25, 7:35 am, g1bb corymgibb...@gmail.com wrote: I don't assume that would keep my downloads and ratings intact, would it? Huh? Why would there be any downloads and ratings if I immediately unpublished it, so I shouldn't have any free users out there. Nathan -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Mapping (x,y) to (latitude,longitude)
GeoPoint X = mapView.getProjection().fromPixels(0, 0); GeoPoint y = mapView.getMapCenter(); I get 3200,-1600 on both values! Which is actually the value I set on DMMS simulator of my last position. My map starts on the user current position, which are those values that I generated in DMMS On Jun 25, 2010, at 5:41 PM, Frank Weiss wrote: Please tell what values you get from mymap.getProjection().fromPixels(0, 0) versus what values you get from mymap.getMapCenter(). -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en Pedro Teixeira www.pedroteixeira.org -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] MapView getLatitudeSpan
Has anyone figured out how to duplicate the getLatitudeSpan results when it returns zero? My assumption is that I can figure out a formula to get the equivalent result to getLatitudeSpan (and longitude), by testing it for zero, and if it's zero, use a formula based on mapView.getMapCenter() and using the Zoom . It can't be that tough a formula, but I was wondering if anyone else has already done it, and are willing to share the info, or maybe knows an easier way? -- Sincerely, Brad Gies --- Bistro Bot - Bistro Blurb http://www.bgies.com http://www.bistroblurb.com http://www.ihottonight.com --- Never doubt that a small group of thoughtful, committed people can change the world. Indeed. It is the only thing that ever has - Margaret Mead -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Mapping (x,y) to (latitude,longitude)
I don't see a problem there, except that the pixel origin appears to be at the center of the map view! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] MapView getLatitudeSpan
If it returns zero, then either it's a bug or a race condition (you're calling getLatitudeSpan() before the map view is ready). I recommend to verify those possibilities before applying a work around. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Accidentally made my paid app free
On Fri, Jun 25, 2010 at 12:49 PM, Nathan critter...@crittermap.com wrote: Why would there be any downloads and ratings if I immediately unpublished it, so I shouldn't have any free users out there. He means the download and ratings for the app attained while it was paid (however long that was), before he made it free and immediately unpublished. - TreKing - Chicago transit tracking app for Android-powered devices http://sites.google.com/site/rezmobileapps/treking -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] MapView getLatitudeSpan
On Fri, Jun 25, 2010 at 1:15 PM, Brad Gies rbg...@gmail.com wrote: Has anyone figured out how to duplicate the getLatitudeSpan results when it returns zero? When does it return 0? - TreKing - Chicago transit tracking app for Android-powered devices http://sites.google.com/site/rezmobileapps/treking -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Mapping (x,y) to (latitude,longitude)
the pixel origin should be at the top left right? How can I assume the screen size then? if (0,0) is the center, screenWidth and screenHeight would be where? I was assuming that: mymap.getProjection().fromPixels(0, 0) would give me the top left mymap.getProjection().fromPixels(screenwidth, screenheight) would give me the bottom right and from there I could take the latitude and longitude of each corner.. is that possible? For example: GeoPoint X = mapView.getProjection.fromPixeis(0,0); GeoPoint Y = mapView.getProjection.fromPixeis(screenWidth,screenHeight); X.getLatitude(); Would give me the top latitude Y.getLatitude(); Would give me the bottom latitude X.getLongitude(); Would give me the left longitude Y.getLongitude(); Would give me the right longitude And with those values I have the area of the screen with the boundaries latitude/longitude wise which is the values that I need to perform my algorithm. On Jun 25, 2010, at 7:23 PM, Frank Weiss wrote: I don't see a problem there, except that the pixel origin appears to be at the center of the map view! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en Pedro Teixeira www.pedroteixeira.org -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] MapView getLatitudeSpan
PS: Using this to get the display size Display display = getWindowManager().getDefaultDisplay(); int width = display.getWidth(); int height = display.getHeight(); On Jun 25, 2010, at 7:27 PM, Frank Weiss wrote: If it returns zero, then either it's a bug or a race condition (you're calling getLatitudeSpan() before the map view is ready). I recommend to verify those possibilities before applying a work around. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en Pedro Teixeira www.pedroteixeira.org -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] MapView getLatitudeSpan
That's true... I am trying to get them before the map is ready. I need them to call a webservice that downloads the info needed to display the points on the map when it is ready, and I want them as soon as possible to enhance the user experience. When the map is ready a function is called to plot them. On 25/06/2010 11:27 AM, Frank Weiss wrote: If it returns zero, then either it's a bug or a race condition (you're calling getLatitudeSpan() before the map view is ready). I recommend to verify those possibilities before applying a work around. -- Sincerely, Brad Gies --- Bistro Bot - Bistro Blurb http://www.bgies.com http://www.bistroblurb.com http://www.ihottonight.com --- Never doubt that a small group of thoughtful, committed people can change the world. Indeed. It is the only thing that ever has - Margaret Mead -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Mapping (x,y) to (latitude,longitude)
Your results seem to indicate the documentation for Projection is incorrect. If you want the lat/lng bounds, why bother using Projection when you can use MapView.getMapCenter() and MapView.getLatitudeSpan(), etc.? Your original question seemed more general that just getting the lat/;lng bounds. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Application is not installed on your phone error on Nexus One
That is saying that your main activity has declared that it requires callers have the internet permission to invoke it. Check to make sure you didn't put android:permission=... for that activity. On Fri, Jun 25, 2010 at 9:38 AM, Dana Epp d...@vulscan.com wrote: Hey guys, I have an interesting problem I just can't seem to get through. I hung out yesterday in the IRC during office hours in hopes to find someone, but I guess the Google guys are swamped and couldn't make it. We have an app that we have tested successfully across 10 different devices on 4 different networks without a problem. However, our app will not work on ANY Nexus One devices, tested across 4 different carriers. The work flow is like this: 1. Via the browser, visit a URL to download the apk file OTA. 2. Install app. App shows up on the device. 3. Click the icon to run the app. An error occurs saying Application is not installed on your phone At this point, we can see the app is trying to run. LogCat shows the following interesting bit: 06-22 16:23:53.477: ERROR/Launcher(148): java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x1020 cmp=com.mycompany.TestApp/.TestApp } from ProcessRecord{44879720 148:com.android.launcher2/10016} (pid=148, uid=10016) requires android.permission.INTERNET The funny thing is, I have android.permission.INTERNET use-permission in the manifest, and no other devices seem to have a problem with the permissions set there. Anyone have any ideas WHY this behaviour is isolated to Nexus One devices? -- Regards, Dana Epp -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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
Re: [android-developers] Re: Mapping (x,y) to (latitude,longitude)
I need the top/bottom/left/right bounds in latitude/longitude of the part of the map a certain screen is seeing at that moment. The screen can be from any device, I just want to certificate that the information I'm going to pass through an algorithm that I did on the server side of my application stays between those bounds, so I don't send unnecessary information, since the user is not seeing it. On Jun 25, 2010, at 8:10 PM, Frank Weiss wrote: Your results seem to indicate the documentation for Projection is incorrect. If you want the lat/lng bounds, why bother using Projection when you can use MapView.getMapCenter() and MapView.getLatitudeSpan(), etc.? Your original question seemed more general that just getting the lat/;lng bounds. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en Pedro Teixeira www.pedroteixeira.org -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] AIDL, Binder, ResultReceiver, and Performance
On Fri, Jun 25, 2010 at 8:45 AM, Mark Murphy mmur...@commonsware.comwrote: -- that the performance overhead I thought we had with AIDL/Binder within a process isn't really there? Or... AIDL/Binder by design don't have a performance impact when making a call in the same process. This turns into a direct call on to the target's interface implementation. (Note in the future we may introduce indirection there to make the semantics of the local case better match that of remote calls... but not today.) The big thing this introduces is a whole lot more effort and complexity for the developer, as they now need to deal with AIDL interfaces. Also note that if you know this service is in the same process, you can use the same local calling trick as the LocalService sample -- pass it an IBinder, which the service simply casts to a concrete local object to call. -- that the overhead is there, should be avoided, ResultReceiver is a bad idea, and its use in stuff like the Google I|O 2010 conference app is merely unfortunate? If the purpose of this code (and I haven't looked at it to know) is to send a command to the service and get told later when it is done, then this is a reasonable approach. There are some potential edge cases where the result won't be delivered though (if the process is in the background and gets killed and its service restarted), so I would recommend giving it a PendingIntent to deliver a result to the activity rather than an interface to a live object. You can make this with Activity.createPendingResult(). On the other hand, if the purpose of this is to tell the service about the activity running for it to know about and send information back during that time, it is bad because this is not the semantics of startService(). You want to use bindService() for that. -- 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
Re: [android-developers] Re: Avoiding GPL
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 6/25/10 04:55 , Andy Savage wrote: I forgot to say in my previous post. In response to the person talking about MySQL. I believe this is quite different as MySQL is a completely self contained database system that other applications communicate with. As in, it's a completely GPL package, rather than a part of another application. If you actually incorporated the MySQL code within your application I believe it would break GPL (presuming your application was closed source). I am not sure how this applies to the MySQL libraries that are setup to use mysql say from PHP. This is correct, and I was referring to MySQL. The difference stays in that incorporating - as you said, if the two apps were still considered as two separate, collaborating apps it would be fine. On 6/25/10 09:39 , Anton Persson wrote: Not entirely true. Yes; a LOT of non-FLOSS (closed source) apps use MySQL.. But they do that by buying the non-FLOSS-licenses that MySQL _sell_. MySQL allows you to use MySQL with the GPL license as long as YOUR application is also using GPL. That is their idea, and that's why many prefer PostgreSQL. So, if you are using MySQL with the GPL license you are doing something MySQL doesn't want you to do. This is COMPLETELY incorrect. Corporates buy the paid license of MySQL because of support and indemnification. The GPL license CLEARLY says that a GPL application can be used without applying the virality when it runs in a separate process and is used by connecting with a socket (or other ways, such as clear API access points - otherwise, everything using Linux should be GPL as well, and clearly it isn't). - -- Fabrizio Giudici - Java Architect, Project Manager Tidalwave s.a.s. - We make Java work. Everywhere. java.net/blog/fabriziogiudici - www.tidalwave.it/people fabrizio.giud...@tidalwave.it -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.14 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkwlC9oACgkQeDweFqgUGxd1sgCgkmJuBWeEGzc50aATw08v/Uke Is0AoJ/o8RAoJ1XMTRvlWXQA3jM74sHQ =Q5fR -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Avoiding GPL
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 6/23/10 10:51 , Sean Hodges wrote: You really need to consult a specialist on this subject, developers (including me) have a tendency to give out I am not a lawyer type advice, which is inherently unreliable. In the strategy you describe, I believe putting A and B in the same APK means you are distributing both components as a single piece of software. A person cannot modify and distribute B without either bundling closed-source A, or modifying the build process (which also violates the GPL). You would be closer to a solution if you created 2 separate APK's, as long as A and B are completely independent of each other. The nature of the GPL is that the authors *do not want* their code distributed in a closed-source solution, and this is exactly why it is so difficult to find a legal way to do it. If you want to mix licences; seek legal advice, and/or contact the authors about the possibility of a dual-licence solution. I agree that binding everything into a single .apk is very likely a GPL violation; in the best case, an expert would be needed to clarify the point. I repeat, the simpler thing is to ask the FSF about, as they are quite open (!) to talk to people. - -- Fabrizio Giudici - Java Architect, Project Manager Tidalwave s.a.s. - We make Java work. Everywhere. java.net/blog/fabriziogiudici - www.tidalwave.it/people fabrizio.giud...@tidalwave.it -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.14 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkwlDHMACgkQeDweFqgUGxeQvwCfY2KWbanVJWP4IooODu9AWwqM AJsAni7uJGyN0lR66RcjPFyO6Sy4W//F =glY7 -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] AIDL, Binder, ResultReceiver, and Performance
On Fri, Jun 25, 2010 at 3:50 PM, Dianne Hackborn hack...@android.com wrote: AIDL/Binder by design don't have a performance impact when making a call in the same process. This turns into a direct call on to the target's interface implementation. Ah! That's good to know. The big thing this introduces is a whole lot more effort and complexity for the developer, as they now need to deal with AIDL interfaces. At least that's hidden for ResultReceiver, which has the AIDL stuff baked in. If the purpose of this code (and I haven't looked at it to know) is to send a command to the service and get told later when it is done, then this is a reasonable approach. There are some potential edge cases where the result won't be delivered though (if the process is in the background and gets killed and its service restarted), so I would recommend giving it a PendingIntent to deliver a result to the activity rather than an interface to a live object. You can make this with Activity.createPendingResult(). :: scribbles furiously in notebook :: On the other hand, if the purpose of this is to tell the service about the activity running for it to know about and send information back during that time, it is bad because this is not the semantics of startService(). You want to use bindService() for that. Yeah, I haven't fully investigated the app, so I don't know precisely what your team's intentions were when they wrote it. But, this info is fantastic -- many thanks! -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.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
Re: [android-developers] Re: Mapping (x,y) to (latitude,longitude)
Exactly. You need to pass the neLatitude, neLongitude, swLatitude, swLongitude as query parameters to your back end web service, which then returns only POIs whose latitude and longitude fall within those bounds, like this Javascript Google Map does: http://myhome.bankofamerica.com/?findmlo=94114#/findmlo/94105 Notice that it even handles panning and zooming. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: PopupWindow can't be dismissed when press back key
I have the same problem and when I try to catch the back key in my list activity (my popup display when an item is clicked) it doesn't catch the back key On Jun 4, 4:35 pm, arnouf arnaud.far...@gmail.com wrote: - Use a Dialog component or - Catch the event on back button to finish your PopupWindow. Best On Jun 4, 1:42 pm, ionel ionelt2...@gmail.com wrote: Hi, I've created a custom PopupWindow but when I press back button, the window doesn't dissapear. If somebody found a solution please response. Thanks, Ionel. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] unable to access user preferences
hi, i have a programme where the user checks a checkbox and i want to store this setting, but on restarting the app, i am unable to restore the settings. i have tried this: public void onCreate() { -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] unable to access user preferences
hi, i have an app in which i want to store the user preference that whether he checks a chekckbox or not, however when i restart the app, i am unable to restore the settings set by the user. I have tried the following : public void OnCreate() { . checkbox=(CheckBox)findViewById(R.id.checkbox); // storing the user preference SharedPreferences sharedpref = getApplicationContext().getSharedPreferences(MYPREF,Activity.MODE_WORLD_READABLE); // here MYPREF is the name of the file storing the preference SharedPreferences.Editor e = sharedpref.edit(); e.putBoolean(checkboxvalue, checkbox.isChecked()); e.commit(); //retrieving the preference set SharedPreferences mysharedpref = getApplicationContext().getSharedPreferences(MYPREF,Activity.MODE_WORLD_READABLE); checked=mysharedpref.getBoolean(checkboxvalue, false); if(checked)checkbox.setChecked(true); -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] unable to access the user preferences
i am trying to store the user preference whether he checks the checkbox or not ,but when i restart the activity, i am not able to restore the preference. here's what i have tried . public void onCreate() { checkbox=(CheckBox)findViewById(R.id.checkbox); // storing the user preference SharedPreferences sharedpref = getApplicationContext().getSharedPreferences(MYPREF,Activity.MODE_WORLD_READABLE); // here MYPREF is the name of the file storing the preference SharedPreferences.Editor e = sharedpref.edit(); e.putBoolean(checkboxvalue, checkbox.isChecked()); e.commit(); //retrieving the preference set SharedPreferences mysharedpref = getApplicationContext().getSharedPreferences(MYPREF,Activity.MODE_WORLD_READABLE); checked=mysharedpref.getBoolean(checkboxvalue, false); if(checked)checkbox.setChecked(true); } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] ListView - Row Background Animation
IMHO the list view doesn't shuffle the rows around, but the views that form these rows are re-used in order to avoid the repeated inflation of the views. Instead you get a previously setup view and you only do the data binding, i.e. set the actual values from your model in the views's text fields, bitmaps etc.. However it would only re-use a view that previously was scrolled out of the viewable part of the list. So when your transitions are gone before the view is scrolled out, no jumping should occur as the view cannot be seen anymore. This view might be re-used though by the next view (row) that gets scrolled in and when the animation still runs on it then you would still see it. You could reset the animation before re-using the view. That might have the drawback that an item with a slowly fading background is scrolled out while the transition is in progress and then scrolled in again, also while the transition is still in progress, but as you just reset the animation before the re-use you won't see it anymore. Am I making any sense? Maybe, if your views are very simple, you don't need to re-use them anyway and still have a good performance? Before going into more detail it may make sense for you to checkout those convert views. http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/view/List14.html On Fri, Jun 25, 2010 at 5:58 PM, Daniel Lew danle...@gmail.com wrote: Back when I originally wrote my app, I thought I could use some tricks with TransitionDrawable to briefly highlight some rows in a ListView. However, when I actually implemented this (a fading background), the background would jump from item to item randomly. As my knowledge of Android has progressed, I've learned why this no longer works: the ListView uses optimizations and actually shuffles rows around, so the row that I may have originally told to animate ends up placed in a different spot by the time the ListView is visible. My question is whether there's a solution to this problem. I've thought of using a different view type, but that would only work if I can turn *off* the view type for that row at the right time; since I'm using a TransitionDrawable, there's no way for me (right now) to mark once the animation is done. Does anyone have any ideas on how to make a temporary fading background on particular rows in a ListView? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Best httpclient re-use stategy
Just a sidenote on an issue that you touch, but not the actual main issue: - Save the cookie (String serialized into SharedPreferences) and create every time a new httpclient instance (then set the cookie to the new instance) = overhead to get the http connection I tried that in my app and found out there is a huge performance penalty involved as compared to just writing it to a file directly. I got the impression if you set any preference and do a commit, then all the settings are serialized into one single XML file and that's written to the very slow flash memory. If you have, say 50 other settings, this may take 300-600ms vs. 15 ms. Don't get hung up on the the actual numbers, just see the difference in principle here. Also when you have other stuff (the stream?) that you want to write, then you're also clogging the flash memory. On Fri, Jun 25, 2010 at 4:46 PM, MoxFulder dago...@gmail.com wrote: nobody has any idea ? On Jun 21, 10:33 am, MoxFulder dago...@gmail.com wrote: Hi there, I'm new using android sdk/httpclient I'm writing a small application which needs httpclient lib, basically to manage the cookie/session automatically. The website I'm targeting needs a valid session, so, between each http call, I need to send the cookie. Httpclient does it well. This is a tv stream application and I have to fetch the channel url, the url has a token parameter and I have to be logged / authenticated / (= have a valid cookie/sessionid) to fetch the channel url. I got the first cookie/sessionid with the first connection to the website. The cookie is valid for a certain amount of time, there is no expires but I don't know if there is any server cron to cleanup the sessions. I assume I have to ping every x secondes to maintain the session valid. Between each http call, the time could be from 1 sec to several minutes, it depends if the user wants to change the watched tv channel. The http call (to fetch the url) is not made by the UI Thread. There are several possibilities to manage the httpclient : - a single httpclient static singleton instance accessed by a custom synchronized getClient() on an helper class = when / how to release the http connection ? How to handle that correctly if the user got a phone call / does not use the application for now (unvalidate during onResume, etc)? - Save the cookie (String serialized into SharedPreferences) and create every time a new httpclient instance (then set the cookie to the new instance) = overhead to get the http connection - other ? I'm asking here what is the best way to implement that. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Avoiding GPL
Well, to connect to a MySQL database you need a connector, and the connector library shipped with MySQL is under GPL. Which is what I meant. And, hence, corporations buy licenses from MySQL to avoid having to release their applications under the GPL. (If you still don't believe me, try explaining the reason why they HAVE a dual license model... If they only wanted to sell support and indemnification, a separate paid-for license would NOT be needed... See Red Hat for an example of how that works..) And; the INTENT of MySQL is that if you use the GPL version of the MySQL database, your application should also be GPL. But, of course, there are loopholes. However, using these loopholes in a way that is obviously a circumvention is against this INTENT. If you want people to respect YOUR intellectual property, you should respect others as well, and not exploit their software in an unintended manner. Regards Anton On Fri, Jun 25, 2010 at 10:04 PM, Fabrizio Giudici fabrizio.giud...@tidalwave.it wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 6/25/10 04:55 , Andy Savage wrote: I forgot to say in my previous post. In response to the person talking about MySQL. I believe this is quite different as MySQL is a completely self contained database system that other applications communicate with. As in, it's a completely GPL package, rather than a part of another application. If you actually incorporated the MySQL code within your application I believe it would break GPL (presuming your application was closed source). I am not sure how this applies to the MySQL libraries that are setup to use mysql say from PHP. This is correct, and I was referring to MySQL. The difference stays in that incorporating - as you said, if the two apps were still considered as two separate, collaborating apps it would be fine. On 6/25/10 09:39 , Anton Persson wrote: Not entirely true. Yes; a LOT of non-FLOSS (closed source) apps use MySQL.. But they do that by buying the non-FLOSS-licenses that MySQL _sell_. MySQL allows you to use MySQL with the GPL license as long as YOUR application is also using GPL. That is their idea, and that's why many prefer PostgreSQL. So, if you are using MySQL with the GPL license you are doing something MySQL doesn't want you to do. This is COMPLETELY incorrect. Corporates buy the paid license of MySQL because of support and indemnification. The GPL license CLEARLY says that a GPL application can be used without applying the virality when it runs in a separate process and is used by connecting with a socket (or other ways, such as clear API access points - otherwise, everything using Linux should be GPL as well, and clearly it isn't). - -- Fabrizio Giudici - Java Architect, Project Manager Tidalwave s.a.s. - We make Java work. Everywhere. java.net/blog/fabriziogiudici - www.tidalwave.it/people fabrizio.giud...@tidalwave.it -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.14 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkwlC9oACgkQeDweFqgUGxd1sgCgkmJuBWeEGzc50aATw08v/Uke Is0AoJ/o8RAoJ1XMTRvlWXQA3jM74sHQ =Q5fR -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Anyone working on a way to re-use Android Layout XML in a Web App
Subject says it all: Anyone working on a way to re-use Android Layout XML in a Web App? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] database exception when update applicarion
Hi everyone, In my applicattion, I have 3 databases. Even When I do some changes not related to database, application throws exception as follows 01-01 02:03:04.264: ERROR/CursorWindow(1463): Bad request for field slot 0,3. numRows = 1, numColumns = 3 When I uninstall and install application again error is fixed. What is the reason for this error? Here is error log 01-01 02:34:21.491: ERROR/AndroidRuntime(3660): Uncaught handler: thread main exiting due to uncaught exception 01-01 02:34:21.499: ERROR/AndroidRuntime(3660): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.generalmobile.storeoid/ com.generalmobile.storeoid.MainCategory}: java.lang.IllegalStateException: get field slot from row 0 col 3 failed 01-01 02:34:21.499: ERROR/AndroidRuntime(3660): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 2401) 01-01 02:34:21.499: ERROR/AndroidRuntime(3660): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java: 2417) 01-01 02:34:21.499: ERROR/AndroidRuntime(3660): at android.app.ActivityThread.access$2100(ActivityThread.java:116) 01-01 02:34:21.499: ERROR/AndroidRuntime(3660): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794) 01-01 02:34:21.499: ERROR/AndroidRuntime(3660): at android.os.Handler.dispatchMessage(Handler.java:99) 01-01 02:34:21.499: ERROR/AndroidRuntime(3660): at android.os.Looper.loop(Looper.java:123) 01-01 02:34:21.499: ERROR/AndroidRuntime(3660): at android.app.ActivityThread.main(ActivityThread.java:4203) 01-01 02:34:21.499: ERROR/AndroidRuntime(3660): at java.lang.reflect.Method.invokeNative(Native Method) 01-01 02:34:21.499: ERROR/AndroidRuntime(3660): at java.lang.reflect.Method.invoke(Method.java:521) 01-01 02:34:21.499: ERROR/AndroidRuntime(3660): at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:791) 01-01 02:34:21.499: ERROR/AndroidRuntime(3660): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549) 01-01 02:34:21.499: ERROR/AndroidRuntime(3660): at dalvik.system.NativeStart.main(Native Method) 01-01 02:34:21.499: ERROR/AndroidRuntime(3660): Caused by: java.lang.IllegalStateException: get field slot from row 0 col 3 failed 01-01 02:34:21.499: ERROR/AndroidRuntime(3660): at android.database.CursorWindow.getString_native(Native Method) 01-01 02:34:21.499: ERROR/AndroidRuntime(3660): at android.database.CursorWindow.getString(CursorWindow.java:278) 01-01 02:34:21.499: ERROR/AndroidRuntime(3660): at android.database.AbstractWindowedCursor.getString(AbstractWindowedCursor.java: 49) 01-01 02:34:21.499: ERROR/AndroidRuntime(3660): at com.gen.check_failed_download(MainCategory.java:415) 01-01 02:34:21.499: ERROR/AndroidRuntime(3660): at com.gen.onCreate(MainCategory.java:119) 01-01 02:34:21.499: ERROR/AndroidRuntime(3660): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java: 1123) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] why my ListView didn't show?
the layout main.xml file ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:layout_width=fill_parent android:layout_height=wrap_content android:gravity=fill_vertical|fill_horizontal|fill android:id=@+id/brlayout HorizontalScrollView android:id=@+id/scrollview1 android:layout_width=fill_parent android:layout_height=wrap_content LinearLayout android:id=@+id/svlayout01 android:orientation=horizontal android:layout_width=fill_parent android:layout_height=wrap_content Button android:id=@+id/home android:layout_width=fill_parent android:layout_height=fill_parent android:background=@drawable/btn_home /Button Button android:id=@+id/parent android:layout_width=fill_parent android:layout_height=fill_parent android:background=@drawable/btn_parent /Button Button android:id=@+id/mutisellect android:layout_width=fill_parent android:layout_height=fill_parent android:background=@drawable/btn_multi_select /Button /LinearLayout /HorizontalScrollView ListView android:id=@+id/brListView android:layout_height=wrap_content android:layout_width=wrap_content / /LinearLayout the onCreate() func super.onCreate(savedInstanceState); setContentView(R.layout.main); //initView(); ArrayListHashMapString, Object listitem = new ArrayListHashMapString,Object(); for(int i = 0; i 10; i++) { HashMapString, Object map = new HashMapString, Object(); map.put(text_content, test content + i); listitem.add(map); } SimpleAdapter listitemadapter = new SimpleAdapter(this, listitem, R.layout.list_item, new String[] {text_content}, new int[] {R.id.mytext} ); ListView listview = (ListView)findViewById(R.id.brListView); listview.setAdapter(listitemadapter); I can not find the ListView, But When I chang the LinearLayout to TableLayout, the ListView show up. So What's the problem? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Input without suggestions
I'm writing a simple app with an EditText that I *don't* want android to change or suggest changes for misspellings. I've tried setting the deprecated autoText=false, and tried setting the inputType=text| textNoSuggestions in the EditText attributes in the layout file to no avail. I still get the helpful changes to correct what it thinks are misspellings. I've spent the morning looking at search results and trying things. It *has* to be simple, but I can't find it. (I was originally targeting minimum api 3, but changed to minimum api 7, and couldn't get it to work either way.) On another note. On my api-7 emulator, I always get the 12-key softkeyboard. On my actual phone, I get the qwerty soft keyboard. I'd like to be able to specify which keyboard. Thanks! Sorry if this is something I should have found! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Build-In Extensions
Hi, Just wondering, is that possible to build an extensions to build-in apps like contacts, or addessbook, so we could adding additional menu ? Thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] How to create custom buttons ?
How to create custom buttons? I need to create buttons in Parallelogram http://en.wikipedia.org/wiki/Parallelogramshape. Plz check the attached image. I can also modify the framework code if needed. Please help me how to approach. Thanks, Ramya -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=enattachment: img2.JPG
[android-developers] The server could not process your apk. Try again.
Hay guys, I have been struggling with uploading my application to android market. I keep getting the same old The server could not process your apk. Try again.. I tried for hours to change and modify my AndroidManifest.xml file but no luck. Here is my my AndroidManifest.xml : ?xml version=1.0 encoding=utf-8? manifest xmlns:android=http://schemas.android.com/apk/res/android; package=com.myapp android:versionCode=2 android:versionName=1.0.1 uses-sdk android:minSdkVersion=7 android:targetSdkVersion=7/ uses-sdk uses-permission android:name=android.permission.READ_CONTACTS/ uses-permission uses-permission android:name=android.permission.INTERNET/uses- permission uses-permission android:name=android.permission.MODIFY_PHONE_STATE/uses- permission uses-permission android:name=android.permission.SEND_SMS/uses- permission uses-permission android:name=android.permission.WRITE_CONTACTS/ uses-permission uses-permission android:name=android.permission.READ_PHONE_STATE/ uses-permission uses-permission android:name=android.permission.VIBRATE/uses- permission uses-permission android:name=android.permission.RECEIVE_BOOT_COMPLETED /uses- permission application android:icon=@drawable/app_icon android:label=@string/app_name android:debuggable=false activity android:name=.Main android:label=@string/app_name android:icon=@drawable/app_icon intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER / /intent-filter /activity activity android:name=SearchUnknownActivity android:icon=@drawable/web_search android:label=Search Unrecognized Callers/activity activity android:name=MuteListActivity android:label=Callers Black List android:icon=@drawable/mute/ activity activity android:name=RingListActivity android:label=Callers White List android:icon=@drawable/ auto_ring/activity activity android:name=SMSEditActivity android:label=Edit Auto SMS Replay android:icon=@drawable/sms/activity activity android:name=ManageSMSActivity android:label=Pre- made SMS messages list android:icon=@drawable/sms/activity receiver android:name=.PhoneReceiver intent-filter action android:name=android.intent.action.PHONE_STATE / /intent-filter /receiver receiver android:name=.BootReceiver intent-filter action android:name=android.intent.action.BOOT_COMPLETED / /intent-filter /receiver /application /manifest Please help!!! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Editing List Items individually
Hello This is a problem that I've been struggling with for a while and I would think it should be a simple process. I have a class that extends listactivity. I then load the list with text items and their corresponding id's using the setListAdapter(SimpleCursorAdapter). That all works fine. My question is how can I change the text color at position n? I think I should use the getListView().getItemAtPosition(n) function, but that only returns an object and I have tried casting it to various Android objects with no success. Also, if I want to change the text of a certain item in the list, do I have to change the Cursor and then call setListAdapter again or can I change the text directly using a similar approach as to changing the text color? I have tried for hours to solve this problem and if someone could even just point me in the right direction that 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] How to Properly Store Cryptographic Keys in Android
Hi, I am working with on an Android opensource project, and we have functions that use twitter, gmail, etc in behalf of the user, so we are keeping their login credentials the database. To keep the passwords safe from prying eyes, we are thinking of encrypting the passwords (or OAuth access token) in the database. I have checked out a couple of encryption algorithms and noticed that two way (encrypt- decrypt) algorithms require some kind of secret key or password. And I am having trouble thinking where to hide this secret key. Is there a way to keep this key secure even if our code can be read by the public (because it is open-source)? Or is there another alternative security measure other than cryptography? 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: Connect two android phones over 3g/edge
Yes, it could be because the two phones are behind different NATs. I did this years ago on two Blackberries on Cingular. I opened a ServerSocketConnection on the initiating phone, got the IP address/ port and sent it in an SMS to the other phone (which was also listening on a ServerSocket Connection on a well-known port). Today, I think you can probably register the app on the receiving phone to automatically wake up via some sort of Push Registry technology when it receives the SMS and then extract the IP address/port in the SMS and connect to the initiating phone. This worked because the two Blackberries were behind the same NAT. If your devices are not behind the same NAT, then your initiating phone needs to somehow obtain its public IP address to put into the SMS. There are standards for finding public IP addresses, such as STUN and NAT-PMP. On Jun 15, 7:34 am, Cairo ashca...@gmail.com wrote: I've tried this previously for iPhones and usually the network blocks outgoing ports, so you can only connect them via a server. On Jun 11, 4:50 pm, WuffIT Tech wuffi...@gmail.com wrote: I am new to this forum and I would like to throw out this question and hopefully someone can point me in the right direction. I am developing an Android application and I would like to setup a tcp/ip type of connection between two Android phones using the 3G/Edge network. My test version will establish a connection if I have both phones on a lan using wifi but when I use T-Mobile's network a connection is not established. Could this issue be a port or ip address? Thanks in advance.- 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] Google MapsAPI MyLocationOverlay causes ClassCastException
MyLocationOverlay myLocationOverlay = new MyLocationOverlay(this,mMapView); overlays.add(myLocationOverlay); myLocationOverlay.enableMyLocation(); This works on Android 1.6 device but throws a class cast exception on Android 2.1. 06-25 10:45:03.731: ERROR/AndroidRuntime(3903): Uncaught handler: thread main exiting due to uncaught exception 06-25 10:45:03.742: ERROR/AndroidRuntime(3903): java.lang.ClassCastException: android.graphics.drawable.BitmapDrawable 06-25 10:45:03.742: ERROR/AndroidRuntime(3903): at com.google.android.maps.MyLocationOverlay.getLocationDot(MyLocationOverlay.java: 180) 06-25 10:45:03.742: ERROR/AndroidRuntime(3903): at com.google.android.maps.MyLocationOverlay.drawMyLocation(MyLocationOverlay.java: 561) 06-25 10:45:03.742: ERROR/AndroidRuntime(3903): at com.google.android.maps.MyLocationOverlay.draw(MyLocationOverlay.java: 511) 06-25 10:45:03.742: ERROR/AndroidRuntime(3903): at com.google.android.maps.OverlayBundle.draw(OverlayBundle.java:45) 06-25 10:45:03.742: ERROR/AndroidRuntime(3903): at com.google.android.maps.MapView.onDraw(MapView.java:476) 06-25 10:45:03.742: ERROR/AndroidRuntime(3903): at android.view.View.draw(View.java:6535) 06-25 10:45:03.742: ERROR/AndroidRuntime(3903): at android.view.ViewGroup.drawChild(ViewGroup.java:1531) 06-25 10:45:03.742: ERROR/AndroidRuntime(3903): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1258) 06-25 10:45:03.742: ERROR/AndroidRuntime(3903): at android.view.ViewGroup.drawChild(ViewGroup.java:1529) 06-25 10:45:03.742: ERROR/AndroidRuntime(3903): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1258) 06-25 10:45:03.742: ERROR/AndroidRuntime(3903): at android.view.View.draw(View.java:6538) 06-25 10:45:03.742: ERROR/AndroidRuntime(3903): at android.widget.FrameLayout.draw(FrameLayout.java:352) 06-25 10:45:03.742: ERROR/AndroidRuntime(3903): at android.view.ViewGroup.drawChild(ViewGroup.java:1531) 06-25 10:45:03.742: ERROR/AndroidRuntime(3903): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1258) 06-25 10:45:03.742: ERROR/AndroidRuntime(3903): at android.view.ViewGroup.drawChild(ViewGroup.java:1529) 06-25 10:45:03.742: ERROR/AndroidRuntime(3903): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1258) 06-25 10:45:03.742: ERROR/AndroidRuntime(3903): at android.view.View.draw(View.java:6538) 06-25 10:45:03.742: ERROR/AndroidRuntime(3903): at android.widget.FrameLayout.draw(FrameLayout.java:352) 06-25 10:45:03.742: ERROR/AndroidRuntime(3903): at com.android.internal.policy.impl.PhoneWindow $DecorView.draw(PhoneWindow.java:1830) 06-25 10:45:03.742: ERROR/AndroidRuntime(3903): at android.view.ViewRoot.draw(ViewRoot.java:1349) 06-25 10:45:03.742: ERROR/AndroidRuntime(3903): at android.view.ViewRoot.performTraversals(ViewRoot.java:1114) 06-25 10:45:03.742: ERROR/AndroidRuntime(3903): at android.view.ViewRoot.handleMessage(ViewRoot.java:1633) 06-25 10:45:03.742: ERROR/AndroidRuntime(3903): at android.os.Handler.dispatchMessage(Handler.java:99) 06-25 10:45:03.742: ERROR/AndroidRuntime(3903): at android.os.Looper.loop(Looper.java:123) 06-25 10:45:03.742: ERROR/AndroidRuntime(3903): at android.app.ActivityThread.main(ActivityThread.java:4363) 06-25 10:45:03.742: ERROR/AndroidRuntime(3903): at java.lang.reflect.Method.invokeNative(Native Method) 06-25 10:45:03.742: ERROR/AndroidRuntime(3903): at java.lang.reflect.Method.invoke(Method.java:521) 06-25 10:45:03.742: ERROR/AndroidRuntime(3903): at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:860) 06-25 10:45:03.742: ERROR/AndroidRuntime(3903): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) 06-25 10:45:03.742: ERROR/AndroidRuntime(3903): at dalvik.system.NativeStart.main(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] Sharing SQLite Database between activities
Hey everybody: I'm in the middle of writing myself an app and have run into a problem concerning the use of the same SQLite database within multiple activities. I have one activity that is used to input and store data and multiple activities that need to then read that data. Within the first activity, it has no problem inputting the data into the database, but when I go to have the other activity read the data, it tells me the database is empty. Obviously I'm doing something wrong in my handling of this shared database. Right now, I have a DataHelper class that handles everything. In each activity, I create a DataHelper object which then calls the openOrCreateDatabase() method. I then close the database upon exiting the activity. Obviously this isn't the right way to do it. So, my questions is, what is the correct way to set up an SQLite database in an Android application and then access it in multiple activities? Any help you could give would be a huge help. Thanks! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] how to specify which soft keyboard appears
if application has EditText widget and user clicks on it, a qwertysoft keyboard appears. how do you get a numeric, 12key, or phone soft keyboard to appear instead. (I have searched documentation but I cannot find solution.) thanks for your help, John Brown -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Software Design Description
Dear all, My undergraduate project is to implement smart phone and i need to prepare report about Mobile Software Design Description . any one can help me? My regards , Abdelazeem Jibril -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] how to control which soft keyboard appears
Using this EditText definition in res/main.xml: EditText android:text= android:id=@+id/EditTextReading android:layout_width=10mm android:layout_height=wrap_content android:inputType=numberSigned /EditText When user clicks on EditText widget, a numeric version of the qwerty soft keyboard appears onscreen to allow input. In the enviornment this application will run in, a 12key number keypad or even a phone keypad with the larger keys would be better. Is there a way to cause a 12 key number keypad or the phone keypad to appear? Thanks, John Brown -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] How to detect is Activity started from Service
Hi all, I have small simple Service and big MainActivity with UI. Service is called periodically from AlarmManager. My Service need to know if MainActivity is on the screen and inform MainActivity about state changing. How can I do it? Thanks for any infornation, Tina -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: UDP Broadcast Receiver, work on old Phone, but not on new
I am seeing this same issue. Have you found a solution? On May 6, 2:01 am, marcomoel...@googlemail.com marcomoel...@googlemail.com wrote: Hi, I have written an app what is receiving UDP broadcast messages (via WLAN). It is running on an HTC magic (1.6) without any problems. But on a HTC Desire (2.1.1) or Motorola Milestone (2.0.1) we receive nothing. We tryed to send the broadcast by the phone it self, this is working on all phones... Has anyone a clue what could be wrong? Thx Marco here my code: --- DatagramSocket dsocket; try { dsocket = new DatagramSocket(BROADCAST_PORT); dsocket.setReuseAddress(true); } catch (SocketException e) { CDebug.getLog().log(Level.SEVERE, Could not open Backend broadcast listener, e); return; } // Create a buffer to read datagrams into. If a // packet is larger than this buffer, the // excess will simply be discarded! byte[] buffer = new byte[2048]; // Create a packet to receive data into the buffer DatagramPacket packet = new DatagramPacket(buffer, buffer.length); CDebug.getLog().log(Level.FINE, Open Backend broadcast listener on Port: + BROADCAST_PORT); dsocket.setSoTimeout(300); // max time the socket is blocked // System.out.println(open poard); // Now loop forever, waiting to receive packets and printing // them. while (true) { if (stopBroadcastListening) { dsocket.close(); return; } // Wait to receive a datagram try { dsocket.receive(packet); oneBroadcastReceived = true; } catch (SocketTimeoutException e) { // Debug // .getLog().info(Backend broadcast listener timeout); continue; } catch (IOException e) { CDebug .getLog() .log( Level.SEVERE, Could not read from Backend broadcast listener socket. close connection, e); dsocket.close(); return; } // Convert the contents to a string, and display them String msg = new String(buffer, 0, packet.getLength()); InetSocketAddress sender = (InetSocketAddress) packet .getSocketAddress(); // System.out.println(sender + msg); CDebug.getLog().log( Level.INFO, Receive Broadcast from + sender.getHostName() + : + msg); try {
[android-developers] Re: ListView - Row Background Animation
ListView recycles rows by calling getView(int position, View convertView, ViewGroup parent) in the ListAdapter. The convertView argument can be an existing view that will be moved to the new position. The ListAdapter will usually keep the convertView (instead of creating a new one) and modify it to display information for the new position. I am guessing that you are using a standard list adapter that doesn't know about your animations. You could subclass the ListAdapter and override getView() to make sure than any animations are in the appropriate state when the view gets repurposed. On Jun 25, 8:58 am, Daniel Lew danle...@gmail.com wrote: Back when I originally wrote my app, I thought I could use some tricks with TransitionDrawable to briefly highlight some rows in a ListView. However, when I actually implemented this (a fading background), the background would jump from item to item randomly. As my knowledge of Android has progressed, I've learned why this no longer works: the ListView uses optimizations and actually shuffles rows around, so the row that I may have originally told to animate ends up placed in a different spot by the time the ListView is visible. My question is whether there's a solution to this problem. I've thought of using a different view type, but that would only work if I can turn *off* the view type for that row at the right time; since I'm using a TransitionDrawable, there's no way for me (right now) to mark once the animation is done. Does anyone have any ideas on how to make a temporary fading background on particular rows in a ListView? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Shuttle component in Anroid ???
Hi, In my android application I need a shuttle widget ( picture of shuttle widget http://technology.amis.nl/blog/wp-content/images/reorderColumns3.jpg ). Can someone provide the code if you already have done it before?? If not suggest me the easiest way to implement it. I have pasted the widget's pic. below. [image: shuttle_widget.jpg] Thanks Shashidhar -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=enshuttle_widget.jpg
Re: [android-developers] Re: Avoiding GPL
As far as I recall, GPL3 closed the loophole on the specific case that Naveen outlined, as this was considered not in the spirit of GPL2. People were using remote connections get around the concept of binary linking. I only read one of the early drafts, not sure if that was in the final. On Fri, Jun 25, 2010 at 1:53 PM, Anton Persson don.juan...@gmail.comwrote: Well, to connect to a MySQL database you need a connector, and the connector library shipped with MySQL is under GPL. Which is what I meant. And, hence, corporations buy licenses from MySQL to avoid having to release their applications under the GPL. (If you still don't believe me, try explaining the reason why they HAVE a dual license model... If they only wanted to sell support and indemnification, a separate paid-for license would NOT be needed... See Red Hat for an example of how that works..) And; the INTENT of MySQL is that if you use the GPL version of the MySQL database, your application should also be GPL. But, of course, there are loopholes. However, using these loopholes in a way that is obviously a circumvention is against this INTENT. If you want people to respect YOUR intellectual property, you should respect others as well, and not exploit their software in an unintended manner. Regards Anton On Fri, Jun 25, 2010 at 10:04 PM, Fabrizio Giudici fabrizio.giud...@tidalwave.it wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 6/25/10 04:55 , Andy Savage wrote: I forgot to say in my previous post. In response to the person talking about MySQL. I believe this is quite different as MySQL is a completely self contained database system that other applications communicate with. As in, it's a completely GPL package, rather than a part of another application. If you actually incorporated the MySQL code within your application I believe it would break GPL (presuming your application was closed source). I am not sure how this applies to the MySQL libraries that are setup to use mysql say from PHP. This is correct, and I was referring to MySQL. The difference stays in that incorporating - as you said, if the two apps were still considered as two separate, collaborating apps it would be fine. On 6/25/10 09:39 , Anton Persson wrote: Not entirely true. Yes; a LOT of non-FLOSS (closed source) apps use MySQL.. But they do that by buying the non-FLOSS-licenses that MySQL _sell_. MySQL allows you to use MySQL with the GPL license as long as YOUR application is also using GPL. That is their idea, and that's why many prefer PostgreSQL. So, if you are using MySQL with the GPL license you are doing something MySQL doesn't want you to do. This is COMPLETELY incorrect. Corporates buy the paid license of MySQL because of support and indemnification. The GPL license CLEARLY says that a GPL application can be used without applying the virality when it runs in a separate process and is used by connecting with a socket (or other ways, such as clear API access points - otherwise, everything using Linux should be GPL as well, and clearly it isn't). - -- Fabrizio Giudici - Java Architect, Project Manager Tidalwave s.a.s. - We make Java work. Everywhere. java.net/blog/fabriziogiudici - www.tidalwave.it/people fabrizio.giud...@tidalwave.it -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.14 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkwlC9oACgkQeDweFqgUGxd1sgCgkmJuBWeEGzc50aATw08v/Uke Is0AoJ/o8RAoJ1XMTRvlWXQA3jM74sHQ =Q5fR -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Shane Isbell (Founder of ZappMarket) http://twitter.com/sisbell http://twitter.com/zappstore http://zappmarket.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
Re: [android-developers] Software Design Description
Yeah, read the manuals, research, use google, then do your assignment. Hope that helps. ;) On Jun 25, 2010 2:07 PM, Abdel_azeem Jebril knowsky2...@gmail.com wrote: Dear all, My undergraduate project is to implement smart phone and i need to prepare report about Mobile Software Design Description . any one can help me? My regards , Abdelazeem Jibril -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Software Design Description
On Fri, Jun 25, 2010 at 3:46 AM, Abdel_azeem Jebril knowsky2...@gmail.comwrote: My undergraduate project is to implement smart phone You have to implement a smart phone? Like build one? Sounds like a lofty project. and i need to prepare report about Mobile Software Design Description . OK. any one can help me? With what? You didn't really ask a question here, now did you? - TreKing - Chicago transit tracking app for Android-powered devices http://sites.google.com/site/rezmobileapps/treking -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Google MapsAPI MyLocationOverlay causes ClassCastException
On Fri, Jun 25, 2010 at 4:20 AM, Ka kasu...@googlemail.com wrote: This works on Android 1.6 device but throws a class cast exception on Android 2.1. See this thread: http://groups.google.com/group/android-developers/browse_thread/thread/43615742f462bbf1/f29ee0a153d98f93 http://groups.google.com/group/android-developers/browse_thread/thread/43615742f462bbf1/f29ee0a153d98f93 - TreKing - Chicago transit tracking app for Android-powered devices http://sites.google.com/site/rezmobileapps/treking -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Build-In Extensions
On Fri, Jun 25, 2010 at 2:12 AM, Hudar hudars...@gmail.com wrote: Just wondering, is that possible to build an extensions to build-in apps like contacts, or addessbook, so we could adding additional menu ? Only by creating your own firmware, or by porting the applications to use only the SDK and renaming them (see the K-9 project for an example of this, cloned from an early version of the Email application). -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.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: The server could not process your apk. Try again.
Just a guess but your package name com.myapp is probably not unique. /Richard On Jun 24, 10:36 pm, DBM yrd...@gmail.com wrote: Hay guys, I have been struggling with uploading my application to android market. I keep getting the same old The server could not process your apk. Try again.. I tried for hours to change and modify my AndroidManifest.xml file but no luck. Here is my my AndroidManifest.xml : ?xml version=1.0 encoding=utf-8? manifest xmlns:android=http://schemas.android.com/apk/res/android; package=com.myapp android:versionCode=2 android:versionName=1.0.1 uses-sdk android:minSdkVersion=7 android:targetSdkVersion=7/ uses-sdk uses-permission android:name=android.permission.READ_CONTACTS/ uses-permission uses-permission android:name=android.permission.INTERNET/uses- permission uses-permission android:name=android.permission.MODIFY_PHONE_STATE/uses- permission uses-permission android:name=android.permission.SEND_SMS/uses- permission uses-permission android:name=android.permission.WRITE_CONTACTS/ uses-permission uses-permission android:name=android.permission.READ_PHONE_STATE/ uses-permission uses-permission android:name=android.permission.VIBRATE/uses- permission uses-permission android:name=android.permission.RECEIVE_BOOT_COMPLETED /uses- permission application android:icon=@drawable/app_icon android:label=@string/app_name android:debuggable=false activity android:name=.Main android:label=@string/app_name android:icon=@drawable/app_icon intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER / /intent-filter /activity activity android:name=SearchUnknownActivity android:icon=@drawable/web_search android:label=Search Unrecognized Callers/activity activity android:name=MuteListActivity android:label=Callers Black List android:icon=@drawable/mute/ activity activity android:name=RingListActivity android:label=Callers White List android:icon=@drawable/ auto_ring/activity activity android:name=SMSEditActivity android:label=Edit Auto SMS Replay android:icon=@drawable/sms/activity activity android:name=ManageSMSActivity android:label=Pre- made SMS messages list android:icon=@drawable/sms/activity receiver android:name=.PhoneReceiver intent-filter action android:name=android.intent.action.PHONE_STATE / /intent-filter /receiver receiver android:name=.BootReceiver intent-filter action android:name=android.intent.action.BOOT_COMPLETED / /intent-filter /receiver /application /manifest Please help!!! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] How to get the version of installed apps
Hello all, How can I get the version information of the current installed apps on my phone. If I do : PackageManager packageManager = getPackageManager(); ListPackageInfo packs = packageManager.getInstalledPackages(0); int size = packs.size(); apps += \nTotal apps = + size+\n; for (int i = 0; i size; i++) { PackageInfo p = packs.get(i); apps += \nApp name: + p.applicationInfo.loadLabel(packageManager).toString(); apps += \nPackage name: + p.packageName; apps += \nVersion name: + p.versionName; apps += \n; } tv.setText(Installed apps:\n+apps); I get all the apps currently installed. I wasn't able to figure out how to extract their correspondent version information. Any suggestions? Thanks. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] How to fetch phone's phone number or unique ID
Hello, I wonder how could I fetch the phone's phone number or an unique id to identify it? Thanks. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] How to get the version of installed apps
On Fri, Jun 25, 2010 at 5:36 PM, Nando Android nando.andr...@gmail.com wrote: How can I get the version information of the current installed apps on my phone. If I do : PackageManager packageManager = getPackageManager(); ListPackageInfo packs = packageManager.getInstalledPackages(0); int size = packs.size(); apps += \nTotal apps = + size+\n; for (int i = 0; i size; i++) { PackageInfo p = packs.get(i); apps += \nApp name: + p.applicationInfo.loadLabel(packageManager).toString(); apps += \nPackage name: + p.packageName; apps += \nVersion name: + p.versionName; apps += \n; } tv.setText(Installed apps:\n+apps); I get all the apps currently installed. I wasn't able to figure out how to extract their correspondent version information. Use p.versionName and p.versionCode. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.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
Re: [android-developers] Sharing SQLite Database between activities
Hi I 'm working also with sharing database instances between activities, Post your code to help. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Picking up contacts: difference in behaviour between HTC and NexusOne - SDK 2.1-update1
Hi! Any news on this? I'm seeing the same - rather, one of my users is seeing the same on their Hero, and on my N1 everything works. Thanks, Jens -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Accessing APNs on the phone
Hello, How can I get the information on this phone regarding its number, carrier, etc? I have tried this: String names = ; Uri contentUri = Uri.parse(content://telephony/carriers/); Cursor cursor = null; try { cursor = getContentResolver().query(contentUri, new String[]{name}, null, null, null); if (cursor != null) { while (cursor.moveToNext()) { String name = cursor.getString(0); names+= name + \n; } } } catch (Exception ex) { //Handle exceptions here } finally { if (cursor != null) cursor.close(); } tv.setText(TestActivity:\n+names); But no success. I get on the emulator screen: Android TelKila -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] How to get the version of installed apps
Perfect, thanks! I had the VersionName before. On Fri, Jun 25, 2010 at 3:41 PM, Mark Murphy mmur...@commonsware.comwrote: On Fri, Jun 25, 2010 at 5:36 PM, Nando Android nando.andr...@gmail.com wrote: How can I get the version information of the current installed apps on my phone. If I do : PackageManager packageManager = getPackageManager(); ListPackageInfo packs = packageManager.getInstalledPackages(0); int size = packs.size(); apps += \nTotal apps = + size+\n; for (int i = 0; i size; i++) { PackageInfo p = packs.get(i); apps += \nApp name: + p.applicationInfo.loadLabel(packageManager).toString(); apps += \nPackage name: + p.packageName; apps += \nVersion name: + p.versionName; apps += \n; } tv.setText(Installed apps:\n+apps); I get all the apps currently installed. I wasn't able to figure out how to extract their correspondent version information. Use p.versionName and p.versionCode. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] How to fetch phone's phone number or unique ID
Hey Nando, You can get this through the TelephonyManager. You could so something like: TelephonyManager mTelephonyMgr = (TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE); String sDeviceID = mTelephonyMgr.getDeviceId(); String sSimSerial = mTelephonyMgr.getSimSerialNumber(); etc etc Remember you can't guarantee you will have those be unique. In the emulator they may not even exist. So account for that. And you will require the android.permission.READ_PHONE_STATE to use it. Hope that helps. -- Regards, Dana Epp Microsoft Security MVP On Fri, Jun 25, 2010 at 2:36 PM, Nando Android nando.andr...@gmail.com wrote: Hello, I wonder how could I fetch the phone's phone number or an unique id to identify it? 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
Re: [android-developers] Application is not installed on your phone error on Nexus One
Thanks Dianne! That seems to be the issue. For some reason that was set in the application/. According to the source control logs, that has been there since day one, generated somehow by Eclipse. I am surprised we never had this error before. Is Nexus One just more strict than other devices for this? I am wondering why none of the other devices in the field emmited this same behaviour. On Fri, Jun 25, 2010 at 12:41 PM, Dianne Hackborn hack...@android.com wrote: That is saying that your main activity has declared that it requires callers have the internet permission to invoke it. Check to make sure you didn't put android:permission=... for that activity. On Fri, Jun 25, 2010 at 9:38 AM, Dana Epp d...@vulscan.com wrote: Hey guys, I have an interesting problem I just can't seem to get through. I hung out yesterday in the IRC during office hours in hopes to find someone, but I guess the Google guys are swamped and couldn't make it. We have an app that we have tested successfully across 10 different devices on 4 different networks without a problem. However, our app will not work on ANY Nexus One devices, tested across 4 different carriers. The work flow is like this: 1. Via the browser, visit a URL to download the apk file OTA. 2. Install app. App shows up on the device. 3. Click the icon to run the app. An error occurs saying Application is not installed on your phone At this point, we can see the app is trying to run. LogCat shows the following interesting bit: 06-22 16:23:53.477: ERROR/Launcher(148): java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x1020 cmp=com.mycompany.TestApp/.TestApp } from ProcessRecord{44879720 148:com.android.launcher2/10016} (pid=148, uid=10016) requires android.permission.INTERNET The funny thing is, I have android.permission.INTERNET use-permission in the manifest, and no other devices seem to have a problem with the permissions set there. Anyone have any ideas WHY this behaviour is isolated to Nexus One devices? -- Regards, Dana Epp -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 -- Regards, Dana Epp Microsoft Security MVP -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Sharing SQLite Database between activities
So here's the basic idea of my code. Each activity that needs access to the database has its own instance of the DataHelper class. I do that with this statement: final DataHelper dataHelper = new DataHelper(this); The DataHelper constructor looks like this: public DataHelper(Context _context) { context = _context; dbHelper = new DBHelper(context); // dbHelper is an variable created outside of the constructor. DBHelper is a static class created within the DataHelper class as a subclass of SQLiteOpenHelper. } The DataHelper class has necessary instance variables such as an SQLiteDatabase (db) and a DBHelper (dbHelper. Then, in each activity that uses the database, I use the onResume() and onPause methods. The onResume() method has the following statement: dataHelper.open(); and here's the method for open() as declared in the DataHelper class. public DataHelper open() throws SQLException { db = dbHelper.getWritableDatabase(); return this; } and then I do this in the onPause() method: dataHelper.close(); public void close() { db.close(); } That's about all I've got. Hope it helps you help me. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Mapping (x,y) to (latitude,longitude)
Indeed, that example is exactly what I'm trying to achieve with my application. I'm just trying to get thoose coordinates now ;) Thank you very much for your help. On Jun 25, 2010, at 9:15 PM, Frank Weiss wrote: Exactly. You need to pass the neLatitude, neLongitude, swLatitude, swLongitude as query parameters to your back end web service, which then returns only POIs whose latitude and longitude fall within those bounds, like this Javascript Google Map does: http://myhome.bankofamerica.com/?findmlo=94114#/findmlo/94105 Notice that it even handles panning and zooming. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en Pedro Teixeira www.pedroteixeira.org -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: AIDL, Binder, ResultReceiver, and Performance
On page 267 of Android Application Development, the AIDL-generated code for APIDemos example is formatted for readbility and dissected, and shows how calls within a process get short-circuited and do not actually use IPC. Amazon doesn't allow posting links into Look Inside previews of books, but searching for aidl and proxy will get you there. On Jun 25, 4:08 pm, Mark Murphy mmur...@commonsware.com wrote: On Fri, Jun 25, 2010 at 3:50 PM, Dianne Hackborn hack...@android.com wrote: AIDL/Binder by design don't have a performance impact when making a call in the same process. This turns into a direct call on to the target's interface implementation. Ah! That's good to know. The big thing this introduces is a whole lot more effort and complexity for the developer, as they now need to deal with AIDL interfaces. At least that's hidden for ResultReceiver, which has the AIDL stuff baked in. If the purpose of this code (and I haven't looked at it to know) is to send a command to the service and get told later when it is done, then this is a reasonable approach. There are some potential edge cases where the result won't be delivered though (if the process is in the background and gets killed and its service restarted), so I would recommend giving it a PendingIntent to deliver a result to the activity rather than an interface to a live object. You can make this with Activity.createPendingResult(). :: scribbles furiously in notebook :: On the other hand, if the purpose of this is to tell the service about the activity running for it to know about and send information back during that time, it is bad because this is not the semantics of startService(). You want to use bindService() for that. Yeah, I haven't fully investigated the app, so I don't know precisely what your team's intentions were when they wrote it. But, this info is fantastic -- many thanks! -- 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 1.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
Re: [android-developers] how to specify which soft keyboard appears
setImeOptions(imeOptions) on your EditText On 24/06/2010 8:20 PM, john brown wrote: if application has EditText widget and user clicks on it, a qwertysoft keyboard appears. how do you get a numeric, 12key, or phone soft keyboard to appear instead. (I have searched documentation but I cannot find solution.) thanks for your help, John Brown -- Sincerely, Brad Gies --- Bistro Bot - Bistro Blurb http://www.bgies.com http://www.bistroblurb.com http://www.ihottonight.com --- Never doubt that a small group of thoughtful, committed people can change the world. Indeed. It is the only thing that ever has - Margaret Mead -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Sensor listeners - threads and responsiveness
You get them on the main thread, in my experience, unless you use the SensorManager#registerListener method that takes a Handler argument with a Handler created for a different thread. On Jun 24, 5:50 pm, kamiseq kami...@gmail.com wrote: hi, I have two questions about sensor listeners 1. from which thread are sensor values updated and should this be synchronized? can sensor's listener callback be a good place to call custom's view onDraw method? as this should be done from different thread. I cant find anything about it. In another words my problem is that I want to listen to sensors change and draw something on view surface but I dont know which thread (the main thread of the application??) is updating sensor's state 2. If I register sensor listener with SENSOR_DELAY_FASTEST my application is not responsive at all! Raw application with TextView only is not reacting to go back or home button! How should I deal with this or am I doing something wrong? thanks for help -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Sharing SQLite Database between activities
Well try to create all your tables in the onCreate method of class that subclasses SQLiteOpenHelper. Then when you call db.getWriteableDatabase(), if the database is not created, the onCreate() method gets called for you and then well you do not need to worry about a null database. On Jun 25, 3:37 pm, Ramsey Statz ramseyst...@gmail.com wrote: So here's the basic idea of my code. Each activity that needs access to the database has its own instance of the DataHelper class. I do that with this statement: final DataHelper dataHelper = new DataHelper(this); The DataHelper constructor looks like this: public DataHelper(Context _context) { context = _context; dbHelper = new DBHelper(context); // dbHelper is an variable created outside of the constructor. DBHelper is a static class created within the DataHelper class as a subclass of SQLiteOpenHelper. } The DataHelper class has necessary instance variables such as an SQLiteDatabase (db) and a DBHelper (dbHelper. Then, in each activity that uses the database, I use the onResume() and onPause methods. The onResume() method has the following statement: dataHelper.open(); and here's the method for open() as declared in the DataHelper class. public DataHelper open() throws SQLException { db = dbHelper.getWritableDatabase(); return this; } and then I do this in the onPause() method: dataHelper.close(); public void close() { db.close(); } That's about all I've got. Hope it helps you help me. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Mapping Multiple textures to a cube in Android OpenGL ES
Hi, I have just began opengl programming in android and i am fairly new to opengl as well. I've been using nehe's opengl tutorials as well as insanitydesign's android ports. I successfully managed to create a cube with a single texture mapped to all its 6 faces. I even mapped multiple textures to different faces of the cube. But the way I did it was to create 6 faces seperately, have 6 seperate index and texture buffers and then using glBindTexture() with the selected texture for each face and then calling glDrawElements. Isn't there an efficient way around this. Should i use a cube map texture instead of a GL_TEXTURE_2D? Any suggestions 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
Re: [android-developers] Re: Android libraries
that's really strange. If this happens again, can you check if you have the corresponding .class files in the bin folder of your project? Xav On Fri, Jun 25, 2010 at 2:10 AM, deg d...@degel.com wrote: I mean that it did not include the library classes at all. Somehow, even though all classes were visible at compile time (so the referring classes in the main app compiled without error), the library classes were not found at runtime, nor were they present when I spelunked into the .apk file. This presumably caused by some form of my operator error. But, it's not clear what I did wrong nor how I fixed it. (I'm still very much an Eclipse newbie). (That said, thanks for the auto-refresh tip. That will eliminate some other nagging annoyances I've had). David On Jun 25, 1:06 am, Xavier Ducrohet x...@android.com wrote: What do you mean by does not include the library classes? Does it not include the code at all, or does it seem to include an older version of it? If it the later, I think this may be due to how Eclipse handles the linked folder. For eclipse, the files inside src/ in the library is a different file from the one in the main project in the linked folder coming from the library. If you edit the one from the library, you have to refresh the main project so that it picks it up. I would change your workspace to automatically refresh, it's a lot safer/better/easier. It's in the preferences under General Workspace. On Thu, Jun 24, 2010 at 6:07 AM, deg d...@degel.com wrote: Thanks. It would be great if you could publish a roadmap of how the library feature will look in the future. For example, it would be great if library project could depend on another library project. (Yes, I know I can use an external jar instead. I'm doing that now, but the experience is not as smooth as I'd like). Also, per my original message, above, I sometimes see cases where an .apk compiles without errors but does not include the library classes. David On Jun 23, 8:03 pm, Xavier Ducrohet x...@android.com wrote: That's correct. At the moment the manifest of the library is only used to compile the resource of the library and figure out its package name, so it doesn't need to contain permissions, activities, services, etc... used by the library. However, all projects using the library must include those in their own manifest. In the future (hopefully not too distant) we'll be able to merge the content of the library manifest so that you don't have to do it manually for all projects using the library. Xav On Wed, Jun 23, 2010 at 8:52 AM, String sterling.ud...@googlemail.com wrote: On Jun 23, 11:06 am, deg d...@degel.com wrote: Also, what are the rules for AndroidManifest elements? - Does the main package or an Android library (or both) need to declare a uses-permission for something that happens in library code? - If a library implements a BroadcastReceiver should it be declared in its manifest, or that of the application (or both)? - etc. The library's manifest ONLY needs a manifest element with a package=com.mylibrary.packagename attribute. This isn't in the docs AFAIK, but was stated in a post on this group by the Android platform dev responsible for libraries. I can attest that I've done mine this way and it works fine. String -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Xavier Ducrohet Android SDK Tech Lead Google Inc. Please do not send me questions directly. Thanks!- 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 -- Xavier Ducrohet Android SDK Tech Lead Google Inc. Please do not send me questions directly. 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 -- Xavier Ducrohet Android SDK Tech Lead Google Inc. Please do not send me questions directly. Thanks! -- You received this message because you are subscribed to the Google
[android-developers] Re: Sharing SQLite Database between activities
Thanks. I did that though and I guess the real problem here is that my database is not getting transferred from one activity to the next. I can insert data into it in one activity (I know for sure that data is getting inserted). But then when I go to read the data from it in a different activity (a ListView that is supposed to be populated by the data in this database), there is no data in the database for that activity. So, I guess the real question I'm asking is: how do you make sure that the data gets transferred/is able to be used in multiple activities? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Sharing SQLite Database between activities
Well I just create a private instance of the helper class in every activity and then I get a database in a local variable using helper.getWriteableDatabase(); I think you can probably go to the sqlite prompt in adb using sqlite3 /data/data/package name/databases/database name try to query the database using select, if it doesn't contain any data well try to remove the database and try creating it again. On Jun 25, 4:34 pm, Ramsey Statz ramseyst...@gmail.com wrote: Thanks. I did that though and I guess the real problem here is that my database is not getting transferred from one activity to the next. I can insert data into it in one activity (I know for sure that data is getting inserted). But then when I go to read the data from it in a different activity (a ListView that is supposed to be populated by the data in this database), there is no data in the database for that activity. So, I guess the real question I'm asking is: how do you make sure that the data gets transferred/is able to be used in multiple activities? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] AIDL, Binder, ResultReceiver, and Performance
On Fri, Jun 25, 2010 at 1:08 PM, Mark Murphy mmur...@commonsware.comwrote: Yeah, I haven't fully investigated the app, so I don't know precisely what your team's intentions were when they wrote it. Not my team's app... I've not looked at the code, either. :} -- 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
Re: [android-developers] Application is not installed on your phone error on Nexus One
You just got lucky that other launchers requested the internet permission. Probably because people's custom launchers have all these widget things built into them that need to do networking, while for the platform we are pretty rigid about isolating things. On Fri, Jun 25, 2010 at 3:14 PM, Dana Epp d...@vulscan.com wrote: Thanks Dianne! That seems to be the issue. For some reason that was set in the application/. According to the source control logs, that has been there since day one, generated somehow by Eclipse. I am surprised we never had this error before. Is Nexus One just more strict than other devices for this? I am wondering why none of the other devices in the field emmited this same behaviour. On Fri, Jun 25, 2010 at 12:41 PM, Dianne Hackborn hack...@android.com wrote: That is saying that your main activity has declared that it requires callers have the internet permission to invoke it. Check to make sure you didn't put android:permission=... for that activity. On Fri, Jun 25, 2010 at 9:38 AM, Dana Epp d...@vulscan.com wrote: Hey guys, I have an interesting problem I just can't seem to get through. I hung out yesterday in the IRC during office hours in hopes to find someone, but I guess the Google guys are swamped and couldn't make it. We have an app that we have tested successfully across 10 different devices on 4 different networks without a problem. However, our app will not work on ANY Nexus One devices, tested across 4 different carriers. The work flow is like this: 1. Via the browser, visit a URL to download the apk file OTA. 2. Install app. App shows up on the device. 3. Click the icon to run the app. An error occurs saying Application is not installed on your phone At this point, we can see the app is trying to run. LogCat shows the following interesting bit: 06-22 16:23:53.477: ERROR/Launcher(148): java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x1020 cmp=com.mycompany.TestApp/.TestApp } from ProcessRecord{44879720 148:com.android.launcher2/10016} (pid=148, uid=10016) requires android.permission.INTERNET The funny thing is, I have android.permission.INTERNET use-permission in the manifest, and no other devices seem to have a problem with the permissions set there. Anyone have any ideas WHY this behaviour is isolated to Nexus One devices? -- Regards, Dana Epp -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Regards, Dana Epp Microsoft Security MVP -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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: Mapping (x,y) to (latitude,longitude)
Can you please show me or direct me to a code snippet on how does this work? Mine is simply not working... I haved tried: (considering my center of the screen to be the user position that I get from Location): Display display = getWindowManager().getDefaultDisplay(); int width = display.getWidth(); int height = display.getHeight(); String zoomlevel = Integer.toString(mapView.getZoomLevel()); GeoPoint topLeft = mapView.getProjection().fromPixels(0, 0); GeoPoint bottomRight = mapView.getProjection().fromPixels(width, height); GeoPoint center = mapView.getMapCenter(); And I have tried: int latSpan = mapView.getLatitudeSpan(); int longSpan = mapView.getLongitudeSpan(); GeoPoint mapCenter = mapView.getMapCenter(); int latitudeToEdge = mapCenter.getLatitudeE6() + (latSpan/2); int longitudeToTop = mapCenter.getLongitudeE6() + (longSpan/2); GeoPoint edgeLocation; edgeLocation.setLatitude((float)latitudeToEdge/1E6); edgeLocation.setLongitude((float)mapCenter.getLongitudeE6()/1E6); topLocation.setLatitude((float)mapCenter.getLatitudeE6()/1E6); topLocation.setLongitude((float)longitudeToTop/1E6); centerLocation.setLatitude((float) (mapCenter.getLatitudeE6())/1E6); centerLocation.setLongitude((float) (mapCenter.getLongitudeE6())/1E6); I guess I have no mathematical clue on how to set this :S On Jun 25, 11:46 pm, Pedro Teixeira pedroteixeir...@gmail.com wrote: Indeed, that example is exactly what I'm trying to achieve with my application. I'm just trying to get thoose coordinates now ;) Thank you very much for your help. On Jun 25, 2010, at 9:15 PM, Frank Weiss wrote: Exactly. You need to pass the neLatitude, neLongitude, swLatitude, swLongitude as query parameters to your back end web service, which then returns only POIs whose latitude and longitude fall within those bounds, like this Javascript Google Map does: http://myhome.bankofamerica.com/?findmlo=94114#/findmlo/94105 Notice that it even handles panning and zooming. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en Pedro Teixeira www.pedroteixeira.org -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to detect is Activity started from Service
You can define an Application subclass in your AndroidManifest.xml. Your other components can access the application from Context.getApplication(). You could have your MainActivity register itself with your Application class when it is active and unregister when it is stopped/paused. On Jun 25, 10:24 am, Tina tina...@gmail.com wrote: Hi all, I have small simple Service and big MainActivity with UI. Service is called periodically from AlarmManager. My Service need to know if MainActivity is on the screen and inform MainActivity about state changing. How can I do it? Thanks for any infornation, Tina -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to detect is Activity started from Service
Actually, the better way is probably the following (from http://developer.android.com/guide/topics/fundamentals.html#lcycles): The visible lifetime of an activity happens between a call to onStart() until a corresponding call to onStop(). During this time, the user can see the activity on-screen, though it may not be in the foreground and interacting with the user. Between these two methods, you can maintain resources that are needed to show the activity to the user. For example, you can register a BroadcastReceiver in onStart() to monitor for changes that impact your UI, and unregister it in onStop() when the user can no longer see what you are displaying. The onStart() and onStop() methods can be called multiple times, as the activity alternates between being visible and hidden to the user. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to change ClassLoader of Activity
So what Thread's ContextClassLoader for? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] ServerSocket problem
thanks for reply. It's not an IP problem, my real device and client computer are all connected to local network through a WIFI router, they can connect to each other directly. My phone has IP address: 192.168.0.176 and computer's IP is 192.168.0.126, assigned by DHCP. I found that if I establish any connection from my phone to computer before I start to listen on port, then my phone could be successfully noticed that there're incoming connections and of course, accept them. Why it has this strange network connection behavior? thanks a lot On Sat, Jun 26, 2010 at 1:27 AM, social hub shubem...@gmail.com wrote: do you know what's the ip address you got on the real device. There are chances the real device is on NAT network. In such a case you wont be able to talk directly to the device. On Fri, Jun 25, 2010 at 12:04 PM, Alex Xin xinxi...@gmail.com wrote: more on this problem... it works great in emulator, but always failed on real device On Sat, Jun 26, 2010 at 1:03 AM, Alex Xin xinxi...@gmail.com wrote: Hi, folks I'm now facing a very strange server socket problem, I have a server that will listen on a TCP port, I use the following code to do this work. public class RequestListenerThread extends Thread { private final ServerSocket serversocket; public RequestListenerThread(int port, final String docroot) throws IOException { this.serversocket = new ServerSocket(port); setDaemon(true); } public void run() { Log.v(FE, SMB Server Listening on port + this.serversocket.getLocalPort()); while (!Thread.interrupted()) { try { // Setup incoming client connection Socket socket = this.serversocket.accept(); Log.v(FE, Incoming connection from + socket.getInetAddress()); // Start worker thread Thread t = new WorkerThread(socket); t.start(); } catch (InterruptedIOException ex) { break; } catch (IOException e) { Log.v(FE, Network I/O error: + e.getMessage()); break; } } } } My target device is running on Android 1.6. When I run this code, it can start to listen on port but can't accept any incoming connections. When it runs into serversocket.accept function, it never return, just like dead lock. Does anybody has the same issue? How do you solve this problem? Thanks very much Alex -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Mapping (x,y) to (latitude,longitude)
New approach that makes more sense: int latSpan = mapView.getLatitudeSpan(); int longSpan = mapView.getLongitudeSpan(); GeoPoint mapCenter = mapView.getMapCenter(); int topLatitude = mapCenter.getLatitudeE6() + (latSpan/2); int bottomLatitude = mapCenter.getLatitudeE6() - (latSpan/2); int leftLongitude = mapCenter.getLongitudeE6() - (latSpan/2); int rightLongitude = mapCenter.getLongitudeE6() + (latSpan/2); But this values: int latSpan = mapView.getLatitudeSpan(); int longSpan = mapView.getLongitudeSpan(); are giving me 3600 and 0 :/ On Jun 25, 2010, at 9:15 PM, Frank Weiss wrote: Exactly. You need to pass the neLatitude, neLongitude, swLatitude, swLongitude as query parameters to your back end web service, which then returns only POIs whose latitude and longitude fall within those bounds, like this Javascript Google Map does: http://myhome.bankofamerica.com/?findmlo=94114#/findmlo/94105 Notice that it even handles panning and zooming. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en Pedro Teixeira www.pedroteixeira.org -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: How to change ClassLoader of Activity
On Fri, Jun 25, 2010 at 8:47 PM, James Wang jameswangc...@gmail.com wrote: So what Thread's ContextClassLoader for? Beats me -- can't even find it in the source code. All I know is that this question of replacing the system ClassLoader has come up before, and the answer was you can't, sorry, so I am taking that at face value. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.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] Preferred mechanism for shared access to a Sqllite database.
My initial version of my app used sqlite databases directly, opening and closing on create/destroy. However, I received occasional crashes with the message database is locked. I looked into it, and found that sqlite databases really only can handle one writer at a time. I had converted my service to be alarmManager fired, which resulted in a service spawned thread interacting with the database along with the UI. I've converted to a contentProvider model of database access to see if this would help centralize my data access. The data is all private, and all but one table would make any sense to anyone else. I have a few questions: 1) Does Android create a singleton instance of the contentProvider on the phone? If its used externally, I assume there is just the single instance in my app process. 2) Are accesses to the content provider done in a means not requiring synchronization? If I have a UI performing queries while a service is performing updates, will I run into any database locked errors? The database accesses inside the provider will be done transactionally, so I'm not worried about partial reads. 3) Is a contentProvider overkill for this? Would a properly synchronized singleton provide the same safety from locked databases without the overhead? Is there much overhead for content providers? 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: unable to access the user preferences
i am getting the correct result now, :) . Actually i was writing both the methods in the same onCreate() of the activity where i had to write the storing method in onPause() . Silly. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Mapping (x,y) to (latitude,longitude)
Pedro, I've been working on roughly the same thing today... see the thread MapView.getLatitudeSpan.. All you're running into is that the map isn't ready when you are asking for the getLatitudeSpan, so you need to wait until it is ready...OR... the formula I've come up with to calculate it is this : Note that I don't expect this formula is perfect.. and I can certainly make it more compact and faster by reworking it, but for working on it I wanted to do it step by step :). private class LatLonSpans { @SuppressWarnings(unused) public double LatSpan = 0.0; @SuppressWarnings(unused) public double LonSpan = 0.0; } private LatLonSpans getSpans() { LatLonSpans latLonSpans = new LatLonSpans(); Display display = getWindowManager().getDefaultDisplay(); int width = display.getWidth(); int height = display.getHeight(); int zoomLevel = mapView.getZoomLevel(); // zoomToPower times 256 should be equal to the pixels required to view the entire world // at the resolution I've set. double zoomToPower = Math.pow(2, zoomLevel - 1); // it takes 256 pixels to view the entire world at resolution 1, so this should be the pixels required to view the entire world // at the resolution I've set. double entireWorld = zoomToPower * 256; // Now I need to scale the zoomToPower to my screen size to figure // out what I'm really going to see. // // this is how many pixels to see 1 degree. double OneDegree = entireWorld / 360; // and for height we have x pixels minus 40 to account for top bars. so we will see this much of a degree. double heightSpan = (height - 40) / OneDegree; double widthSpan = width / OneDegree; latLonSpans.LatSpan = heightSpan; latLonSpans.LonSpan = widthSpan; return latLonSpans; } and I'm using it like this : if (mapView.getLatitudeSpan() == 0) { nvps.add(new BasicNameValuePair(latitudespan, String.valueOf(latLonSpans.LatSpan))); } else { nvps.add(new BasicNameValuePair(latitudespan, String.valueOf(latSpan / 1E6))); } Hope it helps... and if anyone can poke holes in my formula .. PLEASE DO... I'd love to know it doesn't work BEFORE I start relying on it. :). On 25/06/2010 5:55 PM, Pedro Teixeira wrote: New approach that makes more sense: int latSpan = mapView.getLatitudeSpan(); int longSpan = mapView.getLongitudeSpan(); GeoPoint mapCenter = mapView.getMapCenter(); int topLatitude = mapCenter.getLatitudeE6() + (latSpan/2); int bottomLatitude = mapCenter.getLatitudeE6() - (latSpan/2); int leftLongitude = mapCenter.getLongitudeE6() - (latSpan/2); int rightLongitude = mapCenter.getLongitudeE6() + (latSpan/2); But this values: int latSpan = mapView.getLatitudeSpan(); int longSpan = mapView.getLongitudeSpan(); are giving me 3600 and 0 :/ On Jun 25, 2010, at 9:15 PM, Frank Weiss wrote: Exactly. You need to pass the neLatitude, neLongitude, swLatitude, swLongitude as query parameters to your back end web service, which then returns only POIs whose latitude and longitude fall within those bounds, like this Javascript Google Map does: http://myhome.bankofamerica.com/?findmlo=94114#/findmlo/94105 Notice that it even handles panning and zooming. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en Pedro Teixeira www.pedroteixeira.org http://www.pedroteixeira.org -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Sincerely, Brad Gies --- Bistro Bot - Bistro Blurb http://www.bgies.com http://www.bistroblurb.com http://www.ihottonight.com --- Never doubt that a small group of thoughtful, committed people can change the world. Indeed. It is the only thing that ever has - Margaret Mead -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at