android

android receive Data_Sms

My android app sends a Data sms. All the phones are able to receive that message except my android. I have added a broadcast receiver in the manifest: <receiver android:name=".SMSReceiver"> <intent-filter android:priority="10"> <action android:name="android.intent.action.DATA_SMS_RECEIVED" /> <data android:sc...

about Lunar lander in Android (inner class)

hi, I am very new to android. Also very new to java, so please feel free to give me any advice, I would very appreciate it. the question is in lunarlander.java /** A handle to the thread that's actually running the animation. */ private LunarThread mLunarThread; /** A handle to the View in which the game is running. */ private Lunar...

Android: using StreetView without starting an intent

Hello all, I'm working on a simple android app in which I want to, once the user has clicked a button on the main screen, display the streetview of known coordinates. I can create display a map like so: mapView = (MapView) findViewById(R.id.mapView); mapView.setBuiltInZoomControls(true); mapController = mapView.getControl...

how to insert xml file into sql lite database

I have some problem with android application in my application i have to use sql lite as a database but i have the data in XML format. so i am facing problems in inserting the data into database. ...

How can i query the contacts content provider outside an activity?

I'm trying to query the Contacts content provider outside an Activity. But managedQuery is a method of Activity. Is there any other class/method that I can use instead of managedQuery? Here's my code: class MyActivity extends Activity { private Cursor getContacts() { Uri uri = ContactsContract.Contacts.CONTENT_URI; String[] projec...

AdMob Ads not displaying

Hi all, I'm adding AdMob ads (say that five times fast) to my finished, published Android app. I added the code from the PDF included with AdMob, following their instructions to a tee. The test ads show up fine on my emulators and specified test devices. They just don't appear in the published marketplace app when you download and run it...

To close or not to close?

... that's the question. In last days I'v got very often many error messages because of database leak in my application, so now I open Database, get query results from it and close DB again. But I use also a cursoradapter for my autocompletetextview. Should I also do it on that way there: open DB, get cursor, close DB?! I mean, I hav...

How can a code in a library project call code in the application project?

In an effort to reduce duplication, I have my app's workspace split into 3 projects: Main (A library project, where all of the common code lives) Free (To make the free version) Paid (To make the paid version) Behavior in the free version and the paid version must differ sometimes. How can I "call into" the final projects from the l...

get a small list when clicked on a button

hello guys, i have a image view and on top of it i have a button. now what i want is when i click on the button i should get a list of images on same Activity.actually i am trying to make a list in button,s onClick event. event gets fired but it does not show the list. anybody can have any idea how shall i achieve this i am also making ...

How do I get the .apk url of an android app in the market?

I have an HTC buzz, which has a smaller screen (QVGA) than most android phones. Now there is an application (hyves) which is in the market but when I scan their QR code or try it via appbrain it keeps saying Not Found. A frien of mine (who now is in belgium) has a G1 and I've copied the APK when he installed hyves. The app itself works f...

Api for drawing chart in android

Hi all, is there any api for drawing financial chart in android... Thanks in advance. ...

Android EmailProvider

Hi, Is there a way to access the EmailProvider class via reflection? thanks! ...

How to create Custom AutoCompleteTextView in android ?

Hi all, I want to display List of Contact Names with the respective phone numbers like Vikas Patidar <9999999999> Rahul Patidar <9999999999> using AutoCompleteTextView when a user type text in the mobile number field. In default style i can only display the list of names. Can anyone please tell me how can I imple...

How do I add a custom view to ViewFlipper

I have a ViewFlipper defined that contains 3 views... <?xml version="1.0" encoding="utf-8"?> <ViewFlipper xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/flipper" android:layout_width="fill_parent" android:layout_height="fill_parent"> <include android:id="@+id/first" layout="@layout/first_view" /> <includ...

Android Content provider

Hi, I want to get a code of content provider which a database is created. I am using the tool which located here tools/sqllite3.exe to check if the database is created. Please let me know the step by step procedure for this thing ... Thanks, -D ...

Android Service restarts randomly.

I'm trying to write a Service which sits and waits for SMS messages (using a BroadcastReceiver which the server registers) and will take some action depending on the details of the SMS message. I use an Activity to startService() and stopService() for the Service. After I close the Activity, the Service continues to sit there with its ...

Common tasks in Activities methods - how to organize them?

I have some common actions fired in onPause() and onResume() methods. (Like registering and unregistering BroadcatsReceivers) Now I put them in abstract classes and extend Activity classes. After creating some abstract classes with common actions I end up with situation when I can't extend Activity because of Java's lack of multiple in...

parser problem in android

Hi friends, I am getting the value from web server .I am getting the value as string can anybody tell how to convert to string to xml file and where to store the xml file in android and how to access the file parse the value can any body give example any help would be appreciated Thanks in advance ...

Activity starts Remote service, Starts another activity and finish() initial activity. Is this a problem?

My initial activiy is basically a splash screen while preforming initialization and login in to network server. To save memory I want to finish() the splash activity once it starts the main menu activity. I still want the remote service to operate. Testing shows it does. But am I going to get into trouble doing this? I know I can re...

Android/Java very small problem

The code is like this: private DatabaseHelper mOpenHelper; @Override public boolean onCreate() { mOpenHelper = new DatabaseHelper(getContext()); System.out.println("done"); return true; } Now ecliplse is showing me an error warning on the first line of this code "private DatabaseHelper mOpenHelper",...