android

Is it OK to create multiple threadpools (ExecutorService)?

I created multiple ExecutorService instances in my code, usually each UI page has one ExecutorService instance. Each ExecutorService instance will execute some http get request threads. private ExecutorService m_threadPool = Executors.newCachedThreadPool(); Is it OK to do that? The problem I met is that sometimes the http get request...

Problems with MediaRecorder class to record audio - prepare() gives an exception - Permission denied

Hello everybody, I'm new in Android development and I have the next question/problem. I'm playing around with the MediaRecorder class to record just audio from the microphone. I'm following the steps indicated in the official site: http://developer.android.com/reference/android/media/MediaRecorder.html So I have a method that initial...

INSTALL_FAILED_MISSING_SHARED_LIBRARY

I keep getting this when I try install my app to the real phone. E/PackageManager( 67): Package com.mobile.prototype requires unavailable share d library com.google.android.maps; failing! The problem is solved when I use the google API emulator. The problem what is my app is eventually going to run on a phone and not an emulator. A...

What is the fastest way to scrape HTML webpage in Android?

I need to extract information from an unstructured web page in Android. The information I want is embedded in a table that doesn't have an id. <table> <tr><td>Description</td><td></td><td>I want this field next to the description cell</td></tr> </table> Should I use Pattern Matching? Use BufferedReader to extract the information...

MapView: application crash on launched

Hello, I'm trying to display a map using that rotates according to the phone's orientation. I have rewrite a part of the google sample to use a SensorEventListner instead of a SensorListener. My Problem is when I try to use the findViewByID() method to display the map my application crashes on start. If I use MapView(Context, String) to...

Android Show MediaController

I am adding MediaController to a VideoView, but it does not show up unless I tap the phone. The controller disappears after a while. Is there a way I can have the MediaController show always? Thanks Chris ...

Android - Convert Button to TextView at runtime

Is it possible to convert a Button into a TextView onclick during runtime? Thanks Chris ...

How to get the file name from the intent?

This is my manifest file. After using intent filter i download the ics file from the mail attachment. When i open the downloaded file it start my application. I need to get the file name and data of the selected file in my application. What should i do in the manifest and the java file. I am very new to android can any one help me???? <...

how to encrypt data in android?

Hi, i am new to android. i am trying to learn and work on it.can some one help me with the following issue. i have some fields to be encrypted and uploaded to the DB using android. the fields which should be encrypted are DOB,Email id, Phone number and some othe numeric value. now i am doing some formal encryption by substitution. Can so...

How to prevent volume keys and camera key from waking up phone in Android?

I have an activity that I want to show up when the phone goes to sleep. However, the phone wakes up when I press the volume buttons or the camera button. I tried using the dispatchKeyEvent(KeyEvent event) method, but it doesn't prevent the phone from waking up. How else can I disable that functionality? Thanks, ...

Dealing with Android devices without MENU key

I'm told by some users that my Android app is not usable because their device does not have a MENU key. What's the best way to deal with these devices? Is it possible to detect if the device lack a MENU key and show a menu button only in this case? And most importantly, how do you test this in the simulator? Thanks. Edit: Apparently ...

Ad Mob on Android Problems

I tried to ad admob to my app but it would not request anything from the site. I followed all of the directions but in the logs I could see that a request went to api.admob.com but that was the end of it. It seems as if nothing was returned. I tried test mode and regular mode and got the same results with both. I guess my question is, ...

i want send image through using mms in Android

i Am working on Multimedia app... so i am capturing one image through camera and sending image and sms to some other numbers... but i am not getting how to send image through mms... ...

Using a custom typeface in Android

Hi, I want to use a custom font for my android application which I am creating. I can individually change the typeface of each object from Code, but I have hundreds of them. So, Is there a way to do this from the XML? [Setting a custom typeface] Is there a way to do it from code in one place, to say that the whole application and all...

Check WiFi and GPS isConnected or Not in Android?

I would need to check the wifi is on or off in the phone at the runtime? if it is not connected, i want to show dialog and goto directly Setting/Wireless Controls to enable it by user. its for both wifi and Gps staus of the phone. How to do it? which intent to wake for this? Any idea? ...

Access controls within custom alert dialog in android

When displaying custom dialog box which is showing textView and EditView. How can i access these elements within dialog. Below is the code which is giving error. LayoutInflater factory = LayoutInflater.from(this); final View textEntryView = factory.inflate(R.layout.alert_dialog_text_entry, null); return new Alert...

How to make theme of application configurable by user

i want to add themes to my android application. In the application, users will have options to changes theme of the application. Please help how do i implement this kind of structure to my application. Any help, tutorials, guidance are highly appreciated. thanks.. ...

ORM on android SQLite and database scheme

I'm looking for a very simple ORM framework working on Android for sqlite. I've been testing activeAndroid but none of the example could ever build on Eclipse. By the way, how do guys implements a "many to many" relationship in sqlite for android ? How do you reflect the cascade regarding deletion of rows and guarantee the database integ...

How to open a new screen at the time of accepting the alert?

My first screen has the alert message when I accept the alert I have to show the next screen and pass some values to that screen to show that values.I am very new to android. new AlertDialog.Builder(this) .setTitle("File accept!") .setMessage("Do you Want to open "+name+" file !!") .setPositiveButton("Open", new DialogInterf...

Android, Using the hardware compass.

Hi Guys, I can't find much information out there on Android's hardware compass. I keep trying to setup my criteria to force Android to use the hardware compass. Basically my problem is I want the bearing to update even while the device is stationary. From my understanding the GPS will only update your bearing when your moving. I'd like...