android

Calling inflate() multiple times in an Android view

I have a View that inherits from LinearLayout that inflates itself. After it has been created and inflated I wanted the ability to inflate a different layout. However, calling inflate() a second time seems to have no effect. Only if I close the activity and open it again is the state reflected in the UI. Is it possible to call inflat...

How to show copyright symbol in dialog?

I have to show copyright symbol, ©, in the message of an AlertDialog. I set a sting value with the copyright symbol in res/string. But the symbol is shown as a question mark when the dialog opens. How can I correctly show the copyright symbol in the dialog. Thanks. ...

How can I test a library on Android?

Hi there, I'm developing a library, not an application, for Android and I would like to know how should I test it? I know that if you are developing an application you can instrument the test+application and make it work, but this is not my case. I'm using Maven. Is it possible integrate the test results to the Maven lifecycle? The wor...

Android Layout Alignment Issue

I am trying to find the correct xml to define a layout of three items on a single 'line' as follows : Button (left aligned on the screen) with the text 'Prev' - wrap-context TextView (center aligned) with the title of the screen - fixed 200px size Button (right aligned on the screen) with the text 'Next' - wrap_content Just cannot se...

How to optimize delete with date range where clause?

I created an android app and there is a function that will periodically delete old records delete from tablea where col1 = 'value1' and col2 = 'value2' and postdate < '2010-06-14' It has performance problem when total number of row in tablea has more then 50,000. It take around 45 seconds to delete 500 records. I already have index f...

Where should data changing event in listview be handled?

I have a ListView that is filled from my adapter with my custom views. Each view has two buttons, one that starts another activity to edit the contents of that list item and one to delete that item. My question is where should my ClickEvent handlers for those buttons be? Should I put them right in my custom view code since I have all ...

Restrict number of clients that can bind to a remote Android service

Does the Android runtime environment offer a mechanism for specifying how many clients can bind to a given service? My particular service can only interact with 1 client at a time and it does not make sense for it to be servicing multiple clients. ...

Pull a message from an Android handler

How do I remove a queued message of a given type from a handler's message queue? ...

How to extract an Android app's log messages at runtime?

If my app goes haywire in the field, what are some diagnostic resources that the app can collect at runtime? Is there a way to access all the Logger message our app generated (i.e. via Log.e())? ...

When implementing bindView() for an adapter, can I 'skip' a view?

I'm implementing a custom adapter that iterates over some database entries which in turn link back to the Android contacts database. The adapter will make the query to the content resolver and bind the data from the returned cursor into the view. However, suppose I add a contact to my private database, then remove it from the Android con...

UISegmentedControl Bar style equivalaent in Android

Is there any control in Android which is similar to UISegmentedControl Bar style in iPhone? The Bar style is the button from following view (the background is a separate control, the two buttons stick together) view in action here http://www.youtube.com/watch?v=8DdPnOjOCgM#t=5m25 ...

onUpdate not being called in widget, even though I see the android.appwidget.action.APPWIDGET_UPDATE intent in onreceive

I'm working with the emulator using the debugger and I've noticed that onUpdate is not getting called. When I add the widget to the emulator homescreen I see my breakpoint being hit in the onReceive method. The onReceive method does get the android.appwidget.action.APPWIDGET_UPDATE intent. However, the onUpdate function never gets cal...

Android share comment on facebook

I am having social networking application made by me, in which you can post comments, i want to facilitate user to one click share posted commented on user's Facebook as well. I tried fbconnect-android is there any other way sharing comments on FB? ...

Android share comment on twitter

Android: I am having social networking application made by me, in which you can post comments, i want to facilitate user to one click share posted commented on user's twitter. ...

Android and J2ME

Can anyone please clear my doubt regarding the query that does Android Programming has anything to do with the J2ME? Does Android Development comes under J2ME Platform as J2ME is used basically for the Mobile Applications and Android is also the same one. Please let me know if anybody is knowing it. ...

Android- AppInventor by google

can anyone explain me how to use this new tool appinventor newly introduced by google.. i downloaded the file and placed in folder as mentioned in their instructions but am unable to find the launching icon the editor of app inventor.. http://appinventor.googlelabs.com/about/ ...

Android app syncing with remote service

Hi, is there any possibility to sync local database on android device (sqlite) and remote database over the air? For example - to sync tasks between device and web application. ...

"Not registered on Network"

Hello Friends, When I am trying to make a call from one emulator to other, I am experiencing the following message "Not registered on Network". Can anyone please let me know the solution to isolate this message. I tried adding the uses-permissions in the Android Manifest file and I also tried stopping and starting adb server but no luc...

What is the correct way of handling the action NEW_OUTGOING_CALL while looping?

At the moment I am developing an application which catches the action NEW_OUTGOING_CALL with the help of a BroadcastReceiver. I am aborting the call by calling setResultData(null). After that I am showing the user a dialog which allows him to decide if he wants to use my application to rewrite its number. When the users decision has happ...

android emulator and local site

Hi I've started android emulator app and trying to open from embeded browser locally started web-site, but local dns name (from /etc/hosts) is not resolved. Is there any option to enable local resolving? ...