android

Get current OverlayItem being drawn

I want to be able to get some reference to the curent object being drawn @Override public void draw(Canvas canvas, MapView mapView,boolean shadow) { //Log.i("DRAW","MARKER"); super.draw(canvas, mapView, false); } Above is my draw method and I want to extend the draw method to write the title und...

Writing to SD card

Hi, I am writing some files to SD card. My android version is 2.1. I am not setting any permission in the manifest file but it allows me to write to sd card. Please let me know why this behavior. only WRITE_EXTERNAL_STORAGE in manifest controls write to SD card or any other configuration i need to do. thanks Gururaja B O ...

Getting the Contents of a Specific Directory on the SDCard

How would I go about getting an array of all the files in a specific directory on the sdcard, i.e. /ringtones/? ...

Text Appearance example for android application

Hello I want to have the Android Test Appearance attribute ecample. ...

Suggestions for inbox notifications in android?

dear friends, i have few activities in android application with inbox Textview in the title. i want to implement something like Inbox(Number of messages) to be shown on each screen any one guide me what is the suitable way to show number of messages in each screen title bar? one of my friend is calling webservice after 10 seconds aga...

Refresh layout while filling it

Hi guys, I have an activity with a HorizontalScrollView. When it opens, I start filling this view (or rather, a container layout inside it) with another views. This is done from another thread by using handler.post. The views are added in bunches of 15, and when there are no more views to add, I start updating them with new data (this...

How to use default Android drawables

What is the best approach when using default Android drawables? Should I use android.R.drawable or should I copy the drawables in my project and use R.drawable? Is there any risk, that in a newer version of Android, some of the default drawables are removed or resized? Or, affect in some negative way, the look of my app? Also, which of ...

Legality of phone pictures in ads

Let's start with an example: http://weloveastrid.com/ As you can see, their promotional screenshots are surrounded by a picture of an actual hardware - Nexus One in this case. Is the usage, for purely commercial reasons, of those pictures of existing hardware legal? Do I have to ask a manufacturer for permission? In spirit of the quest...

Database connection, check data, login page

Hi, I'm doing Major Project on my final year and I'm very new to Android plus I;m not good at codings. I need help with my login page. I've created something like a database connection java file which is this: package one.two; import java.util.List; import android.app.ListActivity; import android.content.Context; import android.d...

Motorola specific crash on Android when using Configuration

Since I published a large update to one of my apps I have received hundreds of crash report, all from different motorola phones. The stack trace does not pass through my app: EXCEPTION java.lang.NullPointerException at android.content.res.Configuration.updateFrom(Configuration.java:269) at android.content.res.Resources.updateConfigurati...

How to overcome Android WebView file size limit when loading a file

It seems there is a size limit when opening up pages using Android's WebView object. I am opening an HTML file in the 'Assets' folder. I have used the method myWebView.loadUrl("file://android_assets/index.html"). It works fine for a test html page but the real HTML I need page calls a JavaScript file that is over 1MB (dont ask why so ...

Randomly closing app - InputManagerService: Got RemoteException sending setActive(false) notification

I've a very simple Android app, similar to fingerpaint application. I'm drawing some lines on the screen with my finger. My problem is that, app closes itself randomly, taking me back to Android home screen. Only log I can see on LogCat is that line: (Warning) Tag: InputManagerService: Got RemoteException sending setActive(false) noti...

SAX parsing in android

Hello! I have xml file that looks like this: <ns:retrieveLastResponse> <ns:return xsi:type="ax21:MinusEntry"> <ax21:entrydate>2010-07-02T17:29:35.492+02:00</ax21:entrydate> <ax21:minus>true</ax21:minus> <ax21:password>SECRET</ax21:password> <ax21:text>Some text</ax21:text> <ax21:username>John Doe</ax21:username> </ns:return> <...

Android Login page, database connection and checking of username and password. Edit text set to dots?

I've modified my previous code for login. package log1.log2; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.EditText; import android.widget.TextView; public class Login exte...

ImageButton usage and changing pictures

how do you change the image of an ImageButton during runtime? for Button, you can say setText("some text") for ImageButton is there any setImage() such that I can change the image during runtime? where do you place the pictures? drawable hdpi,ldpi,mdpi..what exactly is the difference between all of them? ...

Android: Cannot cast from View to Gallery

Hello, I'd like to make a Gallery in android. In order to set the adapter in need to get the gallery which I defined in my xml file. Im doing that as: Gallery g = (Gallery) findViewById(R.id.gallery1); But with this code I can't compile my project, since I get the Error "Cannot cast from View to Gallery". My xml-file looks like this: " ...

android file handling

hi expert, i'm newbie for android dev, now i want explore file handling in android, for example how to write a file (ie. sample.txt) and which location, how to read back it, can this file can be view manually thanks in advance ...

the same problem as "Android widget different portrait and landscape orientation"

How did you support both landscape and portrait for appwidget? the layout of appwidget will never change when orientate the device from landscape to portrait. by the way, would you please tell me which device support both landscape and portrait for appwidget? ...

how about android interval

hi expert, i did wifi scanning for android, but now i want this wifi scanning run at set interval period, how this can be done, can any provide any snippets, thanks in advance ...

Meaning of "Portable Hotspot"

Possible Duplicate: What does Portable Hotspot mean ? What does the term "Portable Hotspot" mean, in reference to Android Froyo 2.2? The description given on the website seems vague. How does it actually work? ...