android

How to implement OMA forward lock on Android?

I'm working on an application that requires support for forward locking of media files on Android (1.6 and above). Of course, there appears to be no documentation in the APIs on how this might work. The two questions I have are firstly whether forward locking is supported on Android (and in which versions of the platform) and secondly h...

Access dev machine localhost via usb

My activity needs to communicate with a java server located on my dev machine. Actually, using the emulator, I can access the server socket via the special 10.0.2.2 address. Now I'd like to test my app on my phone connected via usb, but it seems like I can't use 10.0.2.2 to access my dev machine localhost anymore. Naturally using a wifi ...

How to get NEW width/height of root layout in onConfigurationChanged?

One of our views has a ScrollView as its root layout. When the device is rotated and onConfigurationChanged() is called, we'd like to be able to get the ScrollView's new width/height. Our code looks like this: @Override public void onConfigurationChanged(Configuration newConfig) { Log.d(TAG, "Width: '" + findViewById(R.id.scrollview...

Eclipse thinks there are problems with my Android project...

I have an Android project and Eclipse is telling me my project has an error with its build path. Specifically, the problem view shows "The project cannot be built until build path errors are resolved". The entire project builds just fine, meaning there are no red X's on any of the files. I can build the project outside of Eclipse, deploy...

Android development on windows 7

Has anyone tried to develop an android app on windows 7? It says that it isn't a supported OS, but sometimes that doesn't stop people from trying to develop on it anyways. ...

Issues with ACTION_HEADSET_PLUG broadcast in Android

I've tried these phones: Motorolla Backflip 1.5, Nexus One 2.1 Basically I register BroadcastReceiver to get ACTION_HEADSET_PLUG broadcast and look on 3 extras that come in intent: state name microphone Here is the description from API: * state - 0 for unplugged, 1 for plugged. * name - Headset type, human readable string * microph...

How to get reference of activity object ?

Hi i want to show messageBox or notification when connection lost in Static DB class but i cant use getApplicationContext() becouse its a static class and i tried to call other class called notification but i have error so how i could pass activity object to my new class . ...

How to install/replace on Android without using Eclipse

A buddy sent me a later version of a .apk file. I already had the earlier version on my device. When I tried to adb install the file, I got this: $ adb install ../FlashLite.apk 320 KB/s (18311 bytes in 0.055s) pkg: /data/local/tmp/FlashLite.apk Failure [INSTALL_FAILED_ALREADY_EXISTS] $ adb uninstall FlashLite.apk Failure $ adb ...

Android tabactivity problem

Hi, I'm having some difficulties getting the TabActivity to work. Here's the implementation of the class: public class Profile extends TabActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); final TabHost tabHost = getTabHost(); if (tabHost.isEnabled()) { Log....

Reporting Android Application Crashes

I've noticed a couple of Android applications that seem to be using a 3rd party crash reporting tool. Has anyone seen this screen and do you know where I can find it? I started using http://code.google.com/p/android-remote-stacktrace/ but i rather not require internet permissions if I can use an intent to send emails. ...

How to do loading dialogs in Android?

Those dark spinning progress dialogs in the Amazon and Engadget apps - are those standard in Android? ...

Update an Android market app to lower sdk?

I have an app on the market that requires sdk 2.0 I want to rewrite and publish it using 1.6 to find a wider audience. The question is: if I update my already published app with an sdk downgrade to 1.6 will it then show up to users with phones at 1.6? I know currently the market search shows my app only to those that have 2.0 phones. ...

Advantages of different tab layouts

When developing for android what are the benefits of using tabs to hold views or hold separate activities. I've read that both ways are better, but can't seem to find any good resources suggesting why or when to use each method. ...

Using Guice to inject dependencies into an Android activity's constructor

Does anybody know of a way to use Guice to inject dependencies into the constructor of an Activity in Android? It looks like activities normally have only the default constructor so that the platform can easily create a new instance. While it is easy enough to have a singleton to reference the injector and get dependencies that way it ...

Using a Context Menu to delete from a SQLite database in Android

Hi, I have created a list view that displays the names and dates of items stored in a SQLite database, now I want to use a Context Menu to modify these items stored in the database such as edit the name, delete, and view. This is the code for the list view: public void onCreate(Bundle savedInstanceState) { super.onCreate(saved...

Set android datepicker date limits

I am using datePicker in android to display images based on user selected dates. I need to limit said dates to certain days for instance Jan 1st 2010 to Dec 31st 2010. Simple as that i thought but no where can i find the answer on how to limit these dates. Does anyone know how to limit the dates for Android DatePicker ...

Can anyone explain what features of the C runtime in Android (via NDK) are not supported?

More specifically, does NDK have a complete STL implementation. We're looking at this for devices running 1.6 and upwards. ...

When i runing my android app I got error

When i running Android App i got fallowing error.. [2010-03-27 02:47:28 - HelloAndroid] Connection with adb was interrupted. [2010-03-27 02:47:28 - HelloAndroid] 0 attempts have been made to reconnect. [2010-03-27 02:47:28 - HelloAndroid] You may want to manually restart adb from the Devices view. How can i fix this.. Thanks Atul Yad...

How to schedule heavy work for later display for Listviews?

I have a listview with 200 items. I use a custom view for each row. There is a code that takes some time to calculate, and because of this the list hangs out on scrolling and loads in slow (2-3sec). I have subclassed SimpleCursorAdapter, and using Filterable and SectionIndexer. I have in mind to show initially the name of the record,...

Sync data between android app and computer

I am wondering if there is an easy way to sync data/communicate between a computer app and an android app without using some sort of web service? ...