android

how to overcome delay in Wifi Connection android programmatically?

Hi, Whenever I need to connected to wifi accesspoint.It will take time and some times gives unsuccessfull 0r disconnected state.But i need to connect Wifi immediatly within seconds.Every time I disconnect or disable wifi using WifiManager.disconnect() or wifiManager.setWifiEnabled(false) then all Accesspoints are dissappear from wifiSet...

Android ImageButton with Image and Text

I want to have a button that has an image on top and some text on bottom. Both the image and text are decided during runtime, so I want to be able to combine ImageButton's setImageBitmap and Button's setText for each button. Any ideas? Thanks Chris ...

Android ImageButton border?

I have a series of ImageButtons horizontally laid out in a LinearLayout. When I do a setBackgroundColor to GREEN, these ImageButtons all become GREEN rectangles, all connected that look like one single bar. Is there a way I can specify a border between these buttons, so I know where one button starts and where it ends? ...

Create multi instances of activity[in diffrent proccess] from a non-activity class

Hi all, I have a non-activity class which get a context. from that class i`am starting an activity of an extern application by raising Intent. that Intent being catched by intent-filter of the extern application. Now what I wanna do, in each context.startActivity(..) to create a new instance of the called activity(which is in the other...

Need to get the ID of audiofile in android

I can load a list with the following code String[] projection = new String[] { Audio.Media._ID, Audio.Media.DATA, Audio.Media.DISPLAY_NAME}; audioCursor = this.managedQuery(Audio.Media.EXTERNAL_CONTENT_URI, projection, null, null, Audio.Media.DISPLAY_NAME + " ASC"); startManagingCursor(audioCurs...

Can I block incoming calls without disabling Bluetooth - i.e., DND (do not disturb) mode - on Android

I tried posting this on the Android Developers list and didn't hear anything - maybe some of you have insight into this! I'm working on an app that should have the ability to disable incoming calls for a user-specified period of time. It should work much the way a "DND" (do not disturb) button works on an office phone. I've looked ove...

android - exit application code

I have an application wherein on homepage i have buttons for navigation through the application. In that I have a button "EXIT" which when clicked should take user to home screen on the phone where the application icon is. How can I do that? ...

android webkit change font size ?

how could I change my custom webview font size ? String summary = "<html><body>You scored <b>192</b> points.</body></html>"; webView.loadData(summary, "text/html", "utf-8"); I want to control the font(text) size of that string summary at webview. Can I control with addJavascriptInterface (Object obj, String interfaceName...

how to check my application running in memory or not?

dear friends, i want to check if my application "ABC" is currently running in my phone memory or not any one guide me how to achieve this? any help would be appreciated. ...

Android checkable submenu options

So I have a submenu that I have for an options menu item. I want a list of checkable entries that the user can select/deselect as many as they want. The only problem I can't solve is how to prevent the option menu from closing when one of the checkboxes is clicked. I saw the performShortcut has a FLAG_PERFORM_NO_CLOSE flag, but I'm not s...

Galaxy S Apps stuck @ Starting download forever

I got my Galaxy S from SingTel in Singapore. Since the day i got it I cannot download any apps from Android Market. However if I do a factory reset I can download 5 to 10 apps most. After that all apps stuck @ "Starting download". I kept in this state for 3 days. Nothing happens. Does not succeed or fail either. Any solution without fact...

focus problem of two webviews in android development

In two webviews we both have dom element like textarea. If we click on one textarea at this webview, and then click on the other textarea in the other webview, the focus problem comes out : they both focus and input method has problem WebView mWebView = new WebView(this); mWebView.setLayoutParams(webviewParams); mWebView.loadUrl("file:/...

How to import individual projects from Android Source Code

As far as I understand, all the built-in standard apps like (email, music, calendar etc) are built using the same API. So I should be able to import a project like mail / music etc without checking out the full source repository of android. I'v been trying that but I am getting compilation problems like class resolve failure. Am I doi...

Writing contact to contact database - Android 2.1

Im trying to write a new contact to the contact database. But I am getting the following error: java.lang.UnsupportedOperationException: Aggregate contacts are created automatically I have added the following fields in the manifest: <uses-permission android:name="android.permission.READ_CONTACTS" /> <uses-permission android:name="andro...

In Eclipse can I put the bin (and gen) folders elsewhere in an Android project

Very new to eclipse but doing some Android development so I'm using it now :) Is there anyway to put the bin and gen folders outside of the project directory? I want to have all the source controlled stuff in one place and all build products in another. (Yes, I know I could get source control to ignore those folders, but I'd still lik...

Changing Android system clock stops timers. How can I restart them?

Hello, I need to run a periodic task in an Android application. I currently use a timer like this: final Handler guiHandler = new Handler(); // the task to run final Runnable myRunnable = new Runnable() { @Override public void run() { doMyStuff(); } }; Timer timer = new Timer(); timer.schedule(new TimerTask() { ...

MediaRecorder.setMaxDuration(int timer) what happens when timer expires

According to the documentation, http://developer.android.com/reference/android/media/MediaRecorder.html#setMaxDuration(int) the recording stops when the timer expires. By stop, do they mean it calls internally recorder.stop() and then restores the state the app was in before calling recorder.start()? ...

Android adding footer to ListView addFooterView() ?

I have a ListView activity that needs a footer to the list of items so that you can click it and it would load more items into the list. The list is backed my an SimpleAdapter backed by a map of strings and before the adapter is set i do this inorder to add the footer: mInflater.inflate(R.layout.list_load_more_row, null); TextView foot...

calling a function in android after intervals?

dear friends, i want to call a function "ABC" after 10 seconds in android again and again untill i use return statement to quit. any one guide me how to achieve this? ...

Simple Chinese ebook reader + Dictionary

Hi there, I am thinking of writing a very simple ebook reader for foreign language (Chinese for starters) that doubles as a simple dictionary. So, basically I envision this app will function like a simple ebook reader (read txt file or epub) and allows you to flip the pages using keys or gesturing, remember where you last stopped etc....