android

android service and broadcast receiver questions.

Hello I have an activity that binds to a service and registers some callback methods. I would like for the activity to run for as long as the phone is on, the activity will bind register callbacks and unbind from time to time. Also I've got a broadcast receiver that starts the service on boot and another that checks in regular times if...

Setting up Proxy with "no proxy for" like feature of firefox

i guess ppl have created applications tp set up proxy settings externally, like on http://tipstir.the-talk.net/downloads-f19/wifi-proxy-settings-for-android-t225.htm. Is there any way to route the trafic through proxy in all cases except few urls...? I am referring to a feature on FireFox, which allows you to enter some IP addresses by ...

Display a numeric keypad on activity without an input area

I use the following code to pop up the soft input keyboard in my Activity InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); imm.getInputMethodList(); imm.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0); This displays the alphabetic keyboard. But I want to display the numeric keyboar...

Could not connect to SMTP host: smtp.gmail.com, port: 465

I followed this thread to connect to gmail to send email without user intervention: http://stackoverflow.com/questions/2020088/sending-email-in-android-using-javamail-api-without-using-the-default-android-ap I got my jars from: http://code.google.com/p/javamail-android/downloads/list I have checked my code over many times to insure co...

Displaying List View on Button Click in Android

Hi, I am creating an android application in which there are two activites. One activity contains a button. On the button click, i want to switch to other activity which displays a list view containing few options. Two switch between the screens or activities , i am using the following code Intent intent = new Intent(Activity1.this,Act...

Error inserting on Sqlite3 on Android

Hello. I have the following table on Sqlite3 on Android: Game ------ gameId That it was created with the following script: CREATE TABLE Game (gameId) INTEGER PRIMARY KEY AUTOINCREMENT);" When I'm going to insert data on table I don't put a value for column gameId. Doing this I get the following error: android.database.sqlite.SQLi...

android order sqlite table

I have a table called person and it contains two fields, name (TEXT) and age (INT). I want to sort this table alphabetically but I can seem to get the sql statement to work. The statement i am using is: SELECT name FROM person ORDER BY name; I have tried three different coded versions, none of which work. db.rawQuery("SELECT name FR...

Android ArrayAdapter Filtering problems

While working on this app, I wanted to use a Custom List Adapter so that I could style the list but the Filter functionality is not working. I got the basic filtering to work but the application crashes as soon as the list of filtered results is less than the number of listItems shown when I start filtering. There is also a second probl...

Set default Home app dynamically.

Can I set dynamically within an activity the preferred/default application that's to be launched when I push the Home key? If that's not possible, can I at least reset current defaults so that the chooser window re-appears? I tried to implement the latter by calling PackageManager.clearPackagePreferredActivities("com.android.launcher")...

To Check Sim Card is available in android device

Friend's I need help to check whether device have sim card by programatically.please provide sample code. Thanks. ...

stupid question regarding animationlistener and intent

What's best practice for structuring an activity, which should begin by displaying an animated image, and then move to another "activity" by intent when the animation is complete? I understand some of the basic principles, but I am getting lost on structuring the flow here. public class Scanimation extends Activity { //create nam...

Need help on sending SMS from Android device

Friend's anybody provide some sample code to send SMS from android device. Thanks in advance. ...

How do I draw a line in Titanium?

How Do I draw a line in Titanium that works in both Android and iPhone? ...

Using Android's build-in acoustic echo cancellation

Does anyone know how to use Android device's built-in acoustic echo cancellation? It is located somewhere in silicon and is used for GSM/CDMA speakerphone calls. We'd really like to tap into it for a VoIP application instead of rolling our own. Ben ...

Country-Specific EULAs for Android

The Android app EULA has to be part of the app and is generated using the eula class. It appears to be USA specific. Is there a way to automatically generate country-specific EULAs in Android? On the iPhone, iTunes does this automatically. Has anyone had any experience in this area? ...

Best fit the larger image into android device?

Hi, I have a larger image of 1024 x 768. When the image is displayed in the android device as the background image then it gets compressed. Is there any way that the image can be displayed properly in all screen resolution? ...

Table with varying column count and auto column widths

I want to draw a table/grid by specifying the column count for each row and draw some cells in different colors. A row should span over the whole screen. The column-widths should be the same for the columns for each row. I tried using TableLayout with View or Textviews, but I couldn't figure out how I can distribute the columns evenly fo...

Can't click on ListView whose rows are made of WebViews

Hi, I have an Activity which extends ListView The ListView that I use is an extension of ArrayAdapter and each row of the ListView primarily consists of a WebView The problem is that touching the WebView does not call OnListItemClick. Any thoughts on how I can be able to touch the webview and call OnListItemClick? Or is there something...

Android Game Framework

I'm a Flash developer looking to get into Android/iPhone game development. Android is more important to me, because I don't have any iOS device to test on, and I don't really like apple either :P (could you blame a flash developer for that?) What is a good game framework for developing android games? Multi-platform is always a huge bonu...

Android proper use of setId()?

I am working on a gauge set that will have multiple faces(views) of a gauge. Also the set must be able to be expanded or shrink according to use ie maybe a linkedlist. When I set the gauge/view thereof up with a hard coded xml id and put the gauge into a gallery, it kind of works. However, I need to add multiple of these gauges into the ...