android

How to set unit for Paint.setTextSize()

Is it possible to change the unit for Paint.setTextSize()? As far as I know, it's pixel but I like to set the text size in DIP for multiple screen support. Thanks ...

android mediarecorder exception

I try to use the MediaRecorder class to record a video but I get an exception : failed to get Camera parameters. Prepare failed. Here's my code : camera = Camera.open(); recorder = new MediaRecorder(); recorder.setCamera(camera); recorder.setVideoSource(VideoSource.CAMERA); recorder.setPreviewD...

Android emulator not showing the app. it only shows the skin :(

Hello. i started to develop android apps a few days ago. But i'm stuck with this problem. using Eclipse. with ADT. and creating the simple "helloWorld" or any of the other sample applications, when i Run the project eclipse launch the android emulator but it shows only the skin, with the screen saying "ANDROID", and that's it!, it's unre...

Download And Install apk from a link.

Hi, I`am trying to download and install an apk from some link, but for some reason i get an exception. I have one method downloadfile() which downloading the file and a call to and installFile() method, which supposed to install it in the device. some code: public void downloadFile() { String fileName = "someApplication.apk"; ...

facebook connect for android

Hi I am looking for a solution for facebook connect for Android. Before I used an open source solution from codecarpet: http://code.google.com/p/fbconnect-android/ but now it doesnt work anymore. Now the Official facebook connect for Android is out, but there are about 11 big time issues and it fails almost all the time, so its not ...

How can I use the paid version of my app as a "key" to the free version?

Let's say for example that I have some Android app that does X. The free version has ads or basic features. I want to have a paid version that removes the ads and adds extra features. How can I use the paid app as a "license key" to unlock the features in the free app? So the user would install the free app, then install the paid app...

how to store username password in device memory

How to store username password in device memory. Even after the user closes the application and returns back , he should be able to authenticate his username and password. Right now I am testing in Eclipse... so please help me with some pointers/links which will allow me to test in Eclipse and eventually run on Mobile. ...

Implement Animated Textview\LinearLayout for TickerTape effect in Android

I want to implement a tickertape effect that will display 3 messages. The messages will scroll across the top of my application in a single line with each message seperated by a small image. I have initially used just a TextView with one message as a test and used an animation effect to translate the Textview into view. But I encounter...

BluetoothChat doesn't work

Hello I want to make conversation between android devices. I use BluetoothChat to do this but it doesn't work I can't read correctly data from another device. Conversation is : Me: privet Device: p Device: rivet Can you help me? private class ConnectedThread extends Thread { private final InputStream mmInStream; private f...

disable incoming calls

is it possibe to disable incoming calls. ...

Child Activity in Android

So I have two Activities. The main is called Main, and the child one is called Child. When a button is clicked in the main activity it triggers the following piece of code: Intent i = new Intent(Main.this, Child.class); Main.this.startActivity(i); That opens the Child activity. As soon as I call finish() or press the back button with...

Android vs iPhone

I know iPhone development fairly well. From personal experience, how hard would it be for me to get into Android. I am concerned less about code than I am about distribution of my software, given the fragmentation of the Android OS on compatible devices. EDIT: Thanks for all the great input so far. I just have one more point to clarif...

Android - two way contact sync

Hey, I'm developing an application that needs a two way sync of its own custom contacts. I saw the sample code on Android developer website (talking about AccountManager here and the sample sync adapter code), but that only syncs from the cloud to the device. Is there a way to do the two way sync? Can someone point me in the right dire...

Canvas clipping rect - right/bottom edge inclusive?

Hi all, on Android, there's a Canvas class that represents a drawing surface. It has a clipping rect. Question - are the rect's right and bottom borders inclusive or exclusive? In other words - if the rect is (0, 0)-(10, 10), will the Canvas allow drawing in pixels at coordinates 10? ...

Text Invertion Android

Hi Anybody knows how to write upside down text of edit text in Android thanks /minhaz ...

Android Map Itemized Overlay

In the android developer's webpage there's an example on how to show an alert dialog when the user taps on an item in the map. What I want to do is show the default bubble the maps App shows when you tap on a POI. Is there a way to do this? Am I missing something here? ...

How do you activate the LED light on an HTC EVO 4G?

Trying to activate the LED to use as a flashlight on the HTC EVO 4G. I know this is possible because there at least a couple applications in the Android Market (LED Desire Light, Tesla) that do this. I've tried using setFlashlightEnabled, which I'm told works on the Droid. On my Nexus One with Froyo I used setFlashMode to set the mode t...

Android framework source level debugging in Eclipse

Hi all, the Java sources for the Android framework are available at source.android.com. Can I download and feed them to Eclipse so that I can step into framework methods while debugging? Better yet, does anyone know of an Eclipse plug-in that would get them from Android Git automatically as needed? EDIT: during debugging, I can step th...

findViewById vs local reference in Activity

Would it be there noticeable speed improvement if I would create local references to needed view elements (e.g. EditText or Button) in my activity (in onCreate()) and use them for accessing needed elements or it does not much matter if I always use findViewById() when I need to access some particular element? ...

how to Set already running activity, when user clicks on app icon on home screen

I have Two activities One splash screen, Player screen. When user clicks on my app icon first splash screen is displayed and then player screen When player activity is running, if user returns to the home screen and then again clicks on app icon, the application is starting from the splash screen again. can any one please help me ou...