android

WebView not loading Assets correctly...

I have a WebView that I'm using to display some html/image files stored in the assets/ directory. I'm able to have the WebView load and html page fine with: mWebView.loadUrl("file:///android_asset/ContentRoot/SubDir/file.html"); or String data = StaticFunctions.inputStreamToString(getAssets().open("ContentRoot/SubDir/file.html")); m...

Android permissions: Phone Calls: read phone state and identity

My android app has nothing to do with phone calls, but I'm seeing that when I install a debug build on my test device it requires "Phone Calls: read phone state and identity" permissions. (I make no mention of this in AndroidManifest.xml). I'd like to have the minimum possible permissions, and wondered if anyone knew how to get rid of ...

How to align the text to top of TextView?

How to align the text to top of a TextView? Equivalent Android API for Swings setInsets()? that is top of text should start be in (0,0) of TextView <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_pare...

Sample Android BSP(Source) for ARM

I am looking for a ARM processor version of Android BSP to port it for one of my experimental boards. Where can I download this? Any help in this is greatly appreciated. Thomas ...

[Android] How to know which overlayitem is being tapped?

Hi, currently I used a map view and placed some overlay items in them I overiden the onTap function in ItemizedOverlay so that when user tap on the markers icons on the map, some action will perform. However, I don't know how to know which marker is being tapped so that the related data of the item will be displayed in the screen. How ...

how i can get the each sms id in android

actually i want to delete sms from inbox as per id i am using following code but it showing error my code: Uri deleteUri = Uri.parse("content://sms/"); Cursor m_cCursor=context.getContentResolver().query(deleteUri, null, null, null, null); int m_cnum=m_cCursor.getCount(); int id =m_cCursor.getInt(0); int thread_id = ...

Making TextView Scrollable in Android

I am displaying text in a textview that appears to be too long to fit into one screen. I need to make my TextView scrollable. How can i do that? Here is the code final TextView tv = new TextView(this); tv.setBackgroundResource(R.drawable.splash); tv.setTypeface(face); tv.setTextSize(18); tv.setTextColor(R.color.BROWN); ...

Which handset for university Android programming classes?

Next year there will be Android programming classes on Wroclaw University (Poland) but handsets for excersises needs to be choosen now. I was thinking about HTC Hero because: as HTC device it is a reference model for Android ecosystem; it will run system version 2.0; it has fair features/price ratio. Are there any arguments against H...

Is Android 2.0 backward compatible

I have a CLIQ 1.5 and a Droid 2.0 each wired to my PC via USB. I have written an application that simply reads contacts from the device (not some linked account) and they show up fine on the CLIQ but an empty list appears on the Droid. Don't tell me I need two versions of this app??? My manifest is targeting the least common denominat...

Android - clear history when navigating between Activities

I have 3 Activities that my user continuously is looping through. When user is back to the main screen I need to terminate previous history so user cannot hit back button and end up on screen #2, what would be a good way to do something like that? BTW - I'm using 1.6 (API level 4) To reiterate - say I don't know or predict the path whi...

Android: Anyone knows how long the web history is retained for?

I was wondering if anyone knows if android clears up the websites visited log from inside its database based on date or number of entries in the database... Any inputs? ...

Is it possible to enable the WebKit JavaScript Inspector in mobile web browsers?

I would love to use the Web Inspector development tools that come with webkit on a mobile browser. Does anyone know if it is possible to enable web inspector on say the Android web browser ?? ...

How to scale markers on Android, and set shadow and onTap correctly

I'm scaling markers on a MapView with the following code OverlayItem oi = new OverlayItem(point,"Title", "Desc"); oi.setMarker(getCustomMarker(0.5f, 0.5f)); itemizedOverlay.addOverlay(oi); and: private BitmapDrawable getCustomMarker(float scaleWidth, float scaleHeight){ int width = originalMarker.getWidth(); int height = orig...

Why keep throws Rescources.NotFoundException?

In the following code, these lines: "score.setText(shops[i].getScore());" and "icon.setImageResource(R.drawable.test1);" the app keep throws the Rescources.NotFoundException. I checked the xml file, all the ids are defined and they are all in the R.java. So I really don't know why the app throw this exception. Could anyone help me on th...

Android Factory_Test permission for Root access

Hi, My application needs ROOT permission on Android phone. So, I tried running the application with FACTORY_TEST permission in the manifest XML. I did this because the Android developer guide says But I could find a way if the emulator can be factory mode. So, is there a way to do that?Or do I need an Android device to do that?For tha...

Remote debugging with Android emulator

Is it possible to write the code/compile Android application on one machine and debug it remotely on the emulator launched on another? I'm sick and tired of the emulator constantly eating half of my laptop's processor. ...

I want to create a compass in my android app, how to do it?

I cannot find any tutorial on the web. How can I do it in a simple way? ...

Android SMS API

I know that the SMS content provider is not part of the public API (at least not documented), but if I understand correctly it's still possible to use many of the SMS features as long as you know how to use the API(?). E.g it's pretty straightforward to insert an SMS into your inbox: ContentValues values = new ContentValues(); values...

Android and reflection

I get the impression that Android supports reflection. But does it really? How sensible would it be to rely on reflection heavily? What's the penalty? ...

PreferenceActivity NullPointer Error

I keep getting nullpointer exception when i switch to my preferenceactivity. I have no idea what wrong but i keep getting a error when i load in my preference which is done programmitically. public class SettingsFrontEnd extends PreferenceActivity implements OnSharedPreferenceChangeListener { public static final String NO_SELECTION...