android

Android Intent for Twitter application

Hey, Is it possible to show a list of applications (with intent.createChooser) that only show me my twitter apps on my phone (so htc peep (htc hero) or twitdroid). I have tried it with intent.settype("application/twitter") but it doesnt find any apps for twitter and only shows my mail apps. Thank you, Wouter ...

How to compute a radius around a point in an Android MapView?

I have a MapView that I'm displaying a "useful radius" (think accuracy of coordinate) in. Using MapView's Projection's metersToEquatorPixels, which is admittedly just for equatorial distance) isn't giving me an accurate enough distance (in pixels). How would you compute this if you wanted to display a circle around your coordinate, given...

Launch Activity from Preference Activity causes Permission Denial Exception

Hi, I'm having a bit of a problem here. What I want to do is launch an Activity from within the PreferenceActivity. So my preference.xml which holds the preference layout looks like this: <Preference android:title="Launch Activity" > <intent android:action="org.momo.SOME_ACTIVITY" /> </Preference> The manifest is aware of the activ...

Blocking Dialog from within JNI code

I'm writing an app that's basically a wrapper around a 250K JNI. The JNI (a game engine) has APIs like handle_penUp(int x, int y). Sometimes it needs to query the user from inside handle_penUp() (via callbacks into Java code), so the dialog I use to implement the query must block. I understand that the main thread of execution can't b...

Begginner working with ListAdapters / SQLite Database

Hello, My programming knowledge is slim, i discovered Java and the Android SDK some days ago. I have a SQLiteDatabase, a SQLiteOpenHelper, and a Cursor working properly ( means i think i understood how to create/open a DB using a SQLiteOpenHelper, make queries on my DB and get a cursor ) currently, i'm wrapping i + labName + labCity i...

ASP.NET AJAX CalendarExtender - Problem with Android Browser

Hi all, I'm creating a webapp for Android mobile phones with ASP.NET and the Ajax Control Toolkit. I've included a CalendarExtender-Control which popups a calendar when focusing the associated Textbox-Control. If I select this textbox on my mobile phone, the Android webbrowser highlights it with an orange border. The problem is that th...

Android Widget Not Updating

I am trying to implement a simple widget for display on the home screen. The problem I am experiencing is that onUpdate is only being called once when I install the widget. The configuration is below. Note: I will not leave update period at 20 secs as I know that would kill battery (just testing). Configuration: `<appwidget-provider xm...

Accessing distant database, android

Hi I'd like to access an Internet database from my app to edit it and read it. Any link I should read or any advise? Thanks ...

Best approach to send data from a server to an Android device

I am developing an Android app that needs to communicate bi-directionally with a server. By that, I mean either the server or the device can send a message at any time, with an arbitrary amount of time in between messages. Sending data from the device to the server is a common and I think well understood task, but I'm not as sure what ...

Capture an image in Android and send it via MMS

Hi, We are developing an app that will need to capture camera image and send it via MMS. (large or small image please) Based on a method invocation in another activity, take an image and send it via MMS This is one of the last two parts left for us. Thanks a milion. Mat ...

(ANDROID) controling the user language

hi, I have a multi language app. I want to give the user the ability to control which language to use. that mean that even if he has the English Locale he could use a different language if he wants. How can I change the Locale language? (per app) Thanks.... ...

Eclipse ClassCastException when trying to expand XML layout for Android

I am new to java, eclipse, and android development, so I may be missing something simple although I have checked basic stuff like spelling several times. Because there is no number picker control (such as that used in the date picker) in the public Android SDK, the conventional wisdom is to "clone and own" the control that exists in the...

Android ADB access to application databases without root

Can anyone tell me, is it possible to use the ADB to pull and push a database from an app, without root privaliges on the phone? For example, I know the location on my rooted magic and dream is: /data/data/com.xxxx.xxxx/databases/xxxx I know that you can use ADB without root, but when trying to use the shell - you can't view that loc...

Usage scenario for android Activity.setVisible

I see in documentation: public void setVisible (boolean visible) Since: API Level 3 Control whether this activity's main window is visible. This is intended only for the special case of an activity that is not going to show a UI itself, but can't just finish prior to onResume() because it needs to wait for a serv...

Resolution independence in Android SurfaceView

I am currently starting a game engine in Android, first forray onto the platform and have the basics in place however i am unsure of the best way to approach resolution independence when using SurfaceView to draw graphics. Looking for pointers as to how to keep the game / sprites etc all looking the same independent of the screen, obvi...

Progress bar rounded on both sides in android

I am trying to create a custom progress bar in android. I have used the following xml file for it (progress_bar_horizontal.xml): <?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"&gt; <item android:id="@android:id/background"> <shape> <corners android:radius="8dip" /> ...

Update layout with the animation

I have a custom View inherited from LinearLayout. It contains a Button and a EditText. EditTest has initial visibility set to GONE. When Button is pressed I want EditText to appear with animation effect. So I've made an ScaleAnimation and when Button is pressed I set EditText#setVisibility(VISIBLE) and start the animation. The problem is...

Scrolling a Canvas smoothly in Android

I'm new to Android. I am drawing bitmaps, lines and shapes onto a Canvas inside the OnDraw(Canvas canvas) method of my view. I am looking for help on how to implement smooth scrolling in response to a drag by the user. I have searched but not found any tutorials to help me with this. The reference for Canvas seems to say that if a Canv...

Overriding the Home button - how do I get rid of the choice?

When creating one Intent so that MyActivity reacts to a User pressing the Home-button is easy using the XML markup: <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.HOME" /> ...

How to create/write file in the root of the android device?

I found out that you can use something like this to create a file: FileOutputStream fs = openFileOutput("/test.in", MODE_WORLD_WRITEABLE); String s = "[Head]\r\n"; s += "Type=2"; byte[] buffer = s.getBytes(); fs.write(buffer); fs.close(); When running the above code I get an IllegalArgumentException stating: java.lang.IllegalArg...