android

How to set icon inside the main app page in android ?

Hi Everyone, I have an android app and I want to set an icon. I have set the icon using androidmanifest.xml and that shows the icon inside the app list. However, I want the icon to be displayed while the application is running, also. Any help/hints ? Thanks. - ahsan ...

Android - How would you optimize searching in a REST response cache database?

I'm writing a thick client for a REST based web service (for Android). I'd like to cache results that I got from this service, and I'd like to store these results in an SQLite DB. There's a single table in this db, every record represents a past transaction with the web service. In its schema, there's an attribute for: the http reponse c...

webview loaddata scroll setting not updating till clicked

Hi, I update the html in a webView using loadData() followed by a reload(). I get the new data to display but the scroll of the page has not updated. I want to keep the view of the page at the bottom. I can wait a long time and it still doesn't update. Once I click the webView the scroll bars adjust and I can drag to the bottom of th...

How to add widget configuration activity to launcher?

Hi, I have a widget with a configuration activity. Currently the configuration launches when you click on the widget. I want to add the configuration as an app icon to the launcher. The problem is that when the configuration launches on click, I get a specific widget id , so each widget instance can have a different configuration. W...

Social networking in Smart phone

Hello, I have to implement social networking sites in my iphone, blackberry and android applications. I have implemented one radio application in which I have to post status on the regular bases. So, I want to ask that is there anyone who have implemented the facebook,twitter, myspace, linkedin, orkut and flicker in the iphone, blackber...

Setting android:gradientRadius via Java

Is it possible to set android:gradientRadius of a drawable via Java or is it only possible to set this attribute via Xml? ...

How to assign utube video url to android media player.

I want that when i will pass the utube url to media player it will automatically load the video and play in it. Example: http://www.youtube.com/watch?v=WAG8e_53le4 This type of url i want to play in android media player ...

How to find out, why the "R" (resource) file is not generated?

Again and again I have the case that during development, the Android SDK suddenly doesn't regenerate the "R" file. Usually this is due to some error in one of the many .xml files, but that darn thing doesn't give the slighted indication, as to WHY it suddenly refuses to regenerate that file. There is no error or warning listed for any o...

Reverse Geocoding in Android App

I am trying to Reverse GeoCode current Lat/Long data to just Admin Area and Sub Admin Area using the Geocoder class. I am using the NETWORK_PROVIDER as the Location provider. Here is the code that I use and it works. The problem is sometimes it does not give me any location sometimes it does. Android Manifest permissions I am using. <...

Android textview stackoverflow when using Hebrew

Hello. My app is retrieving data from a RESTful http source. Sometimes, there will be Hewbrew text. title קול המדיה, עמוד הבית content הפיג'מות - עונה 6 פרק 12 עכשיו לצפייה ישירה! קישור: הצג את הדף Everything is fine until it has to be used in a textview. I'm using my own list adapter and the following happens when this text tries to ge...

Building two APK's from one Android-Source-Tree

I got a application for android which downloads and parses some data from a internet-source. Nothing special here. But, I need the application for two difference source, with slightliy different source-code. Currently there are simply two applications in the AndroidManifest and two slightly different Activites, which override a big abstr...

Getting current suggestion from `AutoCompleteTextView`

How do you get the current top suggestion in an AutoCompleteTextView? I have it suggesting items, and I have a text change listener registered. I also have a list on the same screen. As they type, I want to scroll the list to the current "best" suggestion. But I can't figure out how to access the current suggestions, or at least the ...

Android emulator crashes when I try to run HelloAndroid

LogCat filtered by errors is in the following: 10-17 19:08:18.650: ERROR/vold(26): Error opening switch name path '/sys/class/switch/test' (No such file or directory) 10-17 19:08:18.650: ERROR/vold(26): Error bootstrapping switch '/sys/class/switch/test' (No such file or directory) 10-17 19:08:18.650: ERROR/vold(26): Error ope...

A Java question, but an Android question, here's why:

The only available reproducible example I can find to share with the board is the Android sample code NotePad, which is loaded into the IDE's Package Explorer as 'NotesList'. I want to know why, in the package's NoteEditor.java, LinedEditText (extended from EditText) can't be renamed? In other words why can't I rewrite this extended cl...

Android ListPreference - Preform a method on listItem select?

Hello, I've created a ListPreference in PreferenceActivity and it works good: user clicks on the Preference item a list dialog opens (retrieves listItems and their values from array.xml) if the user selects one of the list items it saves his selection (which I can later retrieve). My question is: how can I preform a method the secon...

android: get imageview in code

hello, how can i get a variable on the imageview that i have defined in a layout.xml in the code? thanks! ...

Android: trying to find an item in a list without filtering the list but just scrolling to that item

Trying to implement simple dictionary. I want to make it so while the user is typing in the EditText box the list to scroll automatically to the best match. I don't want it to filter the list. For example if the user types "s" in the EditText I want the first word that s/he sees under the EditText box to be the first word in the dictiona...

Android equivalent to Java's Swing JSpinner

Hello everyone, I want to use a control similar to Swing JSpinner in an Android application. I know that Android has a widget called Spinner, but it's more like a combo box than a JSpinner. I've noticed that DatePicker and TimePicker widgets are using components that are just like JSpinner. The only problem is that I don't really want D...

Android Assets-Folder: it takes always the first file by alphabetical order

Hello I'm new in Java/Android programming, so please have patience with me. I try to play a mp3 which is locate und the assets folder. I know there is another way with the /res/raw/ folder, but use the assets-folder because later I'll try to access the file by String. This code works to play a mp3-file: try { Medi...

[Android] Show spinner wheel instead of image while downloading the source

I am going to create a gallery view where the user shall switch between different pictures of products. On some of them is going to be a label like "sale" and a short discription. On startup I want to display a loading animation at that place until the product photo is downloaded. Use layer list or state list for one product photo? Co...