android

How can I tell reliably if my Android App is running on a device with JIT?

Is there a way to test, from within an android app, if the device it's running on is actually using the Froyo JIT? I ask because I know that 2.2 has a JIT, but we've already had a few test builds that seem to lack the JIT. So it's not a case where you can just test for the api version and be assured you've got the JIT. ...

How do I get a preference to correlate to a variable?

I have my menu button bringing up a Settings option, which brings up numerous ListPreferences such as weight and various sizes for glasses (it's a BAC calculator app). I'll pick one example... weight will work. Depending on how much you weigh it will affect your BAC. I have a int for Weight, set at 180. I would like someone to be able t...

[Android] ProgressBar inside SimpleAdapter

I'm trying to add a ProgressBar to my row.xml view but I can't seem to make it work I keep getting 06-09 12:44:44.802: ERROR/AndroidRuntime(1012): java.lang.IllegalStateException: android.widget.ProgressBar is not a view that can be bounds by this SimpleAdapter ArrayList arr = new ArrayList(); HashMap map = new HashMap(); map.put("pro...

Sticky Notes : Displaying reminders on home screen

I have developed an application which stores reminders and to do list activities. Now i want the to do activity of the day, say 'collect laundry' to be displayed on my home screen. How can one approach that? (Must not be notifications) ...

how to display bigger resolution images in android?

dear friends, referring to the code example of mine http://stackoverflow.com/questions/2997703/android-remote-image-getting-problem how can i accommodate bigger resolution images in android. when i try to display bigger resolution image from internet it give me null bitmap. any one guide me whats the solution? any help would be a...

having problem in finding north of android device

hi....I'm new to android.I'm developing an app in which I'm trying to find north direction of my device anyone who can solve my problem it would be great full.thanks in advance.. ...

How to solve the Problem in Eclipse IDE

I am adding some jar files into my application. At the time of adding jar's in Eclipse it gives the “Internal Error” alert. The error message dialog says: An out of memory error has occurred. Consult the "Running Eclipse" section of the read me file for information on preventing this kind of error in the future. You are recommended t...

Android VideoView LinearLayout.LayoutParams

I am playing a video using VideoView in my app. When I play it on Droid with linearlayout params FILL_PARENT, FILL_PARENT, it plays well. The same params do not work well for a myTouch. What params can I use that will work well with most devices? Thanks Chris ...

UTC date and time

Hi, How can I obtain the current UTC time and date using a gps location changed lsitener ? public void onLocationChanged(Location lastLocation) { lastLocation.getTime() } ...

Storing variables for app access

Hi there everyone. I'm kinda noob to android so please bear with me. I'm currently developing app which uses tabs. My question now is: how to store values of variables so I can access them on the other tabs? I want to create something similar to sessions in PHP where I can save variables on one page and access on the other. Please can so...

gps orientation in android

Hi I know that the function Location.getBearing() returns the bearing if any when in move public void onLocationChanged(Location lastLocation) { int bearing=lastLocation.getBearing() } ,so now bearing might be , 170 degrees..but, I'd like to know if there is anything in android that will give me the direction of the orient...

Android: Sending an Intent to Browser to open specific URL

Hi guys, I'm just wondering how to fire up an Intent to the phone's browser to Open an specific URL and display it. Can someone please give a hint? Is there also a way to pass coords directly to google maps to display? greetz, poeschlorn ...

Put an object in Handler message

Hi! I need to download an image from the internet, in a different thread, and then send that image object in the handler message, to the UI thread. I already have this: ... Message msg = Message.obtain(); Bundle b = new Bundle(); b.putParcelable("MyObject", (Parcelable) object); msg.setData(b); handler.sendMessage(msg); And ...

Immediately starting a new activity from an activity

When I was originally learning about Android a few months ago I swear I read something about a way to immediately launch an activity when starting a task. I am curious about this now because I need to display an intro screen on launch but I don't want the intro screen to be the root activity. Does anyone know if there is something like...

How can I display an array of Strings in a Spinner with Spinner.setAdapter ?

I have an xml layout file which contains a few widgets including a Spinner I want to display a list of strings in the spinner, the list is generated at runtime as a result of a function so it can not be in arrays.xml. I tried doing: String[] SpinnerItems = GetMyCustomItems(); ((Spinner)findViewById(R.id.MySpinner)).setAdapter(new Ar...

Get content uri from file path in android

Hi, I know the absolute path of an image (say for eg, /sdcard/cats.jpg). Is there any way to the content uri for this file ? Actually in my code I download an image and save it at a particular location. In order to set the image in an ImageView currently I open the file using the path, get the bytes and create a bitmap and then set t...

Android:Email: E/AbstractSyncService( 529): java.lang.NullPointerException occurs every time

Hi, I am working on Active sync in Android. I get "java.lang.NullPointerException" every time. Logs shows: Uncaught exception in EasSyncService java.lang.NullPointerException org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:453) at org.apache.http.impl.client.AbstractHttpClient.execute(Abstract...

Creating and using custom JAR in Android project

I am trying to create and use jar file in an Android project under Eclipse. I have tried various methods without any success. Here are the steps: Create jar file from the source files jar -cf lib.jar *.java Copy jar file to libs folder Right click, Build Path->Add to Build path Now, compiler gives unresolved symbols if I try to use a c...

Getting hardware floating point with android NDK

Hi All, I've begun playing with the android NDK. One of the things I've just learnt is about creating an application.mk file to specify the armv7 abi. I'm building the san-angeles example with the following parameters. APP_MODULES := sanangeles APP_PROJECT_PATH := $(call my-dir)/../ APP_OPTIM := release APP_ABI ...

Cursor postion comes to start of the edittext

Hi All, I have a small problem. In my activity i have a edittext and button. Clicking on button I am changing the inputtype of the edittext. Now whats when i click button the input type changes but the cursor goes to the begining of the text in edittext. Can i retain the same position of the cursor or can i bring the cursor to the end o...