android

android newbie question null pointer on ArrayAdapter.setAdapter

Hi All, I have been slowing learning and building my first android app. I'm VERY new to java but have already done a couple of projects in C#, VB.NET (back in the day), Objective-C (have 6 apps in the store) and Fortran (waaaaaaaaaaaaaaaaaaaay back in the day ;) So I just received from overseas a htc legend (I'm not in the US), which...

Mapping Multiple Textures to a Cube's faces in Android

Hi, I have just began opengl programming in android and i am fairly new to opengl as well. I've been using nehe's opengl tutorials as well as insanitydesign's android ports. I successfully managed to create a cube with a single texture mapped to all its 6 faces. I even mapped multiple textures to different faces of the cube. ...

After following Android's Tab Layout tutorial, my tabs' contents overlap, what am I doing wrong?

After following Android's Tab Layout Tutorial, the contents of all 3 of my tabs are always visible, rather than each tab only display it's associated activity. Rather than copy my code here, I can tell you that it is almost verbatim from the tutorial. Below is a screenshot: The date picker and text boxes are in an Intent associated wi...

How to Deploy Android Application to Beta Tester Devices

My android app is not in the app store yet. Is it possible to send my app to someone, and they install it on their device. Something like iphone AdHoc? ...

Android Tool: layoutopt

I am a rookie Android Application Developer. I wanted to start fooling around with the Android SDK tool: layoutopt. When I ran layoutopt from the command prompt on my Windows 7 machine, I received the following warning and error messages: WARNING: Java not found in your path. Checking it it's installed in C:\Program Files\Java instead...

ProgressDialog onCreate

In "onCreate" I'm downloading data from web.The duration of downloading data is 10 sec. I wan't to have ProgressDialog while the data is downloading. Here is my code , but the ProgressDialog doesn't appear: public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); P...

how can I notify a running activity from a broadcast receiver?

Hi, I have an activity, it needs to response to a broadcast event. Since an activity can not be a broadcast receiver at the same time, I made a broadcast receiver. My question is: how can I notify the activity from the broadcast receiver? I believe this is a common situation, so is there a design pattern for this? Thanks. BR, Henry ...

Android ==> Decompile .apk??

Are the users able to convert the apk file of my app back to the actual code? If they do is there any way to prevent this? ...

Update Textview at runtime?

Hi all.I receive data from udp server from my application.when i receive data i have to show that on the screen.I just use the Textview to display the incoming data(textview.setText("data")).But it displays the last incoming data only.I need to show the previous data also.how to solve this? DatagramSocket clientsocket=new DatagramSocke...

how can i use .apk file into my own application android?

Hi, In developer.android.com I read central feature of android is you can make use of elements of other applications in your own application.Iam interested in this line. 1)How can we use the .apk downloaded suppose from android market in to our application ? 2)How can we use our own created applicaton into newly created application? pl...

Android highlight ImageButton onclick

Is there a way to highlight an ImageButton when it's pressed? ...

UI design suggestions for Display and Switching between Multiple Layouts

Hi, I'm trying to create an app that offers the user 3 different kinds of layouts. The only common portion for all 3 would be the TextView (located at the top) that would display information specific to the currently displayed layout and 3 buttons to select the required layouts. Is there some way we can create this UI in XML to keep onl...

SQLiteDatabase.insert() returns incorrect rowid for virtual tables

Hello, When I insert a row into a full-text search database declared like: CREATE VIRTUAL TABLE foo USING fts3 (bar); the SQLiteDatabase.insert() method returns an incorrect rowid. If the table is declared like: CREATE TABLE foo (bar VARCHAR(10)); it returns the correct rowid value. The problem is when I query the database soon af...

ListView with ArrayAdapter and ViewHolder adding icons to the wrong item.

I have a dynamic ListView which uses an ArrayAdapter. When a name is selected from a spinner, the name together with an icon showing whether they are male or female gets added to the ListView. Mostly everything is good (the name gets added to the list correctly, together with an icon). But the icon showing the sex gets added to the wron...

Setting global Button and EditText objects

I'm getting null pointer exceptions when I try to initialize Button and EditText objects in global scope, can't figure it out. I've commented out everything but the bare minimum for the app to display my layout, but this still causes a crash: private EditText addmoney = (EditText)findViewById(R.id.addmoney); R.id.addmoney definitely,...

how do i Show a clock like this

I intend to show the clock in this way I've done for the clock .. and I'm not sure how to get the small text "PM" like pic above. also for the MON TUE WED .... Calendar c = new GregorianCalendar(); if(c.get(Calendar.DAY_OF_WEEK) == Calendar.MONDAY){ System.out.println("MON"); } else if (c.get(Calendar.DAY_OF_WEEK) == Calendar...

alert dialog not appearing in android

public class BabyName extends Activity implements View.OnClickListener, Runnable{ /** Called when the activity is first created. */ Login loginclass=new Login(); ProgressDialog dialog; Thread t=new Thread(this, "sample"); AlertDialog al; long id; boolean flg=false; @Override public void onCreate(...

How to obtain an instance of ServiceState?

I'm trying to obtain an instance of ServiceState in my Activity. But how am i supposed to do this? There is no static method to obtain an instance or any method on any service that returns an ServiceState instance. There is the TelephonyManager.listen() call. But i want to get the ServiceState instance when i want, not when android calls...

Can I Change ListView style Android without building custom listview ?

Hi, I would like to change text and back ground color of my Listview without building custom rows. Is this possible ? Here is my code which is NOT working. android:layout_width="fill_parent" android:layout_height="fill_parent" android:cacheColorHint="#000000"/> Any help would be appreciated. Thank you ...

help laying out views on a surfaceview

* Introduction* I need to develop an augmented reality mobile application for my HCI class...it basically has to recognize a visual tag and visualize a virtual notice board. I used, as starting point, some code from zxing android test application (http://code.google.com/p/zxing/) which has all the necessary code for taking a photo and a...