Tag: android

Android Emulator does not work on Ubuntu after upgrading Android Studio to 2.0 – Qt library not found

Today, I updgraded my Android Studio installation to version 2.0. I updated it manually (download the .zip, because the update mechanism just telled me that there is a new version but offered no possibility for direct update in Android Studio). When I now try to start an emulator, I receive this error message: ERROR:./android/qt/qt_setup.cpp:33:Qt library […]

How to read data from bluetooth barcode scanner Symbol CS3070 to Android Device

In my project i have to read barcodes using barcode scanner Symbol CS3070 through bluetooth. i.e; i have to establish a connection between android device and barcode scanner through bluetooth. Can any one tell me how to read values from barcode reader and how to setup for communication? I’ve already read the Bluetooth Developer Guide, […]

How to get the ID of the clicked child view added dynamically to a LinearLayout?

I am adding a child view to a Linear Layout. The child views itself has some textview and imageviews in a Relativelayout. The child view is added dynamically in the LinearLayout on clicking a button. Right now I am able to add the child view as shown in this pic. http://dl.dropbox.com/u/50249620/SC20120926-031356.png what I have to […]

Save and restore expanded/collapsed state of an ExpandableListActivity

I have an ExpandableListActivity (using a SimpleCursorTreeAdapter) which starts another activity when the user clicks on a child-element. When pressing the back-button in the new activity all the list-items are collapsed again. How do I save the expanded state of the ExpandableListActivity and restore it again. I already tried to implemented onSaveInstanceState() and onRestoreInstanceState() like […]

AudioTrack: Playing sound coming in over WiFi

I’ve got an AudioTrack in my application, which is set to Stream mode. I want to write audio which I receive over a wireless connection. The AudioTrack is declared like this: mPlayer = new AudioTrack(STREAM_TYPE, FREQUENCY, CHANNEL_CONFIG_OUT, AUDIO_ENCODING, PLAYER_CAPACITY, PLAY_MODE); Where the parameters are defined like: private static final int FREQUENCY = 8000, CHANNEL_CONFIG_OUT = […]

what is stringentity in android and its use

I am new to android , i am following this tutorial, i have found the code below , there he is converting json string to StringEntity. correct me if i am wrong StringEntity is used to pass the data,Headers like Accept,Content-type to Server. // 1. create HttpClient HttpClient httpclient = new DefaultHttpClient(); // 2. make […]

What is an API token

I’m trying to work out the best way to handle user authentication for my mobile application (iOS & Android) and API (PHP). From what I’ve researched the options are: Basic auth over HTTPS – Check username/password of the user for every request. Sessions – Send a session ID with each request; server maintains state. So […]

Android std and stl support

I am playing with android ndk. I am using Window Vista with cygwin (latest version). I compiled and launched the hello world jni sample on my phone. It is working. The code is (is a .cpp file): #include <string.h> #include <jni.h> extern “C” { JNIEXPORT jstring JNICALL Java_org_android_helloworld_HelloworldActivity_invokeNativeFunction(JNIEnv* env, jobject javaThis); }; jstring Java_org_android_helloworld_HelloworldActivity_invokeNativeFunction(JNIEnv* env, […]

Why does it matter where the Toast is made in Android if the context is the same?

I have a legacy IntentService that attempts to use Toast messages to display error messages.1 I’d like the messages to be displayed, and have added code to get them on the correct thread. The simplest change would be to pass in the constructed Toast object and then display it on the UI thread. However, the […]

iOS: How to achieve behavior like Android's startActivityForResult

I’m an Android developer working on an iOS version of our app. I need to know how to achieve behavior similar to startActivityForResult on Android. I need to show a new view controller, then have control return to the previous view controller when the new view controller is closed. I also need a callback method […]

Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.