android

What's the simplest way to measure the throughput of a device

Hi! I need to measure the throughput of an android device. I was thinking of measuring it using a simple client-server code working with TCP, which should be quite simple. Would you say the TCP overhead would lead to an approximation within 10%/20% of the real throughput? Thanks! ...

I have a memory leak using ListActivity in Android

I have an application that uses a Service and some list activities. When the activities are opened, I can see the heap usage increase in DDMS, when the activities are closed, the heap usage decreases slightly. The service is still running in the background at this point. If the activity is started again by re-running the application and ...

Android: Loading multiple text files from assests into a textview...

I have managed to load/stream a text file from my assests folder into a textview. How do I load multiple text files from assests (may or may not be from same directory) into one textview? ...

Error when playing Media Files

I'm using MediaPlayer to play some sounds files, which at times overlap. I notice that in the LogCat window I keep getting this message: android max instances of component OMX.TI.ACC. Decode already created. It seems to have no effect on my application as the sounds continue to play just fine. Does anyone know what this message means, ...

How can I style an HTML INPUT tag so it maintains CSS when focused on Android 2.2+?

I was delighted to discover that Android 2.2 supports the position:fixed CSS selector. I've built a simple proof-of concept, here: http://kentbrewster.com/android-scroller/scroller.html ... which works like a charm. When I attempt to add an INPUT tag to my header, however, I hit trouble. On focus, every device I've tried so far clone...

How to change the android sharedPreferences save path?

I want to change the android sharedPreferences save path,the sharedPreferences save in /data/data/xxx.xxx.xxx/shared_prefs,i want to change path to /sdcard. how i do? ...

TableLayout differences when populating programmatically

I'm getting different results when creating a TableLayout from xml vs. programmatically. In pure xml, all three children of the TableRow (which are ImageView subclasses in my test code) expand in width so they fill the table horizontally, each taking one-third the width. But when done programmatically, they are always the minimum size ...

Variables and Multiple Activities

How can I make a variable or object available to multiple activities or restarts of the same one. ...

How to change the android database storage path?

How do I change the android database storage path? The default path for database storage is / data / data / databases,I want to save it to sdcard, how to do? ...

Android. SQLite Exception: no such column _id

Hello! Im having some troubles trying to get the info stored in my database and showing it in a ListView. This is the ListActivity where i want to show the rows: public class Prueba extends ListActivity{ /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { s...

Titlebar shrinks when I specify a minSdkVersion in AndroidManifest.xml

I am trying to specify the minSDKVersion: <uses-sdk android:minSdkVersion="5" /> Whenever I add this line, my titlebar shrinks a little bit. Not sure why? When this line is not in my manifest, everything is fine. <application android:icon="@drawable/icon" android:label="@string/app_name" android:theme="@style/Theme.DarkGra...

What happens if the minSdkVersion is lower than the targetSdkVersion?

I am getting the warning: Attribute minSdkVersion (3) is lower than the project target API level (8) How will this affect my app? ...

Android sample application

Hi folks, I just started working with Android apps and was trying few sample programs. I noticed an issue with the main.xml file. It happened twice today, I added few new layout views in main.xml (Using Layout and XML both), as soon as I made a modification and tried running the program, the R.java class would throw an error, al...

android expandablelistview onitemselectedlistener

Hi All , every time i wanna use a event listener in android , i always meet a problem... how to write the code? where is a sample code? how do i learn that? now i want to write a ExpandableListView OnItemSelectedListener , where can i find a sample?? or how to learn to write every listeners in android?? ...

Asynctask taking ridiculous amount of time

Hello, My problem is that I had a program working before, without threading, and it took a long time to process info (16 seconds to get XML data and display it). Now I've gotten the whole threading and async thing down, but for some reason it is making my program SLOWER (in the emulator, device is not available right now), is there anyt...

Robotium test fails with: junit.framework.AssertionFailedError: View can not be clicked!

I just got started with Robotium and tried a first very simple test, but experience some problem which I can't explain / doesn't seem logic to me. I have a TabHost with an ActivityGroup and a toggle button on each activity that's displayed in the tabhost content section. When I press the toggle button, the tab content area changes to an...

how to detect the codec of gbk(china standard) and utf-8 on android phone

Hi,all: i want to write a txtbook reader for my android phone, but the encode confused me, my code just cannot recognize encode of text automatically. so, can any one tell a way to fix it ? ...

simulate 3G n/w using wifi

I am working on a Android application which can only run on a 3G network but We currently do not have a 3G network available in the country. Is there any way to hack/modify some parts of Android's connectivity Manager or other framework components to simulate the behavior that we are using 3G n/w but underlying the requests are being pro...

Uppercase url in fromHTML results in crash

Why does this crash when touched: text_link.setText(Html.fromHtml("<a href="HTTP://WWW.GOOGLE.COM"&gt;Test&lt;/a&gt;")); But this works fine: text_link.setText(Html.fromHtml("<a href="http://www.google.com"&gt;Test&lt;/a&gt;")); The only difference is the url in the first is UPPERCASE and the bottom is not. ...

Frame animation in android???

Hi, iam new in android. I am using frame aniamtion for displayaiying some images. But its working only in a button action.I want to call this function when the program starts...how can I achieve this with out a button?I use the following code for the animation: public class FrameAnimationActivity extends Activity { @Override public void ...