android

android bookmark ContentProvider makes bookmark but not visible in browser's bookmarks

I'm using Android's Browser Bookmark ContentProvider to create a new bookmark programatically. The bookmark is created (I can retrieve it programatically via the ContentProvider) but the bookmark isn't visible in the browser bookmark view. Thoughts? // Saving the bookmark via ContentProvider final ContentValues bookmarkValues = new Con...

I need a recomendation: Which game engine should I use on Android?

Hello. I'm developing a game on Android and I don't know how to render and move 3d objects. Someone told that I have to use a render engine but I haven't found any so I've decided to use a game engine. Do you know any? Thanks. ...

Android 1.6 ksoap2 "RuntimeException: Cannot serialize: java.util.GregorianCalendar..", while passing datetime parameter

Hi, I have to call .net web services in android using ksoap2 api. My code is working well for passing parameter as String or int. But it showing "java.lang.RuntimeException: Cannot serialize: java.util.GregorianCalendar....." while passing Calendar object as parameter. I converted date into string and parsed it into date object but it is...

Android drawCircle with different colour border

Hi, Is it possible to draw a circle on a canvas in android with a different colour border using only one drawCircle method? I have noticed the PaintStyle of FILL_AND_STROKE but cant seem to have different colours for both the fill and the border. I really don#t want to have to call two drawCircle methods. Thanks ...

Setting a TextView width in java

How can I set the TextView properties like width, height using Java Code? ...

Algorithm for a smudge tool?

I'm trying to implement a smudge tool like one you would find in Gimp or Photoshop. I've tried lots of variations but they all have problems. The basic method I've tried for smudging from position P1 to P2 on an image is: Copy a rectangle the size of the current brush from P1. Draw this rectangle at P2 with a low opacity. It looks fi...

gmail.com not working on webview (after login)

I have a webview in my app that generally works fine for loading websites. But I cannot get www.gmail.com to work: when I open www.gmail.com I see the login page, try to login, afterwards the screen goes black and my app/process is killed. I don't see much in my logcat, just some strange debug information is being dumped as below. But ...

android bluetooth sensing application

Hi every one, I am a new android app developer and I want to ask if it is possible to build an application that sense to a specific bluetooth device (through device MAC). if it finds this device it will show a message even if the application is not running (like SMS message or receiving a phone call).. thanks in advanced for you help. ...

Android 2.2 - How do I detect if I am installed on the SDCard or not?

I am writing an android app that stores a lot of media files. They are not the type (and are far too many) to clutter up the users notification or other media directories, but they also must be user-updatable, so I can't put them in the resources. I can use getExternalFilesDir to get a path on the sdcard, but I only want to do that if ...

How can I package private media files for Android 2.2?

I have an android app with a lot of media files. The files have to be user-updatable, so I can't put them in the resources. I have been having to use a bash script to use adb and push out my test files every time I recompile. Is there any way to package the media so that it is installed to the applications file directory (on the SDCar...

Why is drawing bitmaps is very slow on some android 2.2 phones?

I have a simple card game where the user can drag and drop cards around the screen. On some of the 2.2 android phones like the Droid and EVO the card drawing is very slow. This is strange because it happens on some of the faster phones. However it's not all phones I test on the Droid and Droid X and the program runs great also runs good ...

In an Android state-list drawable, state_focused is ignored

My Android app, which uses a TabActivity to display its contents, has 4 tabs which all use a state-list drawable for the icon. They all have the same structure, just with different images: <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"&gt; <item android:drawable="@...

C++ Classes with android

The android NDK supports c++, but does it support c++ classes?? If so can you give a simple example and the steps needed to implement the class with the java source. ...

How can I set the android preference summary text color?

On my preference screen I have a preference that when clicked opens a color picker dialog. What I would like to do is when the user selects a color, that the text summary of the preference is displayed in that color. I know I can have the summary set up like this, Currently <font color="#ff0000">this color</font> and have it display in...

android Wifi application craches

I wrote an android application that scans for wifi connection. i used the following code package com.android.wifitester; import java.util.List; import android.app.Activity; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.net.w...

Android - Reduce the memory usage of Bitmap Drawables

I have a map in my application that shows locations from Gowalla. I use an ItemizedOverlay with a simple default marker, but as the items are drawn, I swap the default marker out with the location's icon downloaded 9and cached on disk) from Gowalla. The problem is that if there are a lot of locations on screen (say 30), the size of the...

Android: TabActivity - add no Tabs before AsyncTask has finished

I've got an TabActivity implementing TabContentFactory, which starts an AsyncTask in onCreate() to fetch the data for the tabs. When the AsyncTask has finished, onPostExecute() could directly update the UI-elements, right? Meaning, since that method runs in the UI-Thread no further thread-synchronization would be required when accessing ...

Android and Google Checkout, recieving a notification of payment to my server

I need to create an account on my server for a user when they process a payment through Google checkout. I will be using a php script to process the payment notification. Has anyone done this? Are there some sample PHP scripts already out there? I read something about the notification history API and the Polling API - the both seem t...

Android how to solve problem with touching a View from the wrong thread?

I get the fault "CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views." The problem commes from the onDraw call in TutorialThread. The code works if the call to startAnimation in onDraw is removed. Why does the code work if startAnimation is removed? Why is this call different than t...

applying a theme to an appwidget

i'm trying to define a theme for an appwidget, and have it applied at the application level. i have a theme like, <style name="theme.dark"> <item name="android"background">#000000</item> </style> in my manifest, i set android:theme="@style/theme.dark" at the application. however, when i run the appwidget, it does not pick up th...