android

Android make failure on ubuntu

Trying to build Android open source project on Ubuntu 10.04 (on VMware Player). I followed the instructions at this link (and it said to use sun-java5 JDK 1.5 which takes some fishing to find for Ubuntu) - http://source.android.com/source/download.html Got 299 compile errors. Wondering if the direction to use JDK 1.5 is out of date? ...

Android - Can't access button on another layout

I'm expanding on the hello world application. I've created a button on the main.xml to bring up a new form, screen2.xml, with a second button. I'd like this this button to toast a message. However, as soon as I try add the code to define the OnClickListener, I get a force close message. It happens on this line of code: final Button btnS...

What are good conventions for Google Analytics on Android?

I'm about to implement Google Analytics support in an Android app, but after some googling, the documentation seems delightfully sparse. Are there any useful conventions or advice (i.e. when not to trigger pageviews/events, or something) that a newcomer to GA should know? ...

Error while using PackageManager in Android

I got a problem in one Android Application which I am working in which I am getting error when I use PackageManager. The Application is as follows: Home.java package com.main.home; public class Home extends Activity { //onclicking a Button say "send" send.onClickListener() { public void onClick() { ...

Get battery level before broadcast receiver responds for Intent.ACTION_BATTERY_CHANGED

I have a broadcast receiver in my program to get react to the battery level like so: private BroadcastReceiver mBatInfoReceiver = new BroadcastReceiver(){ @Override public void onReceive(Context arg0, Intent intent) { int level = intent.getIntExtra("level", 0); // do something... } } registerReceiver(thi...

Android: Modal dialog with changelog for app shown only first time after install

Hi, A lot of Android apps now display a modal dialog with the changelog (text) of the application (what's new in the latest version) the first time after it is installed or updated. Does any one have example code on: How to display a nice modal dialog suitable for scrollable text How to make sure the dialog is only shown once Fo...

Android Edittext topleft and topright only rounded

I want to have 3 edittext with top and bottom having topleft and topright curves but bottom-left and bottom-right straight. I tried to use shape but it makes all the corners curved. If i try to use bottomRightRadius, then i get exception. So I tried different way of doing it using -ve m...

how can move scroll bar automaticaly ?

Hi friends, i am using grid view for display images,i want to scroll move automatically,whenever i add another images in gridview,is it possible,please give code for that... Thanks All ...

Android: restrict directories for images to be searched for from SD Card with ACTION_PICK

All, I want to ensure that a certain directory on the SD Card is not searched when my client app launches an intent to choose a picture from the library. I start the Intent like so: private static final int TAKE_PICTURE_FROM_LIBRARY = 2; private static final Intent takePictureFromLibraryIntent = new Intent(Intent.ACTION_PICK, android....

android output display

how to display the contents of a vector in android?do i need to use TextView? ...

Optimizing HttpURLConnection in Android

Hello there, this problem is bugging me: HttpURLConnection con = (HttpURLConnection)new URL(url).openConnection(); con.setRequestMethod("HEAD"); if (con.getResponseCode()!=200 ){dosomething()} Is this the correct way to set the Request Method, or is it already too late since I called URL.openConnection() and it already made the conne...

Android ProgressBar getProgress?

Is there a slick way to display getProgress() in an Android ProgressBar? ...

Android Eclipse - error trying to open or edit /res/values/strings.xml - NullPointerException

getting error: An error has occurred. See error log for more details. java.lang.NullPointerException when I attempt to edit this file in my eclipse Android sdk project. Not seeing anything in LogCat or the Console. I need to update this file to rename the Project. ...

Performance of app on Android Phone Emulator vs Actual Device ?

I am working on a compute intensive app for Android. I do not have any device yet to test performance. However, the performance on emulator is a bit slower than expected. I see an old question about some estimation of emulator vs device. What are your experiences while developing apps with recent SDK Froyo/2.2. Is performance observed o...

Problem in Using PackageManager in Android

Possible Duplicate: Error while using PackageManager in Android I got a problem in one Android Application which I am working in which I am getting error when I use PackageManager. The Application is as follows: Home.java package com.main.home public class Home extends Activity { //onclicking a Button say "send" ...

Android and binding to internet bookmark URLs?

Does anybody know if Internet Bookmark URLs are accessable from Android applications? Any way to bind something like a spinner to them? Thanks. Update: To add to my question: I've tried this code but getting just blanks back in my spinner. I confirmed I have bookmarks in my emulator: private Cursor cbookmarks; SpinnerBM = (Spinner) ...

android onDestroy

is there a way i can delay the OS from killing my app... it runs in the background with a countdowntimer but its not a service... is there a way to raise its prioity or something so that it stay in the background for as long as possible and is still running when the application is resumed ...

How to browse android emulator SD on Windows without Eclipse?

Hi all. Can't understand how to browse android emulator sd card. I am using IDEA, not Eclipse and can't use Eclipse tool for this purpose. ...

How to duplicate Views to populate lists and tables?

I have a general question regarding Android's separation of layouts into layout.xml files: My app needs to display a table where the number of rows and columns varies at runtime. So far I did the layout up to the TableView in the corresponding layout/....xml file and then I added TableRow-s and cells (TextView) to the table at runtime a...

Is there a simple command to hide or display an imageview?

I have a series of imageviews that I want to display, but on a button press there needs to be less or more. These imageviews are stored in a list. Is there a simple way to hide or display them? ...