android

android expandable list selector

How do you set the listSelector for an expandable list? I have set: listSelector="@android:drawable/list_selector_background" but this only seems to affect the group section rows, not the child rows underneath those. ...

Using a Gallery to swipe between Views

I am following the Android Gallery tutorial (http://developer.android.com/guide/tutorials/views/hello-gallery.html) but instead of simple images I'd like to be able to horizontally move to a complete new screen, e.g. a LinearLayout. The idea is a kind of tabbing behaviour but the user can swipe though the screens. I created a gallery, c...

resample / upsample sound frames from 8Khz to 48Khz (Java/Android)

Hi there, The application that I am trying to develop for andriod, records frames at 48Khz (PCM 16bits & mono) and sends them to the network. Also, there is an incoming stream of audio at 8Khz. So, I receive 8Khz sampled frames and play them (my AudioTrack object is set to 8Khz), but when playing them, everything works but the latency i...

Accessing Android Inbox/Messaging from Activity?

Is it possible to open up the default Android Messaging activity from inside an activity you write yourself? Like for example: I press a "Mail" button inside my program, and it opens the Android Messaging app just like as if I was to press the Messaging icon on the main screen. I did something similar to this with the Contacts activit...

Saving and restoring state in android

I have searched through this and a few other sites for the answer, but I have been unable to find it. I am trying to save a boolean and an int using onSaveInstanceState and onRestoreInstanceState, but I can't seem to get it to work. It doesn't crash or anything, but it either isn't saving it or it isn't restoring it, or I am stupid and h...

Is there any way to detect in an adapter,when getview() returned the view?,Android

So i have a list and i wan to check is the view is returned so i can call loadingAnimation.start() to make a imageview insite listview animate Let me tell you what i mean.. public View getView(final int position, View convertView, ViewGroup parent) { final ViewHolder holder; if (convertView == null) { .... blah b...

Android SQLite: How to insert data in to a single column of an existed table

Hallo all, I have two files, one called "part1.txt" and another one called "part2.txt", which look like following part1.txt part2.txt lili like eating apple lucy like playing football Now i want to insert the contents of these two files into a single table with the schema table_name(linefromp...

Error in Android

uncaught handler:thread main exiting due to uncaught exception android.app.SuperNotCalledException:Activity did not call through to super.OnCreate() My Code is: public void onCreate(Bundle savedInstanceState) { boolean isEnabled = Settings.System.getInt(this.getApplicationContext().getContentResolver(),Settings.System.AIRPLAN...

Android 1.5-specific error

Hello, I am having trouble with with getting my application to function on android 1.5. It works fine in 1.6, 2.1, and 2.2 but whenever I attempt to run it in 1.5, I get an immediate force close with the LogCat output: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.qrohlf.activites/com.qrohlf.activites.Book...

Android: Parsing URL into web service without space character

Hi, All I want to do is to send a URL String into my RESTFUL web service with some kind of code like this URL someURL= new URL("http://myWebService:port/service/"+CharSequence.getText()); Its all going well until I found error with space character in my URL. I found some solution about replacing the space character with %20 which is I...

android development, google premier login

i am developing an android application that needs to have the user sign in using their google premier login. my question is can i accomplish this programmatically? if so how? thanks! ...

modified android ACTION_VIEW intent

I execute the following code: Uri uri = Uri.withAppendedPath(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, imageIdStr); Intent intent = new Intent(); intent.setAction(android.content.Intent.ACTION_VIEW); intent.setData(uri); activity.startActivity(intent); which opens the image viewer activity but I don't want to see th...

JNI sources in the APK

Hi all, I have an Android project with an NDK/JNI library in Eclipse Ganymede. Inexplicably, the bin folder contains a copy of all my C++ sources from the jni folder. So does the APK, if you rename it to ZIP and examine. If I delete those files from bin, then clean and rebuild, they're there again. What going on, please? I have no intent...

An IF statement in a cursor adapter??

private void datafill() { Cursor notesCursor = mDbHelper.fetchAllNotes(); startManagingCursor(notesCursor); /* JournalRowId is the row id from the first database containing all journal names All notes are kept in database 2. I want only the notes that correspond to each journal to be listed, KEY_...

Android Emulator - Trouble creating user accounts

Hi Folks, I need a user account or two in my Android Emulator so that I can test some texting/mailing function of my app. The trouble is that when I try to do this in the emulator: Settings --> Accounts & sync --> Add account --> (my_gmail_account/password) --> Next I get the message "Setup could not finish - Unable to open connection...

Custom view in xml layout

I've created my own view by creating a subclass of the SurfaceView class. However I can't figure out how to add it from the xml layout file. My current main.xml looks like this: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:...

How to invite people not on your application from Facebook(android sdk).

Hello, I was wondering if there was a way to see who is or isn't using your application on Facebook. For example, sets say I have an application X that a user Y has just connected to. I want to find out if Y's friend Z has allowed X or not. Then, if friend Z has not allowed/used X with Facebook before -- I want to invite that friend t...

How to populate an AutoCompleteTextView with contacts names in android 2.1

Hi. I have an AutoCompleteTextView and i want it to autocomplete contact names on input. The problem is that Contacts.People has been deprecated. The new documentation says to use ContactsContract but i can't find any proper tutorial. Can anyone give me a sample code or point me to an appropriate tutorial. Thanks. ...

android: gson performance

I am trying to use gson to do my object mapping on the android emulator. It has been ridiculously slow when processing json data around 208 kb. I do not have any hierarchies in my json. After the object mapping is done, i can see it that gson created around 500 records. It is taking it over 3 minutes on the android emulator to map the...

How TO: obtain the list of names from the phonebook to be used in a list view?

This might be a really simple answer but I cant seem to come up with an answer for it, I'm aiming for android 2.1. Any help would be great :-) ...