android

Architecture of an Android application

I would like to build an application, consisting of: four main menus - 4 buttons at the bottom panel act as "tabs" some child activities - like search result screen - a list view login screen The problem is, that I am not really sure, how to design the backend. At the moment, I use ViewFlipper. The main layout file includes others as...

Getting the error "device not found" when running a apk file from Android emulator

I am trying to install an apk file from command prompt but getting an error "Device not found". Kindly help. Warm Regards, Chiranjib ...

Get event on launching the native application

Hi friends, 1 . can we get any event when user tap/touch native application(i.e. messaging,contacts). 2 . i know that any application launch by intent in android, there is any way to know which application launch with launch of application. Thanks ...

Downloading files via a webView

Hi, I am currently implementing a webview that uses the default behavior of opening the browser. When the page loads in the browser and I click the download link that is on the page that was loaded, the download starts, and quickly fails. I guess its an unsupported file type. How would I go about setting the WebView so that I may handle ...

Android SDK WifiManager methods won't work?

For some reasons, this ain't working: wifi = (WifiManager) getSystemService(Context.WIFI_SERVICE); if(wifi.isWifiEnabled()) { tvStatus.setText("You WiFi is enabled"); } else { tvStatus.setText("You WiFi is disabled"); } Why aint this working, am i missing something? And it compiles and ever...

Android app unit testing

So, I'm new to android unit testing. I'm trying to write a unit test for the Phone application: package com.android.phone; import android.content.Intent; import android.net.Uri; import android.test.ApplicationTestCase; import android.test.suitebuilder.annotation.MediumTest; import com.android.phone.PhoneApp; import dalvik.annotation....

Very odd behaviour with launcher's task stack handling

I have an application with two activities, A and B. A is the root activity, which then starts B. When the stack looks like this: HOME > A > B ...and I select A from the launcher, I want it to resume the task without clearing the stack, so B is shown. Right now this is mostly working. However. In certain circumstances this occasional...

Bluetooth How can I prevent crashed aftet connect()

I want to connect my Droid via bluetooth to OBDKey . I get Exception : connectionFailed .How can I solve this problem? This is my part of code private class ConnectThread extends Thread { private final BluetoothDevice mmDevice; public ConnectThread(BluetoothDevice device) { mmDevice = device; int RFCOMM_CHANEL = 1; //...

How to view pdf in android browser?

friends, any one guide me how can i view pdf file in android browser? or any other useful way? any help would be appreciated. ...

Change Button position

I have a button in an AbsoluteLayout and I want to change the X and Y position on screen programmatically. How do i it? ...

how do I run torrentz on android?

Hi, I am not aware of any application on android that is capable of downloading torrents. So in-case I would like to port an unbuntu application like transmission or another similar light weight application would it be that easy. How much of socket programming would I actually require to do in such a case. Also if anyone is aware of a ...

How to save image loaded through url into sqlite database has a binary format

friend's, I need to know how to save image loading through url has a original image in sqlite database.how can i convert image url into binary format and to retrieve original image from database. Thanks in advance, ...

how do we start the activity from an application that is loaded dynamically using dexclassloader in android

hi, i just started with a new project where i am loading a class dynamically but im not able to start the activity of the loaded class. it will be helpful if u can explain it with some code. thank you ...

How i can use broad cast receiver in android

Hi, How i can use broad cast receiver in android, Please give me example or a reference to follow. Thanks ...

Android - checkable buttons on options menu

Can anyone point in the direction of any tutorials that show how to create an options menu with clicakble checks like in the picture below: I have tried as follows: /** Menu creation and setup **/ /* Creates the menu items */ public boolean onCreateOptionsMenu(Menu menu) { boolean result = super.onCreateOptionsMenu(menu)...

Where and How to call requestChildRectangleOnScreen()?

Hiho, I am trying to initialize the presented child from my HorizontalScrollView but it doesn't seem to work. How do I automatically scroll to the rightmost child of my ScrollView? Ideally inside to initialization code of the View, so that the user doesn't even see the left children first? ...

android: webview not loading javascript with custom WebViewClient

I've got a very basic WebView which works until I try to add a custom webViewClient where it stops processing JavaScript. Am I doing something wrong? Is there another way to get rid of the address bar and menu options in the WebView? browser = (WebView) findViewById(R.id.webkit); WebSettings webSettings = browser.getSettings...

How can I set dynamically created bitmap as livefolder icon in android?

How can I set dynamically created bitmap as livefolder icon in android? LiveFolder takes EXTRA_LIVE_FOLDER_ICON as ShortcutIconResource. Is there a way to reference dynamically created bitmap as shortcuticonresource? In the following code segment instead of using icon as int value I would like to set the file path for the newly created ...

Retrieving Android API version programmatically

Is there any API in the Android SDK that allows me to get the API version that the phone is currently running? ...

Disable trackball click in Android

Hello guys, I've run into some difficulties with implementing a custom progress dialog. Even though an overlay intercepts touch events the user can still operate the trackball and click elements that are supposed to be disabled. Is there any way around this? ...