android

ListView and ArrayAdapter<String>

Is there anything bad with this code? The thing is that the "test" is not displayed in ListView. Java: private ListView namesListView; private ArrayList<String> names; private ArrayAdapter<String> namesAA; ... namesListView = (ListView)findViewById(R.id.list); names = new ArrayList<String>(); names.clear(); names.add(0, "test"); name...

Android ActivityGroup Menu Problem

I have one problem using ActivityGroup. I have two activities inside an ActivityGroup and both of them use a menu (overriding the onCreateOptionMenu and onOptionsItemSelected). Well, the problem is that the second activity in the group doesn't show the menu when I press the menu Key. The first activity works fine showing the menu. Any ...

Having ordered SQlite database (based in XML feed)

Hey all I'm having a go at developing my first android application and have never really used databases before. Anyways I need to populate and update a database based on XML files retrieved from the web on a regular basis (say once a day). Just thinking about it iv already run into some problems...Basically I need to display informati...

Android: Custom Title Bar

Hi, I have a custom title bar requestWindowFeature(Window.FEATURE_CUSTOM_TITLE); setContentView(R.layout.activities); getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.custom_title); Which works basically fine. The problem is that until the above code is called the default title bar is shown. I don't want a title bar...

Android - How to create Multiple instances of an Activity?

I was wondering is it possible to create multiple instances of a single Activity in Android? I currently start my own inCall screen for a Voip Test by using the following code: public void initInCallScreen(String pName, String phoneNumber, int contactID, boolean callDirection, int lineID){ //starts in callScreen di...

Retrieving external applications information

Hi all, I would like to know if there is anyway if collecting information of applications which installed on the phone?(thigns like: activities names, permissions the app using, services, etc...) I tried to look little bit at packageManager and packageInfo.. but when i tried to use those methods i mostly got NULL. anything you ppl know...

How do i import my Cursor from my database class into my current class?

Here is my code for my db class: package one.two; import java.util.List; import android.app.ListActivity; import android.content.Context; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; import android.database.sqlite.SQLiteDatabase.CursorFactory; import j...

Android Launch - Inexplicable error

I am developing an Android application, I was doing just fine then I made some changes to the code. Everything went fine, no error messages, until I ran the code. Then I get this in a popup dialog. Your project contains error(s), please fix them before running your application The title of the popup dialog is "Android Launch". I know t...

Video not displaying properly

I am working on Anroid (with Eclipse and SDK) trying to stream video into a VideoView. Sometimes the video works, but other times I get an error that the video cannot be displayed. Here is the code: //video private Uri mPath; private VideoView mVid; mPath = Uri.parse("android.resource://com.accuweather.wordweather/" + R.raw...

Calculating the size of a view

Hi all! The best way to ask this question is to provide an example, so here it is: <ScrollView> <LinearLayout android:id="@+id/main" android:orientation="vertical" > <TextView android:id="@+id/some_text" /> <LinearLayout android:id="@+id/stretch_me" /> ...

Downloading a web page with Android

I'm downloading a web page then extracting some data out of it, using regex (don't yell at me, I know a proper parser would be better, but this is a very simple machine generated page). This works fine in the emulator, and on my phone when connected by wi-fi, but not on 3G - the string returned is not the same, and I don't get a match. I...

How can I get smaller CheckBox

Hi all, Is it possible to get a smaller CheckBox, like the one used in Settings application? I'd like to use it in my own custom Preference class, to mimic Android UI more closely... Thank you for your time, Kipple ...

Correct Redirected HTTP GET retrieval

Hi, I'd like to know how to do a HTTP GET request to a server from which I know I will get redirected at least a couple of times... I'd like to get the response (body) of the "last" webpage. It should come up with a code in my specific example... Or, as an alternative, I do know you can start the browser from within your Android app, is...

How do I get the date of the start and end of daylight savings?

I am trying to get the transition date for daylight savings in Android. That is the date that daylight savings start and ends for a specific timezone. How do I do that? ...

Is there any alternate to TextView?

I m new to android application development. I made a project on getting feeds of sites. I displayed the title and description of feeds in textview which is not looking very presentable. Is there any alternate to it? I just need my application to look a bit presentable. ...

Eclipse Android SDK Manager Warning: null

Hi, I don't really know anything about this, but I'm learning how to write Android apps. I'm working through the Hello, World | Android Developer Tutorial, and was doing fine until I tried the XML code. I copy/pasted the code given in the tutorial into the layout file as instructed. But when I attempted the next step (open strings.xml...

Install Froyo on Desire

Tell me please what is the latest firmware? Who ever put it? Bugs are there? When will the official firmware? Can I put it on the root phone? Please share information ... ...

Java Variables Basics

Ok, so I am about to embarrass my self here but I am working on a project that I will need to get some help on so I need to get some conventions down so I don't look too stupid. I have only been doing java for 2 months and 100% of that has been on Android. I need some help understanding setting up variables and why I should do it a cer...

Android ArrayList populated with last elements data

I am using the Android onTouchEvent to register touch and the associated movement. I then want to iterate a sprite along that path. I need to store the path traced by the finger for use later on. The problem is that after the finger is lifted off the screen the ArrayList (pArray) is completely populated with the X & Y position of the...

What is more usual to persist data when developing Android applications?

Hi there, I'm developing an application that would need to persist data locally in Android devices. I'm aware that Android provides two packages for database persistence, the normal "java.sql" and the "android.database.sqlite"? Which one is used more for persistence? I suppose that "android.database.sqlite" is the implementation of "jav...