android

What's the encodoing type of Android 2.2 push message?

I'm studying Android push service (C2DM) for Android Froyo version. The Google says the max size of message is 1024 bytes. (http://code.google.com/intl/ko/android/c2dm/) What is the message encoding type? I want to put extra message which is not English. ...

How to get the TimePicker after the TimePickerDialog pop up

I'm working on the android automatic test, and try to test the alarmclock app in the android. I want to get the TimePicker after the TimePickerDialog pop up, then we can use it to invoke the methods 'setCurrentHour(...)' and 'setCurrentMinute()' to set the alarm time programmatically instead of sending the key event so many times. Thank...

How can I set the text of a custom title bar for each frame in an Android tabhost?

I have a tabhost setup as per the tutorial here. What I want to do is set the titlebar text according to the currently selected tab. Any idea how to achieve this? ...

How to make a vertical SeekBar in Android ?

Can a seekbar be vertical? I am not very good at UI design, so how make seekbar more beautiful, please give me some templates and examples. ...

How to add Canvas in a specific LinearLayout?

I am new comer to android but not to java. I have been designing UI in android through XML file, in that page i have 3 linear Layouts, in my top layout(first LinearLayout) i have kept some image and in the last layout i have kept some buttons,now i need to place a circle(of red color) in my center layout using canvas,i have written a sep...

How to display a "Loading..." text while retrieving items for a ListView

There are some others applications doing this, like Twitter, Facebook, or even native applications such as Android Market. When you want to display a list of items retrieved from the internet, this looks like a standard way for displaying the user some notification about action in progress. This is a white background screen with an anima...

How to save Android edit text content with rich text

I have an EditText where users can set text to bold, italic, etc but I can't figure out how to save that text with styles as .txt file/any otherway to save it.If we save as html page we can't edit the webview. I use getText but that only returns text and no style info. Any help is appreciated. Regards vani ...

Android layout replacing a view with another view on run time

I have a xml-layout file main with two textviews A/B and a view C. Than I have two other xml layout files option1 and option2. Is it possible to load either option1 or option2 in run time via Java into C? If so, what function do I have to use? ...

selection in textview

Hello Everyone, I have a Text View in my application and I want to select text from that text view and i want the starting & ending position of that selected text so can anyone please help me. ...

I got an error during database connection

07-26 16:15:05.341: ERROR/CursorWindow(330): Bad request for field slot 0,-1. numRows = 1, numColumns = 2 07-26 16:15:05.380: ERROR/AndroidRuntime(330): FATAL EXCEPTION: main 07-26 16:15:05.380: ERROR/AndroidRuntime(330): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.dataApplication/com.dataApplication.CRUDonDB1}...

Problem uninstalling an Application package from Android device

We have an application which on start up pulls up a Terms and Conditions screen. When the user declines these terms we have to ask the user if he wishes to delete the package. So, from within the application we launch the following intent: Uri uninstallUri = Uri.parse("package:some.package.name"); Intent intent = new Intent(Intent.ACTI...

drawing imaginary lines above image in android

Hi, I have a static image of a map and i want to draw imaginary line/route from one place to another above the map and also have facility to choose some area of map. How can i do it?? can any have any idea??? Any idea will appreciated ....thanks in advance.. ...

Run method from extends Activity extends Runnable

I'm trying to call a method from inside a Runnable that is running. It waits for a string to be entered and when it is then depending on the string (the strings act as commands) it calls a method and is supposed to run whats inside it. public class App extends Activity implements Runnable { public void run() { try { Ser...

Error: The method xxx is undefined for the type ActivityManager

I am getting the following error: ERROR: The method killBackgroundProcesses(String) is undefined for the type ActivityManager Now I am dead sure that ActivityManager contains that method http://developer.android.com/reference/android/app/ActivityManager.html#killBackgroundProcesses%28java.lang.String%29. Here is the code, please help ...

Which is faster when reading large amounts of data: XML or SQLite

Hey, I will be developing a dictionary app for both Android and iPhone. The data will be embedded within the app, and it consists out of approximately 100000 words, with genus and plural form. Is it better to use a SQLite database or can I just stick to XML? Somehow SQLite sounds more efficient, but I thought let's just ask. Thanks! ...

Android Gesture Builder displays Mandarin/Japanese characters!?

Why does Gesture Builder pop up with Mandarin/Japanese predictive text when entering the name of a gesture, and then subsequently save that name in this language. Please help me set it back to English? all the dialogue on screen apart from that is in English??? ...

getCellLocation returns null

Hi, I am trying to access the current cell location information. When I try to call getCellLocation() it returns null. I am unable to reason out this.. the same code works on 1.5 but fails on 1.6 or 2.1.(Tested on G1 with 1.6 and HTC legend 2.1). Can some one help me in correcting this bug? My code is below. TelephonyManager...

Unable to Stream live audio on android 1.5..

Hello i m new to android and working on Radio application i gt stuck coz i m unable to stream live audio in android 1.5... is that possible to stream live audio in android 1.5 SDK.. can any on suggest wht to do??? Many Thanks... ...

Problem using Runnable + Handler.postDelayed for bitmap marker animation

I want to place an animated marker showing a user's current location in an Overlay over a MapActivity. I need to be able to turn the animation on and off. I thought this could be accomplished as follows: /** * Class to display current location marker above MapActivity */ public class MyLocationOverlay extends Overlay { private Ca...

Opengl Gallery implementation?

Anyone know of an example of an opengl implementation of something like the Gallery widget? Basically, I am looking for an example of how to horizontally scroll a list of images using opengl. I have seen this behavior in the Gallery 3D app from cooliris but there is ALOT of code in that app and I haven't been able to figure out how it wo...