android

Why my buttons OnClick event fails to fire?

I have an activity, where the ListView holds customized linear layout elements for each row. One of the rows has a button defined as: <Button android:text="Pick a contact" android:id="@+id/btnPickContact" android:layout_width="wrap_content" android:gravity="center_vertical" an...

The key must be an application-specific resource id.

Why do I get this Exception? 05-18 20:29:38.044: ERROR/AndroidRuntime(5453): java.lang.IllegalArgumentException: The key must be an application-specific resource id. 05-18 20:29:38.044: ERROR/AndroidRuntime(5453): at android.view.View.setTag(View.java:7704) 05-18 20:29:38.044: ERROR/AndroidRuntime(5453): at com.mypkg.viewP.infla...

startActivityForResult and Intents Extras, it seams extras are not pushed back

I have this code: Intent intent = new Intent(); intent.setAction(Intent.ACTION_PICK); intent.setData(ContactsContract.Contacts.CONTENT_URI); intent.putExtra(EXTRA_ONLINE_ID, (String) v.getTag()); startActivityForResult(intent, PICK_CONTACT); Then on response: public void onActivityResult(int reqCode, i...

View problem - how to show integer from activity in XML?

Hi there, I started two days ago with android, gone through the hello android stuff and also started to read the Hello Android book, which is great. PROBLEM: I use in my app - VERY EASY APP- the XML output. So basically the main activity just tells the android to show the XML layout of main. But what if I have in the activity - code ...

does android.net.wifi support EAP?

I have built a WiFi connectivity client that supports OPEN and PSK modes. Now I want to add EAP support. Does the Android API support this? I see WifiConfiguration.KeyMgmt.WPA_EAP, but no information about how to set the underlying authentication protocol. I'm looking to support EAP_TTLS. ...

Load files bigger than 1M from assets folder

I'm going crazy, I created a file object, so it can be read with ObjectInputStream, and I placed the assets folder. The method works with a file smaller than 1M, and give error with larger files. I read that is a limit of Android platform, but I also know that can be "easily" avoided. Those who have downloaded the game Reging Thunder, fo...

How to set background image for Android button but keep the gray button?

I need to set a background image for an android button (text button), but I want to keep the gray button. When i use the setBackgroundResource() it has the image in place of the gray button. How can I keep the gray button? I tried using setCompoundDrawablesWithIntrinsicBounds, but the image only takes up part of the button, even when ...

AutoComplete From Contacts in Android Based on Name or Email

I have a field in an Android app that I would like to autocomplete from the user's contacts. I can get it to autocomplete based on partial entry of a particular name from the contacts, but I would like for it to autocomplete based on entering either the name or the email address of the contact. Here's the relevant code: @Override p...

playing two streams on android

Hello, I'm looking for a way (or at least to be pointed in the right direction) to play two streams of audio on android simultaneously but each on a different channel (e.g one in the speaker and one through the headphones) I'm not even sure its possible hardware wise. Any thoughts, clues ? Y ...

Android - update widget text

Hi, i have 2 questions about widgets update I have 2 buttons and i need to change one button text when i press the other one, how can i do this? The first time i open the widget it calls the onUpdate method, but it never calls it again. I need to update the widget every 2 seconds and i have this line in the xml. android:updatePeriodM...

How do I send coordinates to android through a shell script?

Hi, I've got a question about android and GPS coordinates. I've got a script done in python, which opens a socket and sends a bunch of coordinates to an emulator. On the emulator I have an application running where I've registered an OnLocationListener. The idea is to capture the coordinates and animate the map towards those positions....

Wait for inline thread to complete before moving to next method...

Hello, I have an android app where I am doing the following: private void onCreate() { final ProgressDialog dialog = ProgressDialog.show(this, "Please wait..", "Doing stuff..", true); new Thread() { public void run() { //do some serious stuff... dialog.dismiss(); } }.start...

TextView defined in main.xml - how to "name" it to be able to use - setText() method?

Hi, I am exploring android and developement and I found one problem. My app UI is defined in main.xml I have 2 texts and 2 buttons defined - easy app. I read that I may be able to change TEXT in the ACTIVITY using the setText() method. And thats the problem - how do I POINT the setText() Method? How do I tell it to change a specifie...

Regarding Android Application Development

Hi What I need to do for making a customized rectangular bar having a logout/login button at the top of android screen ? for eg : top navigation bar in iPhone. Thanks ...

How to make .EXE for demonstration of a Android Software built in eclipse?

I am almost done with my project in android, now I want to make the executable version of the application. I need to demonstrate it in .exe form as soft app as on emulator, not by built and debug process from eclipse. need immediate idea ...

ListView - Index and Position Behavior upon restart()

I am using a ListView with an ArrayAdapter that holds objects. When I select an item, I am capturing the position and index of the selected item. If I scroll down prior to selection, the position and index represent the location of the item in the list. Selecting that items takes me to another activity. When I use the back button to retu...

Integrate Google Calendar and other services on an Android App?

How can I integrate services like Google or Microsoft and use information from the user like Google Calendar information. For example, how would I sync the Microsoft Outlook notes with an app on Android? ...

android dev: how to implement for add method in menu interface?

who knows about the method "add" in menu interface? how to implement exactly? which is it's imlementation class? i couldn't find detail implementation in source code of sdk. i want to check how to implement in android source code for "add" method. e.g. public boolean onCreateOptionsMenu(Menu menu) { menu.***add***(0, MENU_NEW_GAME,...

How to hide app title in android

i want to hide the app title. ...

Sample code for image upload

Hi, In would like to write a simple Android application that takes a picture from the camera and uploads it to a webserver. Additionaly, I would like it to print in the screen the response from the server wich is a simple text string. Do you know if there is any sample code that does something like that? Thank you, Michael ...