android

Android: Text primary key with different name

I have an existing Windows app for which I'm writing an Android port. The app uses a unique string as the primary key, but the SQLite methods in Android all seem to work with integers and a column names _id, whereas my ID column isn't called this. Is there a way to let Android know I have a key with a different column name? ...

Android: Can not send http post

Hi all, I've been banging my head trying to figure out how to send a post method in Android. This is how my code look like: public class HomeActivity extends Activity implements OnClickListener { private TextView textView; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceStat...

embedding layout inside each tab? - (each tab has its own activity)

I have started with the HelloTabwidget example and it works fine. Now what I am trying to do is have a layout inside each tab. here is what the code looks like myApp extends TabActivity { TabHost tabHost; onCreate() { setContentView (R.layout.main); tabHost = getTabHost(); TabHost.tabspec spec = tabHost.newTabSpec(...

Entering and retrieving data from SQLite for an android List View

Hi all, I started learning android development a few weeks ago and have gone through the developer.android.com tutorials etc. But now I have a problem. I'm trying to create an app which tracks the usage of each installed app. Therefore I'm pulling the names of all installed apps using the PackageManager and then trying to put them into...

Switch back to previously selected tab after the activity is recreated

In my TabActivity the user may be asked to switch to browser activity for OAuth phase, and if the phase takes too much time, my activity will be killed. After the user switches back to my activity, its onCreate() method is invoked again and tabs are recreated. So I would like to know if there is any simple way to switch back to previous...

Question about the lifecycle of a simple Android application

Hi, I've got a simple application with 3 activities: -the first contains a search box which calls a web service and show the results (restaurants) below in a listview -when a restaurant is clicked another activity is started showing the description of the restaurant and a button "show map" -when the button "show map" is clicked, guess w...

SQLite: 2 Problems by working with table

Hallo all, I have a SQliteDatabase object db, i want to create a table in db with the following code db.execSQL("CREATE TABLE IF NOT EXISTS "+ TABLE2_NAME + " (exer_nr INTEGER PRIMARY KEY ,exerText varchar(250),answerA varchar(250),answerB varchar(250),answerC varchar(250),answerD varchar(250))"); An Error occur. Why? Is this t...

Android: Enable selection in webkit

Hello, I'am looking for a way to have a webview content selectable in the very same way as the stock browser does. user long presses the text the whole word is selected two pins appear at the word's boundary allowing the user to stretch/shrink the selection. I should note that Dolphin HD shows exactly the same text select functionali...

Android: How can I tell if clicked gallery item is the center one?

Hi all, I would like to display the gallery item the user clicked on in full screen, however, only if it is the item in the center. If the clicked item is not in the center I would want it just to be centered. Any idea how to distinguish the item which is currently in the center from all other items? Thanks, Rob ...

How to access individual items in Android GridView?

Hi, I'm trying to create a game with a 9x9 grid with GridView. Each item in the grid is a TextView. I am able to set the initial values of each item in the grid within the getView() method to "0", however I want to change the value of each grid individually after this but have been unable to do so. I tried adding an update() function in...

using SimpleCusorAdapter to populate a ListView for android

Hi all, I'm trying to get multiple pieces of data from an SQLite database into a ListView but it doesn't seem to be working. I'm using the code from developer.android.com's Notepad example and it works fine for 1 piece of data but not 2. I'm trying to get the title and body of each database entry from the database, through a cursor an...

Best way to embed i-jetty server into android application?

Hi: I want to integrate i-jetty into an Android application and not the other way around. Has anyone included i-jetty before and got it to run under Android 2.1 or 2.2? ...

PendingIntent sent from a notication.

Hi, What im trying to accomplish is to send a notification through the notification manager that once clicked will do something in the application only if its currently running. i have tried to use: notification.contentIntent = PendingIntent.getActivity(this, nNotificationCounter, Someintent, PendingIntent.FLAG_NO_CREATE) Which allway...

Android XML-RPC Serialization Issue

I am attempting to use Android XML-RPC and for some calls I get the following exception: W/System.err( 837): java.io.IOException: Cannot serialize java.lang.Object@43759748 It looks like it is having troubles serializing the returned data, but I cannot find much documentation on how to actually use Android XML-RPC. The way I am using...

Android "Trying to use recycled bitmap" error?

Hi all, I am running into a problem with bitmaps on an Android application I am working on. What is suppose to happen is that the application downloads images from a website, saves them to the device, loads them into memory as bitmaps into an arraylist, and displays them to the user. This all works fine when the application is first star...

Android: ScrollView in flipper

I have a flipper: <?xml version="1.0" encoding="utf-8"?> <LinearLayout android:id="@+id/ParentLayout" xmlns:android="http://schemas.android.com/apk/res/android" style="@style/MainLayout" > <LinearLayout android:id="@+id/FlipperLayout" style="@style/FlipperLayout"> <ViewFlipper android:id="@+id/viewfli...

Has anyone installed the JumpNote Android C2DM demo application on an unrooted Nexus 1?

Is it possible to run the JumpNote demo application for Android Cloud to Device Messaging http://code.google.com/p/jumpnote/ on an unrooted Google Nexus1 phone? Did anyone install and run JumpNote on an unrooted Nexus1? (JumpNote works with Android 2.0+, it needs Android 2.2 for push-sync, but it can run and be sync-ed manually in Andro...

Android on TabHost little more depth of the problem, there is the hard return key on the treatment.

Hello everybody, I have a question on the Android Activity, for example I have a TabHost, and there are included four Activities, the first tab is a search Activity, enter a keyword in the current result of this Activity to return, and in the current Activity display. Is called to display the search results themselves. And after searchin...

OpenGL ES canvas size

Ahoy, I'm working on an OpenGL ES based game for Android using the NDK. My application is targeted towards SDK 1.6 and above. I seem to be having a problem creating a canvas of the phones native size. My rendering is done through a native gameloop that uses OpenGL 1.0. I'm using the emulator and that gives me a 480x320 canvas -- this i...

android view web pictures in gallery

I am new to android, I just finished Hello gallery tutorial, and a web pciture tutorial. Now I want to know how can I show some web images in gallery? the hello gallery code is from andorid tutor this is Web gallery code, I want to load some pictures from web and then show them in gallery, how can I write it? public class WebGallery...