android

How to implement callbacks using IntentService on Android?

If it must implement with AIDL? And please kindly provide an example, thanks. EDIT: There are several solutions, Does anyone know which is better? ...

Is it possible to place a viewflipper and sliding drawer in the same screen

Is it possible to place a viewflipper and sliding drawer in the same screen ...

Is there a path similar to file:///android_asset/ that points to the apps directory?

I'm using a WebView to open some files saved to the app. Is there a way to link to the app's directory where files saved at runtime would be, in a similar way that file:///android_asset/ does? By link I mean loadUrl( *path* ) and also in the HTML markup of the file being opened <img src="*path*" /> As oppose to using an absolute path ...

Android: How to read a number as int from a String; basically to read Text of a ListViewItem?

Hi, This is my problem. I have a ListView, each row is a CheckedTextView. The list view items are "1", "2" and "3". When a ListItem is clicked, I want to read the number and assign it to an int variable. I did the following to read the Text of the clicked item: onItemClick(AdapterView<?> parent, View v, int position, long id) { ...

Utility Classes in Java Programming

Hi All! I am new to Java and I referred regarding my question on the Net but not quite Satisfied. I want to know what the "Utility Class" in Java is? Can anybody please tell me with an Example. Thanks, david ...

How can i simulate accelerometer in android emulator?

please help i dont have an android phone write now.But in my application i need to use accelerometer values... so i need an a simulator capable of it... please help thanks in advance ...

Android ContentProvider Uri Matching

I am trying to create a content provider where the key contains forward slash "/". I searched about it for quite a while but there is no place/example illustrating it. content://com.lily.provider/items/* General example, which I understand: content://com.lily.provider/items/ab What I want to do: my key is a string with "/" content:/...

how to create an iphone-like search for android

How to create an iphone-like search for android? I could not alter the standard search android. Is it possible? I decided to make a my custom widget. Have any ideas how best to do this? ...

[Android] How to avoid history of activity.

Hello All, I have total 3 activities. First activity(A) starts second activity(B). From Activity B, 3rd activity(C) is called. Activity B, shows list with checkbox to select items and single OK button. On clicking OK button Activity C is called with selection. When user clicks BACK button in Activity C, by default Activity B is displ...

touch events on images in grid android

heres the code iused to make grid view..how to add click vents on images so dat image can be flip.pllzzzzzz helpppp public class GameScreen extends View { private static final String TAG = "Touchimage"; private Game game; public GameScreen(Context context) { super(context); this.game = (Game) context; setFocusable(true)...

create a android contactList view?

Hi i am trying to create a basic contact list that has same functionality has the native one i.e. arranged in alphabetical order and have the scrolling thumb tab on the side to scroll through letters. How do i create that scroll tab thing? i will use some sort of sorting algorithm to sort my contact list in order so that should be fine ...

TabWidget overlapping the tab content

Hello In my TabHost activity, I want to show an ImageView below the selected tab (the ImageView overlaps the tab content). What would be the best solution to do this? I was thinking that creating a custom tab widget that can overlap the child activity layout may be a solution. Thank you in advance! ...

Create a new file in Android emulator path /data/...

Hello! I want to create a file in emulator android storage path /data/... but it seems I can't create a new file by programs, I should upload an empty file to /data/... and then write the file, Can anyone help here? openFileOutput("file.txt", MODE_PRIVATE) seems can create a new file in /data/data/Package/files/... but it can't cre...

Issues with GLUtils.texImage2D and Alpha in Textures

Hi all I'm successfully generating my textures using GLUtils.texImage2D, but when I use the textures generated I get problems with my alpha: they are darker than wanted. after having checked several things I finally got the the conclusions that the problem comes from GLUtils.texImage2D(GL10.GL_TEXTURE_2D, level, bmp, 0); I created a s...

What android widget is this?

Hi, does anybody know what android widget/view this is: i want to be able to implement a similar widget for my own needs but i dont know what kind of view/widget it is. All i see is that it is embeded on the ContactContract class as a quickContact object. Anyone used one of these and customized it? if so, how? Thanks in advance edit...

When is the best time to destroy a thread associated with a custom view

I developed a small custom view and it uses a thread trigger some animations. I need to know when is it the best time to release this thread. maybe a method I need to override, or and event I need to listen two. Thanks ...

Can I pass different types of parameters to an AsyncTask in Android?

I want to implement a generic, thread save class which takes the RessourceId of an ImageView and the Url (http) where the desired image file is stored. It'll download the image and fills the src of the ImageView in the UiThread. I thought AsyncTask would be the best thing for me. However I noticed that I only can pass one type of parame...

how to implement alphabetic scroll bar in android

hi all, i wanna implement alphabetic scroll bar in contact application, just like inbuilt contact please help me out it this one.... P.S: contacts are added displayed as ListView.... ...

How to detect android front camera programmatically

Hi. Can anyone tell me how to check if the android phone has a front camera too? I'd tried to use some help form https://docs.google.com/View?id=dhtsnvs6_57d2hpqtgr but Camera camera = FrontFacingCamera.getFrontFacingCamera(); sometimes works sometimes not. Any help please? ...

Double rows in a listview with ArrayAdapter (Android)

Hi everyone! I'm new to android programming and I would like some help. I have the following code: Object[] list_cities = parsedData.getCityname().toArray(); Object[] list_countries = parsedData.getCountryname().toArray(); // Display the available locations list_search.setAdapter(new ArrayAdapter<Ob...