android

How to use custom Android ViewGroup in XML?

I have a class that extends FrameLayout called NoteView. It is a top level public class. It works just fine when I'm creating the UI from java code, but I can't figure out how to use it in XML. I tried inserting the fully qualified class name just like I would for a custom view, but I get and exception ClassCastException: android.view....

My device doesnt recognize my DB where my emulator does

When i try to query using my db in the femulator it works perfectly but given the same appliction and same varibales into the device (milestone) it seemees like the DB is not recognize . I think the key to solve it is to understand where on the device we store the db . on the emulator it's on "/data/data/com.countryCityGame/databases/tes...

SQLiteDiskIOException in Android

We are getting a large number of SQLiteDiskIOException errors in our Android app, with stack traces similar to the following: E/AndroidRuntime( 2252): Caused by: android.database.sqlite.SQLiteDiskIOException: disk I/O error E/AndroidRuntime( 2252): at android.database.sqlite.SQLiteQuery.native_fill_window(Native Method) E/AndroidRuntime...

Taking over the volume key on Android

I want to take overinput over the Volume Up and Down. At the moment my code is: @Override public boolean onKeyDown(int keyCode, KeyEvent event) { Log.v(TAG, event.toString()); if (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN){ mLamp.moveBackward(); return false; } else if(keyCode == KeyEvent.KEYCODE_VOLUME_U...

Installation error: INSTALL_FAILED_MISSING_SHARED_LIBRARY when using XMLRPC for android

Hi, I have an android project that uses the xmlrpc library. I downloaded the xmlrpc library and imported into my eclipse workspace. I then added it to the build path in my android project and use it. When I go to run in the emulator, I get this error: "Installation error: INSTALL_FAILED_MISSING_SHARED_LIBRARY". Are the xmlrpc classes not...

Make custom title view from defaults on Android

How do I use androids default window title style to make my own similar TextView? I have done a lot of guessing and made a TextView that has everything that the default title bar has, except for the text shadow (and some padding/margins etc. I think). Here's essentially what I've tried: MainUI.xml protected void onCreate(Bundle saved...

Android - creating listview entirelly from xml

I want to present some choices in my application. Right now I'm doing it with buttons one under another. What I really want to do is to present them as a list like in "Settings" application. This boils down to creating a list with predefined values/choices. My problem is that I can't figure out how to do it with xml. I can add ListView ...

RTSP streams play only sound, while local does video and sound.

In my application, RTSP streams play only sound without video, but if i specify the video path as a local file, it plays the video and audio. How would i get the RTSP streams to show video? public void onClick(View arg0) { Player.setVideoPath("rtsp://rtspvideohere.sdp"); Player.start(); } ...

Auto-complete spinner in android

Hey there I have got an edit text where I want that when someone insert her values it will narrow his option's . the options are stored in a DB (up to 1200 values to one editbox ). i cant get the concept of how to do it can someone help me. ...

Plugin to another android application

I'm new to android programming. Does anyone know how to listen for actions that other applications do? ...

Android AssetManager/InputStream Exception

Doing Android 2.1 development. Can anybody explain to me why the following code generates a IOException and doesn't load the file? This exact code used to work, and as far as I can tell, it should still work. For reference, the Log.d() command correctly lists all files that I expect, and the files are correctly zipped into my .APK file. ...

android listview shadow

How can i get rid of the shadow when I scroll ListView. I have shadows appearing on top and bottom of the list. ...

How to get every Views in an Activity?

is there a way to get every view that is inside my activity? I have over 200 views including buttons, and images, so i want to be able to access them by using a loop for example something like for (View v : this) { //do something with the views //depending on the types (button, image , etc) } ...

Android: How to find out location provider name from KEY_STATUS_CHANGED broadcast intent sent by LocationManager?

I try work with NETWORK and GPS location provider simultaneously. In main activity I register location update request for each available provider: for (String provider : m_lm.getProviders(false)) { Intent intent = new Intent(GpsMain.this, GpsTestReceiver.class); PendingIntent pi = PendingIntent.getBroadca...

listenUsingRfcommWithServiceRecord fails on Android 2.1: wrp_sock_create: socket create failed (Permission denied)

I'm trying to open a bluetooth server socket on an Android (2.1-update1 on a GT-I5700) phone and it fails. I have run out of ideas. Some pointers on what I am missing would be welcome. Bluetooth is on, so that shouldn't be a problem. I'm also pretty sure permissions are ok: <uses-permission android:name="android.permission.BLUETOOTH">...

Android PopupWindow blur or dim background

I would like to be able to either blur or dim the background when I show my popupwindow using popup.showAtLocation, and unblur/dim the background when popup.dismiss is called. I have tried applying layout params FLAG_BLUR_BEHIND and FLAG_DIM_BEHIND to my activity, and this appears to just blur and dim the background as soon my app is st...

Android: retrieving all Drawable resources from Resources object

In my Android project, I want to loop through the entire collection of Drawable resources. Normally, you can only retrieve a specific resource via its ID using something like: InputStream is = Resources.getSystem().openRawResource(resourceId) However, I want to get all Drawable resources where I won't know their ID's beforehand. Is ...

Audio only while streaming a mp4 file to Android Device

Hi I 've set Wowza streaming server to stream mp4 videos to Android phones. Android phone can play the RTSP stream successfully but here It only plays audio of the file not the video. ...

Scrolling TextView in a ScrollView to a specific substring of text

For starters, I'm a C++/Qt Developer jumping into Android/Java development, so please don't assume I know anything. :) So, I have an application with a TextView contained with in a ScrollView. The text contained in the TextView is the results of a web query from my web server application. Depending on the query, the text can be pretty...

Possible to work with audio coming through the headphone jack?

I am looking into writing some apps for Android phones that work with audio. These phones do not have a line in jack but do have headphone jacks that work with some headsets that include a microphone. Is it possible to work with audio coming in through the headphone jack if I plugged in something like a portable computer mic? ...