android

touchend event doesn't work on Android

Hi, I've just started looking at doing some basic mobile web development on the android and an writing a test script to investigate the touch events. I've run the following code in the android emulator, and the touchend event never gets fired. Can anyone tell me why ? I've tried in three versions of the emulator (1.6, 2.1 and 2.2) and...

Are string resource ID values guaranteed to be consistent over different projects?

I have some messages being passed back from my server through php. The problem is that the messages are in English and if the user is using another language they will still get the message in English. So I had an idea that maybe instead of passing back the message I would instead pass the String resource Id from the android app, that w...

How to add icons to the android context menu?

How to add icons to the android context menu? ...

Problems when handling orientation changes

Hi all, I need to handle orientation changes in my Android application. For this purpose I decided to use OrientationEventListener convenience class. But his callback method is given somewhat strange behavior. My application starts in the portrait mode and then eventually switches to the lanscape one. I have some custom code executin...

How to correctly populate records from SQLlite in ListActivity?

Hi. Can someone please tell me how can I easily display every record from sqllite in ListActivity tab? I'm kinda confused with this. Do I have to create db from my helper class in TabActivity or ListActivity or both? My db helper class is as follow: package tabs.app; import android.content.ContentValues; import android.content.Context;...

Using Navteq maps in Android

1.Is it possible to NOT use Google Maps in Android? 2. Can we use Navteq maps? 3. What will it take to write such an application? 4. Do we have to come up with our own version of MapView? Pointers and links that can answer these questions and help me get started on 4. are welcome. Thanks. ...

Compile android project to apk without eclipse

What I have done is I have taken the class-files from my eclipse project and run them trough an optimizer/obfuscator. So I now have optimized class-files that I want to get in the form of an apk so I can sign and publish it. However, I am lost on how to do this. I guess I cant just copy them into the bin-folder of my eclipse-project, bec...

how to remove phone from contact

I want to remove the phone tab from android contacts application. How can i do this? Also how can i rotate the focus on contacts different tabs means when focus reaches on the last last tab of contact when pressing keyboard it should focus on first tab. ...

Enable GPS without forwarding the user to "settings"?

Hi Guys, I know this question has been asked in similar forms before, but I found no real answer about the following issue: On my Nexus One there's a widget to toggle on/off several things on my phone like wlan, bluetooth, gps,.. Why does this widget has access to the GPS, without forwarding me to the settings screen? And how can I u...

How to get the value of a Listview item which is clicked in android?

I have this below code access the ListView item value into string and display it in alert? ListView shot = getListView(); shot.setOnItemClickListener(this); public void onItemClick(AdapterView<?> arg0, View arg1, int arg2,long arg3) { String S = arg1.getContext().toString(); AlertDialog.Builder alertbox = new AlertDialog.Build...

Android Canvas.drawString display problem

Hello everyone! I encounter this problem when displaying text on SurfaceView, some chars can climb up on others, code is here: private static void fakeDraw(Canvas c) { Paint mPaint = new Paint(); int color = 0xff000000; mPaint.setColor(color); mPaint.setStrokeWidth(2); mPaint.setStyle(Style.FILL); mPaint.setAnti...

Needed jar file's for add event google calendar in android?

Hi I am new to android. I need to know the needed jar file's to add the calendar event from my application and where to download that ? ...

How to change object positions in an android layout?

Hi, I'm currently working on a very simple aplication, and I intended to make it change the visual aspect depending on the screen size. The application just has 6 buttons like this: I'm using the AbsoluteLayout, and changing the x and y of the buttons with the methods offsetLeftAndRight and offsetTopAndBottom. I'm not changing the l...

how to display external image in android?

I want to display external image like: "http://abc.com/image.jpg" in my android phone application. can any one guide me how to achieve this? ...

ListActivity adding images!?

Hi Guys, i have a following ListActivity: public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Get Strings from res/strings.xml String items[] = { getString(R.string.mainMenu_1), getString(R.string.mainMenu_2), getString(R.string.mainMenu_3), getString(R.string.mai...

Android Market: Application not visible on some Devices

Hello, i have written an application that needs to process outgoing calls. Everything works fine, the application has already a few hundred downloads, but now i get feedback from people who would like to download it, yet cannot find it. I have done some tests and have found that the permission "PROCESS_OUTGOING_CALLS" seems to be res...

I Want to create custom Circular Button which will Focus on click how to do ?

I am trying to create one custom button which is circular and when i click that button i want that button FOCUS and COLOR change and i don't know how to do exactly so any one can help me or show me that code how to do? ...

Load class based on SDK version

Is there any way I can load a class based on what version of the OS the phone is running? For example: I made an app which requires 1.6+ Android. Is there a way for me to load one class or the other based on what OS the phone is running? I'm asking this specifically for contacts. The database was changed from 1.6 to 2.0 and the old versi...

Submenu within menu within menu ?

On pressing menu button , I have 2 options : Add & more. On click of more i have 3 options : Organize ,Export & Exit On click of Organize i want other 5 options. On click of more i get my submenu. But i want other 5 options on click of organize.How do i proceed??? My code in parts is as follows : XML file-------------------------------...

Android soft keyboard showing problem

Hi! I'm trying to control soft keyboard using this: ((InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE)) .hideSoftInputFromInputMethod(filterText.getWindowToken(), 0); ((InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE)) .showSoftInput(filterText, InputMethodManager.SHOW_IMPLICI...