Skip to main content

Posts

What event Asus Transformer calls in Android, then docking or undocking the tablet?

I have problems with my app on Asus Transformer TF101, with keyboard. If i dock it to keyboard (or undock it) during displaying a activity, the activity is recreated. That means: onDestroy is called. onCreate is called. Is it possible to catch the event that user is undocking or docking? I would like to show a warning message, save the data and finish the activity.. Problem background: In my case, it changes the data in edittext fields, then user undocks or docks. I have created a tablelayout with edittexts fields, like editable datagrid. On Asus it messes up, then undocking, the system recreates the activity and all data in datagrid is rewritten automagically. All rows become like the last row. I assume that system does the redraw by ID's, but i have inflated the rows into datagrid, so the edit fields in rows have same ID's.

Android tether, enable USB and LAN connection

I tether my 3G connection from my Android to my work PC but when I connect it, I lose connection to all my work things like database, mail, communicator, etc. I saw this question but I can't figure out how to route it, my route print is like this: The IP that gives me the Android app is 10.0.0.1 (Tether application by ClockWorkMod) Thanks for your help.

Android app widget with dynamic text rows

How to implement such an app widget? User can select how many data rows to show through the widget configuration. The problem is that on different devices TextViews have different sizes and the widget itself has different sizes too. Even when device orientation changes the widget change its size too. So I don't know how to determine how many text rows fit the widget in current conditions and how to put a text in a bottom of the widget.

Android auto installation

We want to install our application on to (thousands of)phones and these phones will be later delivered to clients. Do we have to do this manually? Is there a faster way to do this? For example, in Windows Mobile, if you put your installation files in a certain folder on SD card and when you insert that SD card to the phone the app is installed automatically to the device. Any similar mechanism on Android? Thanks in advance.

Create a Mobile Agent using Jade for Android

I first heard of JADE around 4 months back. Recently, I stumbled upon a link that confirmed the release of JADE for Android . I have gone through the various JADE tutorials for creating agents. However, I don't know how to go about creating a mobile agent for the Android platform. Can anyone who has worked with JADE in Android, tell me how should I create a simple mobile agent for the Android platform? Any tutorials , links would be appreciated. Thanks in advance

Android phonegap app : unable to retrieve an image taken by the camera using my own code (not phonegap"s)

Note- even though im using phonegap, the question is not about some issue in that. Hi, im developing a android app. my app is using phonegap 1.3. mi problem... Im using phonegap apis to take a picture and display it in my app. But whats happening is due to some reason the os kills my app after the camera is launched, so that after the photo is clicked, my app is relaunched and it doesnt get the info abt the taken picture. As a workaround to this problem ( the problem ), i designed a phonegap plugin which on app start checks if the app had crashed while taking a picture (some flags in code), and if it is restarting after crash, it retrieves the Pic.jpg taken by the camera and tries to displays it. The problem is that its not able to get the right image, or even a proper .jpg file for that matter. mi code... Phonegap makes an intent to start the camera and passes the uri for the Pic.jpg that it creates into that intent which it passes to startActivityForResult. In

ThreadPoolExecutor for running AbortableHttpRequest - how to call abort?

I'm running a networking service in android where I direct all my http requests to run and get callbacks from the service when the requests are complete. I run the requests in a ThreadPoolExecutor to limit the number of concurrent requests. As the requests run within the pool, they eventually create an HttpGet or HttpPost, both of which indirectly implement AbortableHttpRequest , which allows one to cancel the connection (say, if it's blocking for a long time). If a user cancels a request, I'd like to somehow drill into the thread queue and call the abort routine for that request. If, for example, a web site is not responding and the user chooses to do something else, right now my only option is to wait for the standard 5 minute http timeout to occur for that hung request before that thread is freed up. If I could access the thread that has my request and call abort, that would free things up right away. From what I can understand, it appears once my request has gon