android

Calling subactivity from subactivity

I have three activities in my android app. First activity is main application screen which gives option to open second screen containing second activity. But when I click on the button on second activity which was supposed to open third activity screen, I get "Application has stopped unexpectedly" error. <?xml version="1.0" encoding="u...

How to draw some lines in a view element defined in the xml layout

Hello, I have problems drawing some simple lines in a view object (Android programming). First I created the layout with the view element(kind of painting area) in it (XML file). [...] < View android:id="@+id/viewmap" android:layout_width="572px" android:layout_height="359px" android:layout_x="26px" android:layout_y="27px" > [...] ....

Android: How to invalidate multiple parts of screen

I need to be able to selectively invalidate multiple (about 20) rectangles on the screen for performance reasons, so tried the following: Vector<Rect> myRects = new Vector<Rect>(); // ... add some Rects to myRects for (Rect r : myRects) { invalidate(r); } However this seems to invalidates a union of all the Rect's, forming one l...

Android AccountManager API

Hi everyone, I'm struggling to understand the Android AccountManager API. As far as I got thinks working I can use the blockingGetAuthToken method and specify whether Android should provide a notification for user to allow or deny the request. Another possibility is to use getAuthToken and check if KEY_INTENT is returned. If that's the ...

Passing parameters to web service method in c#

Hello I'm developing an android application .. which will send location data to a web service to store in the server database. In Java: I've used this protocol so the URI is: HTTP request instead of REST HttpPost request = new HttpPost("http://trafficmapsa.com/GService.asmx/GPSdata? lon="+Lon+"&Lat="+Lat+"&speed="+speed); In A...

Cursor backed ExpandableListView data update

Hi I'm implementing CRUD functionality using ExpandableListView. Wen I delete a parent data on screen refreshes automatically but it doesn't when I delete a child. I've solved this with: int categoryId = ExpandableListView.getPackedPositionGroup(info.packedPosition); getExpandableListView().collapseGroup(categoryId); getExpandableListV...

How to positioning the controls in android through code?

Hi, I am developing an application, and I want to make it work on different resolutions and different densities. My question is how to position the controls through code such a way that it works on all resolutions. Regards: Jayanth ...

Android virtual keyboard turn on kaps lock

I have an edit text field. When the user clicks on it by default it shows small letters on the virtual keyboard. I want by default to display first letter caps and rest of them small on the keyboard. How can this be done? ...

Android application not working on 1.5 firmware?

dear friends, i have created a single page application of showing phonebook data in a list. i am using 2.1 sdk in emulator and application works fine. but in my HTC hero firmware is 1.5 when i try to intall same application on HTC hero application is installed successfully but when i click on app icon it gives me force close error even...

Android: CustomListAdapter

Hi, I have implemented a custom list view which looks like the twitter timeline. adapter = new MyClickableListAdapter(this, R.layout.timeline, mObjectList); setListAdapter(adapter); The constructor for MyClickableListAdapter is as follows private class MyClickableListAdapter extends ClickableListAdapter{ public MyClickab...

Autocomplettextview filtered by input keys

Hi I use autocompletetextview with SimpleCursorAdapter to get data from sqlite. I'd like to get its drop down list started by the entered key. In my autocompletetextview, the list is not shown or filtered by input text. eg, If user enter "an", all text started with "an" will be seen in this list. In Java public void onCreate(Bu...

Android. sent multiply-attachement email

Hi, I would like to send email via startActivity(Intent.createChooser(new Intent(android.content.Intent.ACTION_SEND))) I know that to attach file to email I need intentEmail.putExtra(android.content.Intent.EXTRA_STREAM, <Uri of file>) but I need to attach several files. How can I do this? ...

Doing order by using the Jaro-Winkler distance algorithm?

I am wondering how would I be able to run a SQLite order by in this manner select * from contacts order by jarowinkler(contacts.name,'john smith'); I know Android has a bottleneck with user defined functions, do I have an alternative? ...

ArrayAdapter and android:textFilterEnabled

I have created a layout which includes a ListView. The data shown within this ListView isn't too complicated, it's mostly an Array which is passed when the extended Activity is started. The rows themselves exist out of an icon and a text, thus an ImageView and a TextView. To fill up the ListView I use an ArrayAdapter simply because an ...

Customizing view in list with CHOICE_MODE_MULTIPLE

Hi I'm using a list with choice mode set to ListView.CHOICE_MODE_MULTIPLE. Can I use my own layout instead of simple_list_item_multiple_choice.xml? Which standard views has it to include? ...

how to get a row ID from a Cursor

How do I get the row ID from a Cursor? ...

ExpandableListView collapsing all parent items.

Hi I need a clue how to collapse (or find IDs for) all parent items in ExpandableListView. Thanks, Aleksander ...

ActivityThread exception in Android?

I am working on the task to search a location which stored in DB. After that i have to drop a pin on the corresponding location. I made a modification on Quick Search Box(QSB) to search the DB which is in my app. for that QSB performance i followed the Search Dictionary example in API Demos. when i click the search suggestion it reloads ...

Efficient Map Overlays in on Android Google Map...

Hi Friends, I want to do the following and am kind of stuck on these for a few days.... 1) I was trying to draw poly lines ( I have encoded polylines, but have managed to decoded those) that move when I move the map.....(the only solution that I found was for Geopoints to be transformed into screen co-ordinates...which wont move if I m...

how to get android firmware version installed in phone?

dear friends, while developing an application how to get current operating system version installed in mobile phone? for example, 1.5,2.1 etc.. can any one guide me how to get it? any help would be appriciated. ...