See title for explanation.
Here is the method I'm using:
public Cursor getClientByName(String name) throws SQLException {
name = name.trim();
Cursor mCursor =
mDb.query(true, DATABASE_TABLE, new String[] {KEY_ROWID, KEY_NAME}, KEY_NAME + "=" + name, null,
null, null, null, null);
if (mCursor != ...
Hi,
Can someone tell me how to write an Android PerformanceTestCase using Intermediates?
I got the code snippet below for my activity and execute it via the adb shell:
adb shell am instrument -w -e perf true org.foo.test/android.test.InstrumentationTestRunner
My code:
public class PerformanceTest extends ActivityInstrumentationTestC...
I have a ListView that is controlled by a standard BaseAdapter.
When the user clicks a button, I want the ListView to Scroll into view the 100th record.
How is that done?
...
One of my users let the cat out of the bag and told me they were using one of my free apps, which is monetized by ads, but they were blocking the ads with an ad blocker. They told me this mockingly, as if I can't do anything about it.
Can I do something about it? Is there a way to detect that ads are being blocked?
...
I am trying to build an Android application which can take several photos taken by the camera, and merge them into one giant image. For example, I might take three photos and arrange them in a vertical stack for output as a single image. Ideally, I'd like to be able to keep the images at the original size. Unfortunately, using Bitmap.cre...
I created a custom OverlayItem class so that I could essentially have one kind of OverlayItem whose Drawable marker would set itself depending on the state of some data that I pass into it.
I have attempted to accomplish this by, on my first attempt, utilizing the setMarker method within the OverlayItem class. Once that did not work I ...
Hi,
I have a horizontal LinearLayout. This LinearLayout has a checkbox next to another LinearLayout. The layout width/height of the checkbox is wrap_content, whereas the inner LinearLayout is fill_parent/wrap_content. The layout_weight of the inner LinearLayout is set to 1.
I've tried to add some android:padding around the checkbox ...
I'm developing an application and I want to use android.text.util.Regex.WEB_URL_PATTERN as the pattern for the Linkify. But, as I have notice, I cannot import android.text.util.Regex for some reason.
Why so? Is there a way to workaround this?
...
In my android app, I would like to be able to limit the maximal resolution (or size in mb) of a picture being taken.
here is how i call the camera activity :
Intent intent = new Intent( MediaStore.ACTION_IMAGE_CAPTURE );
intent.putExtra( MediaStore.EXTRA_OUTPUT, Uri.fromFile( new File( mTmpFilePath ) ) );
intent.putExtra( "filename", ...
I have a source of data that changes from time to time. When it does I simply do:
mylistView.setAdapter(...)
which works fine and replaces the old data with the new ones. Thing is, I dunno if it is the right way to go. Is there any way to notify the view about the change in the data layer? Bear in mind I am not using a content provide...
Hi,
I would like to know if there is any URI or action to go to a calendar app loaded in the mobile.
The question is similar to http://stackoverflow.com/questions/3116147/intent-uri-to-go-to-favorite-contacts
...
Okay,
I'm and unemployed student and i want to make a game for one of adobe's mobile game contest for android phones and flash 10.1
Well, although i have cs4, i dont have cs5, and dont have the money to upgrade or buy a test phone.
So i was wondering is there still anyway to emulate testing on the android platform with flash 10.1 game...
I am trying to add a separate init file called init.Mine.rc that holds other services that I want to start myself. I am trying to import this from init.rc so that it will just run the stuff from init.Mine.rc but it doesn't seem to be doing anything. I am starting logcat from init.Mine.rc and its not even showing up when I do a ps. I k...
I everyone. I'm very new to Android development and I want to develop an application that uses a local database. I want to show the results of queries in a DataGrid like object.
The UI would be somewhat similar to this.
http://i5.photobucket.com/albums/y163/marco2530/img1.jpg
Is it possible to develop this kind of UI in Android? If so...
I've searched Google for this, but have only found similar examples--not exactly what I need. I simply need to start messaging (SMS) and email intents from my app with their "to" fields already populated. So I need to send a number with the sms intent and an email address with the email intent. Any help would be appreciated.
...
Ive read through the docs and searched on here, but Im not quite understanding how all the pieces fit together. Was wondering if anyone has a clear explanation of how to grab a single column of data from Contacts and have it populate an autocomplete box.
...
How to detect quickly if a specified URL contains an image in Android?
I have link of type http://foo.bar/w23afv so naive approach like checking end of URL string won't work here.
...
I have a main activity and a sub activity.
The main activity starts the sub activity using startActivity, and passes an object in the intent.
The sub activity reads the object out of the intent in its onCreate action.
The sub activity updates the object, then returns to the main activity using startActivity, again passing the updated obj...
I create a game board with squares. The size of each square (both height and width) is phone_pixel_width/number_of_squares to maximize the size of each square on the game screen depending on resolution (oh and I do not support mdpi devices, thus it does not get to small).
Now my problem is that I also write text in these squares. If I u...
Hi, is it possible to query a website's api from an android app? If so, how to do you handle the return if it's in xml?
Thanks
...