android

Android - getting data from a server

I've read lots about using local storage for android but how would I connect to an SQL database online to send and get data? For example, if I was making a game and wanted to create a worldwide high score table, how would I store that online and make sure it was only available to that app? Thanks, Jon ...

How to retrieve data from cursor class

I need to know how to retrieve data from cursor. I need this because the ringtonemanager returns all the audio files in form of cursor object, I need to know how to retrieve the values. Anbudan. ...

How to get metadata from a picture ?

I am browsing the web but no way to find how to get metadata from a picture. Does anyone has an idea ? I can't see anything in the Bitmap/BitmapFactory/BitmapFactory.Options documentation that would give me a hint. I would like to retrieve standard information such as : name date it was taken dimension size and maybe more. Any ...

Displaying a long string in a spinner without cutting

Hello! In my current app, if the string is too long and doesn't fit into screen it gets cut. How to display rolling text for long strings in a spinner(i have seen that in some apps)? ...

Determine the contents of Linux Cache

On a Linux device (using Android [Eclair] with a 2.6.29 kernel), I seem to have some contents in my cache that never go away. I would like to be able to examine the contents of my cache to find the culprit. I've looked at mount for any tmpfs that may be causing it, but they are taking up very little space. What other types of things co...

How can I handle package names better while building a suite of android applications

I'm building a suite of applications, meaning that I have a single set of code that gets customized via a single change of an API key. This means that all of the applications have the same activities, same behaviors, but different icons, package names, and application names depending on the client I am building for. Unfortunately, I hav...

How to use the same receiver for different widget

Hi, I wonder if it's possible to use the same provider (receiver) for 2 different widget (different sizes for example) I tried on my Manifest : <receiver android:name=".provider" android:label="@string/app_name_small"> <intent-filter> <action android:name="android.appwidget.action.APPWIDGET_UPDATE" /> <...

Android use of an string array on another method

Hi all. Im trying to make an activity that has a multiple choice dialog after you push a button. In there you select from a list of things. But these things are received from a web method before the dialog appears. So I create a string array after I receive them inside the onCreate to initialise it there with the correct size. But my di...

How to access the database when developing on a phone?

I am having trouble accessing the database while I am developing on the phone. Whenever I execute cd /data/data/com.mycompck/databases then if I try to run ls I get opendir failed, Permission denied Or whenever I type in: sqlite3 I get sqlite3: permission denied What I am doing wrong? Are there some applications that can help me ge...

Problem finding GPS location on Droid

Hi all.. i am working on an application that needs to find GPS location of the user. While testing my code on Droid i am unable to find the GPS location. While googling i found this link to an issue raised with Google. But apps like Yelp can find the GPS location on droid. Is there a workaroud to find the user location on a device? Her...

RelativeLayout does not shrink in height

Hi, I cannot get my relative layuot view to shrink when using it in the follwing layout, used as a dialog. In below example the scrollview always expands to fill the entire dialog which looks very ugly if there is not much actual content. I have tried most combinations of fill_parent, wrap_content etc without success. The problem seem...

debugging android app to the phone

I've gone through this page: http://developer.android.com/guide/developing/device.html, My manifest has <application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="true"> My phone has Menu -> Settings -> Applications -> Development -> USB Debugging checked I have gone to the control pane...

How to access all the children of a PreferenceScreen ?

I'm trying to programmatically uncheck all the CheckBoxPreference children of a PreferenceScreen in my app. How can I do that? ...

Android: How to get product info after barcode scanning?

Alright, so I'm trying to write a program for Android for a project for school, I figured out how to use Intents to scan, but once I find a product, how do I get that info into my app? For example, say I'm getting info from upcdatabase.com, I would just add the barcode number to the end of the url, but then how to I draw that data in? Th...

Layout Problem on Bigger resolution Phone like Nexus one?

dear friends, i have created application using layout font sizes in "pixels" font and other layout looks fine on HTC hero and Motorola Droid but in nexus one which is bigger resolution phone every thing is messed up. for example , i have used font 18px which is bigger size in HTC Hero and Motorola but in Nexus one it is looking very ...

Any workaround to save an Intent in settings?

Hello all, Hope you will understand my question with my basic english... In my application, I allow the user to have a button that launch the application of his choice. I get no problem to make a list of all installed apps, get the Intent and launch the choosen app. But I would like to save the corresponding intent in the settings for...

Android: how do I define an attribute for a custom widget?

Looking at Mark Murphy's excellent example at http://github.com/commonsguy/cw-advandroid/tree/master/Views/ColorMixer/ you can see where he's defined a custom widget called ColorMixer. ColorMixer has an attribute named "initialColor" declared in attrs.xml. In the constructor for ColorMixer, he obtains the attribute value as follows: ...

Is it possible to have an Android build.xml that supports 1.5, 1.6 and also supports different screen densities?

I know that I can have Eclipse build for 1.5 and 1.6 SDKs for different screen densities if I have the following snippet in AndroidManifest.xml <supports-screens android:anyDensity="false"/> <uses-sdk android:minSdkVersion="3" android:targetSdkVersion="4" /> and if I set up my assets in the following manner in res folder: /res/drawab...

Why isn't my bundle getting passed?

I'm trying to pass a bundle of two values from a started class to my landnav app, but according to the debug nothing is getting passed, does anyone have any ideas why? package edu.elon.cs.mobile; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.view.View.OnC...

Minimal example wanted showing texview incrementing a count on a timer?

In c it would be: while(1){ i++; printf("%d \r",i); } I assume the textview and the variable and the timer get created in oncreate, then there is a timer handler with an increment and a settext and a sleep? Seeing how to do this in androidese would really clarify things I think. Thanks. ...