I have an SQL lite database that I am trying to copy to the device. I was able to copy it to the emulator easily using DDMS however with the protection in the device, I cannot access the database files from the DDMS perspective.
I read many attempts here but couldn't find an easy solution.
Is there any way to attach the database (let's say named 'proj') and replace the currently created database proj in he device files?
I did a search beforehand, but couldn't find an answer to this question.I downloaded the LITE version of Gensoid. I know it says save states are only available to the full version, but I assumed the in game save would work. I tested it immediately (didn't want to get into a game and not be able to save at all) and to my dismay it didn't work. I emailed the dev and he confirmed that even in game saving is not available on the lite version. Kinda makes the LITE version totally useless doesn't it? Anyway, my real question is if there is a way to get the emulator to save without paying 3.50 for the full version? I know what many people will say/think; "It's only $3.50, just buy it." But there are plenty of free emulators out there for PC, not sure why I would pay for one on my phone.
After using every browser imaginable for the Droid X, I think I've finally settled on one that works the best. Stock, Dolphin HD, Opera and Skyfire all look a little sluggish compared xScope. Throughout most of the other threads suggesting apps and browsers I rarely saw this one get more than a cursory mention, so I thought it would be nice to point everyone towards another option. I'm currently using the lite version, but I'm more than likely going to pony up for the paid to help out the developer and unlock some features.
I'm trying to pop up an AlertDialog when someone long presses a list item.What I end up with is nested callback objects.I'm not sure if that is the problem but simple Alert dialog examples are not working for me.
When I installed the latest version of Android on my Droid, my Swype stopped working (again!). When I re-installed it now it says I have to upgrade Swype as the trail is over. I looked on their web site, butI don't see any way of upgrading. Is there a way around the need to upgrade or how do I get the upgrade?
The classic version of Google works just fine. But the mobile version does not work. It comes up, I input an item to search, but then the search function doesn't work. The "hot key" if that is what it is called - the one one the face of our phones next to the back button works fine, too.
Has anyone gotten the free version of where working yet? I have the apk but can't install because it says its already installed. I REFUSE to give ATT three bucks a month for something other carriers allow for free. I have not rooted this one yet because I wanted to make sure I wasn't going to have to exchange it.
I'm having trouble getting the GPS's onLocationChanged to run on a different thread. I understand how to manage UI thread when I'm calling a function but with the GPS, I don't actively call the function.
My intent is to have a light flash every time the GPS receives a reading. I have put this function in a Runnable. I passed this function to a class that implements LocationListener. Then in the main class, I started a new thread that calls requestLocationUpdates. I was hoping that onLocationChanged of the LocationListener would run in a different thread, post to the callback and make the necessary UI effects in the UI thread. Unfortunately, the program crashes every time it tries to call requestLocationUpdates. What's the proper way of doing it?
Right now it looks something like this
The exception says Can't create handler inside thread that has not called Looper.prepare()
I have been watching the Google I/O presentation by Virgil Dobjanschi on the correct way to implement REST on Android with services and content providers. http://code.google.com/events/io/2010/sessions/developing-RESTful-android-apps.html
Based on the video I'm doing things the wrong way, which is not surprising given how hard the right way is. Anyway, having been shown the promised land in the video I'm having a bit of a problem figuring out how to get there.
I have most of it nailed but the one thing that's defeating me is the Binder Callback that Virgil references in the slides (see link above), on page 43 it shows step 2 as starting the service with startService( intent ) and step 10 as returning status information using a Binder Callback. There is no example code anywhere in the presentation which is rather frustrating. There is talk of open sourcing the Twitter client which apparently uses this approach but nothing yet and the announcement was in April.
In the video he states: "What is a binder callback? A binder callback, think of it as an interface that was passed in the request intent."
I have searched all over the place but have not been able to find any doc or examples that show how to pass a callback as part of an intent. Nor can I figure out any other way of passing in a callback.
I thought he may be referring to binding to the service and implementing the callback that way. However, he is specifically referring to a local service and using strarSerice() and not bindService(). Also with bindService() the service will be destroyed if the activity is destroyed which defeats the idea. The workaround is to use startService() and then bindService() and leave the service running for the duration. The other problem with bindService() is that the callback can not be use until onServiceConnected() completes which complicates the code even further as the action instructions can not be passed in the intent because the return callback may not be in place in time to return the results.
Our application will expose a Service that can be called by Activities in other people's applications.In many cases, the parent applications calling Activity may be paused before our Service completes. I am looking for the best way for a Service to communicate back to the calling Activity that may have been paused.These are the known options:
(1) Require calling Activities to have a registerReceiver() with a custom action and broadcast to that from our Service. The only way to secure this registerReceiver() is with a signature-based permission.As our Service communicates with any number of unknown 3rd party apps,we can't sign our Service's parent app with all these unknown certificates. These apps would therefore be exposing an unsecured registerReceiver() on their Activity. Would ideally like to avoid requiring this.
(2) Create a PendingIntent to send results back to the activity and give it to our Service. Our Service would send data to calling Activity's onActivityResult(). Each time the result is delivered, the calling Activity will go through onPause() and onResume() but this should be OK.
(3) The calling Activities could create a Handler. The Activity would then create a Messenger pointing to that Handler and send it to our service. Our Service can then use the Messenger to deliver our message back to the calling Activity.
in android application development, i frequently go through the word "CALLBACK" in many places. i want to know want it means to tell us technically. and how i can manage the callback of the applications.
I am working on an application in Android and I have to manipulate the data coming from the preview.
I read that the default frame rate is 15fps. I measured the time from one call of the onPreviewFrame function and the next one and I noticed that I got different times depending on the size of the preview (at the moment no other operations are done in this function). How can it be possible? I thought it would be called at any frame so 15 times in a second (approximately every 66ms) independently of the previewFrameSize.
I'm trying to create a simple multiplayer game. There's a WorkerService which is supposed to handle all network communication and all interaction between this service and my Activities is done with AIDL. I think this is a standard approach - to enable two way interaction I use also an IWorkerCallback interface (also AIDL).
The problem is that callbacks have to change things in UI which may be done only in UI thread. I've created a Handler (in UI thread) and believed that this is an obvious solution. But, surprisingly, it's not working.
My LoungeActivity calls startServer() method of IWorker interface. Corresponding method of my WorkerService does some job and makes a callback - this works fine. Then WorkerService spawns a new thread and callback from this thread results in a bad Exception being thrown:
Can't create handler inside thread that has not called Looper.prepare()
Here's some code to make it clear:
Every method from callback looks like that:
In Handler's handleMessage() method I'm doing a simple switch(msg.what) and in every case there's a simple UI modification (showing a Toast, changing Text, etc.)
I have no idea why is this Exception thrown.. I've managed to fix it by packing code into a Runnable and calling runOnUiThread() but it still makes me curious - shouldn't a Handler always run in thread that created it?
I am making twitter application in which i open browser for user authentication and i pass call_back URL when launching authentication browser.
Problem is after authenticating it is calling again oncreate of TWitterShare class instead calling onNewIntent method, why is that ? my another class working fine i am unable to find difference any idea by looking at the following ocde why it is calling oncreate again ?
I was trying to find out were my apps memory was being leaked and was able to discover that when calling registerCallback(...) it would lead to a memory leak after a screen orientation change. What could be some possible things that are causing the leak? I've tried many things. And I do have a unregisterCallback(..) call.
I have an activity class(Application Class ) which calls a service class(Service Class) and closes. The service class takes about 5 seconds to complete its task and calls a method which is present in another class(Callback Class). Now according to the result, the callback needs to notify the Application class.Once i get the callback from the service, I tried calling a method defined in the Application class. In this method i create a new intent of Application class and call startActivity(Application Class). But this is not working. Can anyone tell where i am going wrong and what can I do to solve this issue.