android

Suggestions for entering mobile development -- pure iPhone SDK, Android SDK, Mono Touch or Titanium ?

I am entering mobile development. I have been working primarily in .NET since 1.0 came out in beta. Before that, I was mostly a C++ and Delphi guy and still dabble in C++ from time to time. I do web apps quite a bit so I am reasonably proficient with Javascript, JQuery and CSS. I have also done a few Java applications. I started web...

Android widget ImageButton loses image when screen is rotated

I have a widget on my home screen with several ImageButtons which have default background images. Through the configuration activity, I can change the image on any of the ImageButtons. The problem is that when the screen is rotated, the image on the ImageButton disapears and it changes back to the default image. I don't know why this ha...

Android: Multiline & No autosuggest in EditText

Hi! Is it possible to have an EditText that allows multilines and doesn't show the suggestions? I tried with this code: android:inputType="textFilter|textMultiLine" Which I saw in this question, but it didn't work for me. If I try to use both at the same time, the EditText supports multiline, but the suggestions appear. Separately, t...

Android animation not firing immediately

My project has a View that is supposed to start its tween animation (using startAnimation()) when onTouchEvent() is called. I would expect the animation to start immediately since that is what is documented. However, stepping through my code, I see it does not start until some time after onTouchEvent() has finished :-0! Does anyone kno...

Recording a screencast of an Android app using the emulator

Unlike the iPhone simulator, the Android emulator doesn't look like an Android device. If you have to create a screencast or promotional video of your Android application, the default skin of the emulator is no good. Is there any way to configure the emulator to look like an Android device? If you have dealt with this already, what oth...

Moving between android activities on button clicks

I am writing a android application where, on startup activity view, I have a button "DoIt". When user clicks "DoIt" button, I start another activity with different layout. On newly started activity, I have a button "Back" which should take me to the first activity. How to accomplish this. What code should I write on OnClick method of "Ba...

Can't type inside a Web View

I have a problem interacting with a Web View. I'm showing an html login form within a web view and I can't type inside of any of the input fields of the forms. I do can interact with the links, select boxes, buttons, etc. Here is an example of my code. Basically I'm retrieving the web view from the xml and setting it a WebViewClient and...

How to set android lock screen image

Hi, I'm just getting started with android programming, and want to see if there is a way to programmatically set the lock screen image. I've found various ways of setting the wallpaper in the API, but I can't seem to find the equivalent ways of setting the lock screen image. I've seen various posts saying that customising the lock scre...

Android App Fails To Launch

All I'm trying to do is open a very simple application that is supposed to do nothing but display an imageView above a textView. The application worked fine until I added the imageView so I'm assuming my problem has something to do with that. Here is the code: package com.isi.sa; import android.app.Activity; import android.os.Bundle; ...

Global uncaught exception handler -> email log to me?

Hi, Is there any way to catch crashes in my own android app? Something like a global uncaught exception handler? Just wondering if I could install something like that, then if an uncaught exception is thrown, I could pop up a dialog for the user and ask if they want to mail a dump of the exception to me. Thanks ...

SQl function in android

Cursor cursor = db.rawQuery("SELECT COUNT(rat) FROM "+ TABLE_NAME_EXTRA +" apkid=\""+apkid, null); cursor.moveToFirst(); int somatotal = cursor.getInt(0); I'm trying to do a SQL function like count and sum, but this code returns a exception saying "emptyvalues". anyone know why? ...

android: error parsing apk from tomcat server

This is related to my previous post: http://stackoverflow.com/questions/2649422/android-test-app-on-a-real-device Here is what I did: followed every step to create keystore, sign, zipalign, versioning, labeling and naming my app. Resulted in an .apk file. Upload my file to tomcat/webapps/ROOT/myapp.apk changed tomcat/conf/web.xml by a...

android:listview

hi, i am facing problem regarding automatic expansion of list view.. 1) i had separate xml file for each list item . i.e inflated in efficient adaptor, list element is also using selector or highlightor file for background change on click. now in my main xml file view is like this -LINEAR LAYOUT - VERTICAL (MAIN) - LINEAR LAYOUT...

Android Canvas.drawText

Hi All, I have a view, I'm drawing with the Canvas object in the onDraw(Canvas canvas) method. My code is: Paint paint = new Paint(); paint.setColor(Color.WHITE); paint.setStyle(Style.FILL); canvas.drawPaint(paint); paint.setColor(android.R.color.black); paint.setTextSize(20); canvas.drawText("Some Text", 10, 25, paint); The problem...

Using listactivity view to create table in android

I'm pretty new to android. I want to create a table in my Wapplication that will have three columns. Once column would have string, another would have a image and last column would have a integer. Again, I want to have table rows selectable. Can this be achieved by extending ListActivity ? What is the best to way to create such a table ...

android webview pdf

I want to display pdf contents on webview. Here is my code: WebView webview = new WebView(this); setContentView(webview); webview.getSettings().setJavaScriptEnabled(true); webview.loadUrl("http://www.adobe.com/devnet/acrobat/pdfs/pdf_open_parameters.pdf"); I am getting a blank screen. I have set internet permission also. ...

I can't get my Android program to run correctly on an AVM in Eclipse

This is a simple question about getting started with developing Android apps using Eclipse. I have followed all the tutorials on the developer site for installing Eclipse, the SDK and the ADT plugin. When trying to run a simple Hello World program, everything seems to compile correctly, but then the virtual machine comes up empty. In ...

Android ListView clears when hard BACK key is pressed.

In my android app I have a Tabhost with a ListView as one of the tabs. By clicking on an item in the ListView (an address) I start an Intent to Google Maps for directions and the choice dialog pops up for google maps, web browser etc. Problem is if I press the hard back button then the launch dialog goes away but also the ListView is c...

Has anyone used xdpi, ydpi and gotten correct results

Hi, I'm wondering if anyone out there has used xdpi and ydpi and gotten the actual physical dpi of the device? Thanks ...

Passing GPS speed via the Eclipse Emulator Control

Hi, my app queries the GPS-speed using .getSpeed() on a LocationListener. Is there a way to set this speed using the Eclipse Emulator Control or the command line? I tried to feed multiple sets of coordinates to the emulator via the manual GPS-control, but it didn't pick up a speed from that. Also, using a pre-defined GPX-file and playin...