android

startActivity(intent) and resume to main activity?

Hi, I've got an app that creates an intent for the last.fm android app in which it will start the "recommended" station for my account when i press a button. The trick i'm trying to figure out is how do i get the phone back to my app without the user having to navigate back manually? Once it start the last.fm intent it takes you to the ...

android:layout_gravity="center_horizontal" in Java code

I have added a Button to a view in java code. Basically I want to add the xml android:layout_gravity="center_horizontal" to the Button but do this in Java code, how is this done? ...

Android GPS Provider

Hi, I'm developing an android application that involves the detection of the users' location. What I would like to know is, how does this -> LocationManager.GPS_PROVIDER work? Does it uses the GPS system in the phone or does it uses the mobile company's area network location? Whenever I turn on the GPS system in my phone, the map wou...

Setting camera intent to not add in EXIF data

Intent camera = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); //Using a File so it overwrites previous camera shot File pictureFile = new File(cameraImagePath); camera.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(pictureFile)); startActivityForResult(camera, TAKE_PICTURE); I'm using this code to ge...

how to get the device(android) tel number or other device unique id which can be taken from the system

I want to enter an website using the tel num as a password how do i get it using the android API is it possible ? or is there another key value on the android which is unique and I can ask him from the android system , android devices and therefore security is promised? ...

tabStripEnabled for TabWidget in Older API's

Hi Android 2.2 i.e API Level 8 has tabStripEnabled="true" for TabWidget how to achieve the same in Older versions of Android? ...

image uploading from android application to server using c# web service

Hi, i want to upload image to IIS server using c# web service.I have written the web method for this as follows... [WebMethod] public string UploadFile(byte[] f, string fileName) { try { MemoryStream ms = new MemoryStream(f); FileStream fs = new FileStream(System.Web.Hosting.HostingEnvironment.MapPath ("~/Transi...

POSTing a DateTime from Android to a WCF RESTful JSON Service

Hi, after hours of research I still haven't found any answer. I'm trying to send a DateTime as a Parameter to a Method exposed over a WCF RESTful Service with JSON encoding. The request looks like this: POST http://IP:PORT/LogService/json/GetLogEntriesByModule HTTP/1.1 Content-Length: 100 Content-Type: application/json Host: IP:PORT Co...

Zoom Control's on webview in Android?

Hi Folks, I have a two views. one is webview and another is a imageview. i set the auto zoom controls for the webview. like: webview.getSettings().setBuiltInZoomControls(true); i just changing visibility of both views using GONE and Visible. While changing my view form webview to image view, the zoom controls not lost is visibility f...

Programmatically checking item in ListView

Hi I need the way to check an item in ListView with choice mode SINGLE from my code. Simply cant't find the method needed. Thanks. ...

android voice recognizer not present

recently i upgraded from android 1.5 to 2.2.. now when i run the voicerecognition app it gives me the error "recognizer not present" is there a solution to this.. ...

intents and intents filter

How to send any message from one activity to anothere using intent and intent filters. ...

Black screen in inner preferenceScreen

My PreferenceActivity contains a nested PreferenceScreen in another PreferenceScreen and I'm applying a theme to my PrefenceActivity that changes the background color. However when I open the nested PreferenceScreen I get a black background and I cannot see the options. This happens with android 2.1 , but it does not happen with android...

Where and how can I find and download Android 1.5 source code?

Where and how can I find and download Android 1.5 source code? ...

How to add system permission file/system library to Android

I am attempting to follow Diane Hackborn's request: For a permission that allows an application to be root, it is okay to add the permission to the framework <...>. However, there still must be some kind of shared library (even if it is a stub) for the application to request along with it, and the package manager should n...

Android - Storing Audio Files into the SQLite Database

Hi Folks, I am developing an application for android phone, In this I need to use at least 400 audio file which can be played for some respective texts, Now my question is which is the optimized way to do this.. One solution is putting all the audio files in the resource folder and referring from there, this will n...

Android issue with Tab initialization

Hi, I have a problem with a tab view on android. I am using 4 xml layout files (each a RelativeLayout) as the content for tabs in a tab view. The main.xml contains: TabHost (@android:id/tabhost) containing a linearLayout which contains a TabWidget (@android:id/tabs) and a FrameLayout (@android:id/tabcontent) If I embedd the multiple...

Vim setup for Android development

Can anyone describe a good vim setup for Android Development? I'm using Eclipse for now but I would really like to use vim because it's faster and I like it better. I'm not interested in Eclim for example. I'm interested in what vim plugins are used (for java, autocomplete etc.), how the vimrc looks like and how the whole process of bui...

Problem regarding extending ListActivity

In my project whenever I extend activity it works fine but as soon as I extend ListActivity it throws exception and shows file not found. Why is that? We already know that ListActivity itself extends the Activity class. The application must run fine. Here's the java file: package com.android.feedGrabber; import java.net.URL; import ja...

How to call stopservice() method of Service class from the calling activity class.

Hi viewer! I am trying to call my service class's stopService() method from my activity. But I dont know how to access stopservice method from my activity class. I have the below code but its not working........... This is HomeScreen class: public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState...