android

Change the Text on an Android Tab

I have an Android app with 3 tabs in a TabHost (text labels, no images). I set up the tabs like so: intent = new Intent().setClass(this, AnnouncementsActivity.class); spec = tabHost.newTabSpec("news").setIndicator("News").setContent(intent); tabHost.addTab(spec); I start up a background thread to fetch announcements from my server and...

Using awt with android

I have a Java Swing application which draws diagrams. It uses Graphics2D calls and awt objects such as Rectangle etc. At some point I might want to port this to Android. I understand that I can't use Graphics2D on Android, but can I still use the awt Rectangle, Font, Color (etc) classes. What I want to do is to isolate any code changes...

Making changes to a built-in Android apps

I've pulled and compiled the latest Android tree. Now I want to make changes to the Android's Browser application. The environment in Eclipse is already set up. I tried creating the project by selecting "Build project from existing source", but it fails to build because it uses libraries not in the SDK. Does anyone know how to import...

Signpost OAuth on Android: how to re-create the Consumer between two succesive runs?

I'm succesfully using Signpost to authorize calls to protected resources in a Google account via OAuth. However it seems a bit weird that the user has to go each and every time through Google and grant access. Is there a way of serializing the Consumer and recreating it so that re-authorization is not needed? I've tried keeping the toke...

Can't deploy apk from eclipse in ubuntu 10.10

Hi! I've been making some apps for android for quite a while but I've only been using windows 7. Due to some reasons sometimes I'm forced to program in linux so I followed the guide to configure the SDK and eclipse (http://developer.android.com/guide/developing/device.html). After that I ran "adb devices" and got this: List of devices...

Android to Dumbphone Bluetooth

Greetings Coders. I'm trying to establish a connection between my Android Phone and an old Dumbphone. When I use this: tmp = device.createRfcommSocketToServiceRecord(UUID.randomUUID()); I get: "Exception: Service Discovery Failed" With This: Method m = device.getClass().getMethod("createRfcommSocket", new Class[] {int.class}); t...

How does Android handle background threads when leaving an Activity?

I need my Android app to save it's state to disk when its activity is put in the background or killed. It's been suggested that I start a thread when onPause() is called and perform any expensive I/O procedures there (see http://stackoverflow.com/questions/3894668/saving-loading-document-state-quickly-and-robustly-for-image-editor). In ...

Re-index/Refresh a SectionIndexer

Is there any way to re-index a SectionIndexer after new items are added to a ListView? I found this solution, but the overlay is position in the top left corner after the SectionIndexer is refreshed. Anyone have any ideas? ...

how to disable home key

i want to lock screen,i want to disable the home key only use the back key,how to do?android thanks. ...

Looking for mobile balance transfer study materials

I need to make a web application for mobile phones so that I can transfer balance from a 'recharge sim' (SIM card used to send balance to other mobile SIMs) located in whatever country to other 'non-recharge sims'. I can't find any resource - documentation, tutorial, forum discussion, programming language etc. Where should I start? Wha...

How do I add custom data and fields to the the Contacts screen in Android?

I'm trying to add a custom data field and MIME type to the Contacts screen. Is there a way to do this such that when a user views a contact with my data saved on it, my field appears there? This is something I've seen other apps do--how do the Facebook, Twitter, Last.fm, etc. apps add their status information to contacts, for example? I ...

How to replicate the popup box in the Twitter Android app?

The Official Twitter Android app has a neat way of presenting a message bubble when you click on a button. I was wondering how that can be done using the Android SDK? ...

frequent c2dm message request

hi all, I had develop an android app that allow user to request info from their phone based on chrometophone example. Everything is working well but i noticed that c2dm message only sent once to the device and subsequence c2dm will only reach phone after screen unlock. This make me annoy as my app required to get data from phone withou...

Can large String Arrays freeze my program?

Hello, I recently created a program that gets medi-large amounts of xml data and converts it into arrays of Strings, then displays the data. The program works great, but it freezes when it is making the arrays (for around 16 seconds depending on the size). Is there any way I can optimize my program (Alternatives to string arrays etc.)...

SimpleDateFormat Failing in Android

I was able to fix this, but I am wondering if I can get a good explanation for why this was broken. I created a utility function to handle my date conversions with the database for an android application. This code failed the second time it was accessed: public class Util { private static final ParsePosition pos = new ParsePosition(...

Looking for help testing an app

Hey everyone, I don't know if this is kosher, but I wanted to see if anyone would want to test an app I built. I don't want to release an app to the market without getting out all the bugs I can, but I'm a lone developer trying to build apps on the side in my free time. I don't know many people with Droids, so I'm trying to reach out ...

JavaScript for replacing text in the body tag of pages loaded into an open source browser for Android

I'm writing a JavaScript for an open source browser available for Android to replace the text in the body tag of the pages loaded into the browser with some different text. This should be worked in away that once a page get loaded into the browser, this JavaScript executes & the replacements take place & finally the page with replaced ...

Import a vcard 3.0 automatically into android contacts (Android 2.1)

I'm trying to import a vcard (vers. 3.0) automatically into the android contacts. Within the contact manager there is an option to import a vcf file stored on the sd-card into the contacts. How can I trigger this function with handing over a file? ...

Pointers getting mixed up in android

I'm using ant to compile my android projects into debug apks. But sometimes when running my app, objects are getting mixed up and showing up at the wrong places. For example: <TextView android:id="@+id/deviceText" android:textSize="22sp" android:textColor="@color/white" style="@style/shadow" android:layo...

make image's particular part click listener in android

Hi guys, I have an android application, which needs to display an image and make that images particular part click listenable... anybody please help me with some hints.. ...