android

TextView inside a LinearLayout, crash with a long string

Using Android, here is part of a layout xml file: <LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical" android:textColor="#191919"> <TextView android:id="@+id/someTextField" android:layout_width="fill_parent" android:layout_height="wrap_cont...

Does the android market work on the emulator?

I am not able to access android market through emulator. ...

I am not able to access any messenger site from Android emulator? please help

I am not able to access any messenger site through emulator even Gtalk also,so please help me if anybody knows. ...

How to fix child in views

I am facing problem in fixing the child in particular place in views or layout. 1) Can I fix the child at the starting and ending of Layout directly? 2) Can I fix the child at the starting or ending of the view directly? ...

How to use my custom library apk file in other applications

Hi, I have my own custom library apk file (say lib.apk) & i want make it available to other applications. How to provide the uses-library in the android manifest.xml file in other apps so as to use my custom library. ...

Android. How to Do Audio Recording with High Volume?

Hi, I will describe briefly my trouble with audio recording. So, I am doing audio recording using MediaRecorder, but unfortunately when I playback the recorded audio, I have media with a very low volume. I don't here anything (almost anything). Is there any possibility to setup recording volume? Thanks. ...

GPS not update location after close and reopen app on android

After I closed my app for a while then reopen it again,my app will not update location or sometime it will take long time( about 5min) before update. How can I fix it? This is my code private LocationManager lm; private LocationListener locationListener; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedIn...

Calculating map routes on Android

I am trying to calculate a route based based on either geographic location or address. I figured the obvious way would be to use some part of the built-in Google Maps package, but it proved harder than assumed. There used to be a package called com.google.googlenav, but from that disappeared with the 1.0 release of the Android SDK. I kn...

How can i get Image Resource ID and send it to other activity in Android?

I am using a GridView. It contains images. When I click on any item of this grid view I want this image Resource ID to be sent to another activity. Where can I display this image in larger size? How can I get Image Resource ID and send it to other activity? ...

Android View Visibility GONE

If i set a views visibility which as been inflated, to gone, will it Speed up my UI? ...

Merge two Audio files in android

Hi Everyone, I am developing an application in which i need to merge and split audio recording. Can anyone give me a hint how to get it done in android? Does it require any external jar? Please help ...

Why is my SoundPool mute?

I setup my SoundPool, and load a sound resource as this in onCreate(): soundPool = new SoundPool(4, AudioManager.STREAM_MUSIC, 0); soundId = soundPool.load(this, R.raw.edible_underwear, 1); And then I try to play this sound twice in a onClick(), one slow mostly in left speaker, and one fast mostly in the right speaker: soundPool.play...

Why am I seeing an error when making a call from the adb shell?

This used to work: adb shell am start -a android.intent.action.CALL tel:1234 However, now I get this error: 09-08 14:35:57.821 W/dalvikvm( 1107): threadid=3: thread exiting with uncaught exception (group=0x4001b200) 09-08 14:35:57.841 E/AndroidRuntime( 1107): Uncaught handler: thread main exiting due to uncaught exception 09-08 14:3...

(android) How to do something on app "launch"?

I know Android's Activity model is a bit different from what I usually consider to be an "app". I want to do something (in this case, check some notifications on a server and show them if available) when my app is "launched". What is a good way to accomplish this? I likely don't want to do it in an activity's OnCreate, since each acti...

WebView JavaScript links work on touch but not when using trackball

I have a simple WebView-based activity that follows the Hello, WebView example to enable JavaScript and overload shouldOverrideUrlLoading(). This Activity works great when the user touches links on the webpage. However, if the user uses the trackball and clicks on a link, then the resulting page load shows a page with JavaScript disabl...

Android Draw Time

Whats a Good Draw Time? Im getting around 30-35 MS when i look at it in HeirchyViewer ...

Android ListView background colors always showing grey.

I have a ListView that I'm populating from a custom ListAdapter. Inside the Adapter (in the getView(int, View, ViewGroup) method) I'm setting the background color of the View using setBackgroundColor(int). The problem is that no matter what color I set the background to it always comes out a dark grey. It might also be worth noting that ...

What is the expected behaviour for DataSetObserver

Hi, If I register a DataSetObserver to my CurserAdapter, how many notification I exepcted to get in my DataSetObserver? CursorAdapter mAdapter; mDataSetObserver = new MyDataSetObserver(); mAdapter.registerDataSetObserver(mDataSetObserver); 1 per row in my database table? or just 1? Does it make a difference i...

android restart activity

how to restart an android Acitivity? I tried the following, but the activity simply quits. public static void restartActivity(Activity act){ Intent intent=new Intent(); intent.setClass(act, act.getClass()); act.startActivity(intent); act.finish(); } ...

Is my understanding of the functions of compass & GPS correct in AR apps ?

In an AR app whereby you annotate objects or buildings in a camera view, I want to understand the role, that different hardware bits - on the phone (iPhone/Android) - play to achieve the AR effect. Please elaborate more on the following: Camera: provides the 2D view of reality. GPS: provides the longitude,latitude of the device. Compas...