android

ServiceTestCase<T>.getService ?

Hello there. I'm trying to build a valid junit testing suite on android. Since i'm new to Junit i can't figure out how to use the ServiceTestCase class. I can't figure it out how to get the getService() method working. it ever returns me null . So i decided to start it via startService. It does not work. Could you please help me ?...

Has anyone used Robotium or Calculon for testing Android apps?

Has anyone used Robotium or Calculon for testing Android apps? Are they useful? Any recommendations on which is better? ...

how to change text in android TextView

hi, i tried to do this: @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); t=new TextView(this); t=(TextView)findViewById(R.id.TextView01); t.setText("Step One: blast egg"); try { Thread.sleep(10000); } catch (Interrupt...

ItemizedOverlay animations on a MapView?

Hi, How do I make ItemizedOverlay animations on a MapView. After some searching it seems AnimationDrawable is the right way to go, but the following code only show the first frame, what else I need to do? AnimationDrawable animation = (AnimationDrawable)getResources().getDrawable(R.anim.animation); ItemizedOverlay overlay = new Itemiz...

Android: How can you specify where in your layout the software keyboard will appear?

Is there a way to specify in your layout which widgets will shift and move when the software keyboard appears? In some layouts, It will shrink the innermost scrolling area automatically, just making your layout smaller, but there doesn't seem to be a rhyme or reason to when it does this. How can I tell it which widgets to shrink, etc? ...

Can we dynamically check if npot is supported in android?

Is there a way to query if the OpenGL ES implementation on android supports non-power of two textures? ...

Querying Contacts DB w/ multiple synced accounts in Android

My Android app has a ContactsList activity in which I simply display a list of contacts that are on the phone. Only recently I noticed that my activity only displays contacts synced with my main Google account. I have two Google accounts on my test phone and ideally I want my activity to display the contacts for both accounts (or multi...

Can you connect Views to eventhandlers using XML?

Sometimes you want to start an Activity by pressing a Button. Is there a way to express that in XML? I.e. to tag the Button xml with the Activity to render when it is clicked? That would certainly be a lot quicker and slicker and shorter than writing the equivalent Java code to handle the event. Peter ...

Android app copy protection and data files

In my app, I access my sqlite database at the following hard-coded location in my code: /data/data/ com.mydomain.appname/databases/database.db If I turn ON copy protection in the Market Place, will my app still have access to this location? Or will I have to change it to something like: /data-private/data/ com.mydomain.appname/databa...

Starting a service on android platform

hi.. i am starting a service using startService(Intent intent) method. When i call this function it reaches to the onCreate of service but it is unable to call onStartCommand. Here is my code-- @Override public void onReceive(Context context, Intent intent) { // Send a text notification to the screen. Log.e("mudit", "Action: " ...

Can I make a rather native C++ app with Android?

I'm interested in the following features: Writing an app for Android Market that is written completely in C++ (a port of existing product actually). Use fast screen-buffer pixel pushing (or rather using OpenGL ES for this). Grab user input and direct it to C++ code. Is it legal to write such an app for Market? Is Market policy someho...

authorized net payment

I have to develop an application which do payment transfer.i have to send some important data from android to web using url.but data should not shown in url for security purpose .how i can do this? ...

Problem using ContactsContract.Data when query.

I am learning android developing. Well, my appwidget failed at this line: Cursor cursor = context.getContentResolver().query(Contacts.CONTENT_URI, new String[] {Contacts.DISPLAY_NAME}, Contacts.STARRED + "=0", null, null); May I know why? Thanks. Added: I have tried a few ways I used in Java to debug t...

Updating an application information using other applications (plugins)

I am doing a keyboard for Android. I am willing to have a plugin structure to allow users to improve the prediction engine. The prediction engine is done with Android NDK and it was coded in C. I have a wrapper class that calls the C code. An instance of this wrapper class is a field in the InputMethodService. The prediction engine gets...

android Facebook ApI. how to get?

hi all, how to import the fbconnect-android.zip in to my project in eclipse. thanks. ...

could not find class exception facebook on android app.how???

hi all, i am doing facebook app in my project. i followed this step the sample app in this link. http://code.google.com/p/fbconnect-android/downloads/list now i got this exception in my Logcat. 02-20 22:02:29.020: INFO/ActivityManager(58): Starting activity: Intent { cmp=com.example.brown/.Brown_FaceBook } 02-20 22:02:29.409: ERROR/...

Android: How to determine character index of a touch event's position in TextView?

I have a TextView with an OnTouchListener. What I want is the character index the user is pointing to when I get the MotionEvent. Is there any way to get to the underlying font metrics of the TextView? ...

Android: a vertical gallery?

I'm looking for a widget that behaves similar to the gallery widget but scrolls vertically instead of horizontally. I googled all around and apparently the answer is no such pre-made widget exists. So I said myself, oh well, I'll look at the gallery class in the android source and modify that to scroll vertically instead. Not so easy. T...

AsyncTask not accecable in Service

Hi there, i tried to figure out whats my problem, the last 3 hours! but without luck. Maybe someone else can help me. My app does the following: Activity1 starts Activity2 Acitivity2 starts a Service The Service uses a AsyncTask to download a file in the AsyncTask i have a piece of code like this: while ((status == 0)) { ...

Binding to Service in onCreate() or in onResume()

Hello, i want to know what es the best place in an Activity to bind to a service? I saw examples doing it in onResume() and also in onCreate(). I was asking myself if it is not a problem putting it into onCreate(), cause in onPause() i will do a unbind to the service, so i dont get a serviceConnectionLeak, if i leave the activity. Now i...