android

what is the best source to buy pictures for mobile applications

Hi, I am writing a slide-show like application for android phone which I am going to sell. it will target very narrow audience and I do not think I will sell more than 1000 copies of it. I was going to buy pictures for it from microstock agencies like istockphoto but it turned out that they require purchase of "extended license" if you...

Multiple Cell Types in Android ListView

What I'm trying to do is to show some data for a book like Title, Author, and a Cover, and beneath these data, to have a ListView containing a list of clickable chapters. One way I've thought would be to have a ListView with different type of cells, where the first would contain the data, and the rest of them would be simple cells conta...

Android: save sound as ringtone and notification

Hi, I'm saving a sound from my app to be used as a ringtone or a notification sound. Here's part of my code, taken from this page: ContentValues values = new ContentValues(); values.put(MediaStore.MediaColumns.DATA, k.getAbsolutePath()); values.put(MediaStore.MediaColumns.TITLE, soundName); values.put(MediaStore.MediaColumns.MIME_TYPE,...

Is it possible to listen to Search Dialog UI Events?

I would like to be able to detect when a user types a key in the Search Dialog. I plan on using this to hook in to custom suggestion functionality. Note: The built-in Search Manager custom suggestions functionality won't work for me because I need to customize the layout of the suggestions. ...

Using a CANVAS Tag to store images from Andorid Phone? Can this be done??

I am working on a HTML5 Web Application that will run on an Android Phone. I am trying to load an image from an Android phone to a Canvas Tag and then Save the Canvas tag in an html5 WebStorage local database. Eventually I want to post this data back to the server. I am looking for code / guidance..really anything to get me pointed in t...

Accessing an Android View from extended ItemizedOverlay?

I am creating an extension of ItemizedOverlay. When a user taps a pin on the map (onTap) I want to display a RelativeLayout, which is included in the same .xml file as the map. When the RelativeLayout is visable, it covers the map. Since this view is the context for the main class, I do not know how to access the view (DetailLayout) fr...

setting up Android SDK - get the "Failed to fetch URL http://dl-ssl.google.com/android/repository/repository.xml" error no matter what

In trying to set up the Android SDK, I can't seem to get connected to the repository. With the proxy set correctly, and https forced to http, I get this error: Failed to fetch URL http://dl-ssl.google.com/android/repository/repository.xml, reason: Connection reset. Without the proxy set, I get the same result, except it says the conne...

Android: Calling startActivity() from outside of an Activity context

I have implemented a ListView in my Android application. I bind to this ListView using a custom subclass of the ArrayAdapter class. Inside the overridden ArrayAdapter.getView(...) method, I assign an OnClickListener. In the onClick(View v) method of the OnClickListener, I want to launch a new activity. I get the exception: Calling s...

Android: App not working on some rooted devices... Why?

Hello. I have an app on the market that is for rooted devices only. I have tested the app extensively on a rooted and unrooted G1, MT3G and Cliq with no errors. I am receiving a number of low ratings from people with supposedly rooted devices, saying that the app tells them that they are not rooted (of course, they usually don't leave i...

how to create a buttonbar with a sliding control in android?

The footprints and clock app on a HTC sense phones use a slider control on the bottom buttonbar (see this movie for an example: https://docs.google.com/leaf?id=0B9hmEy_z2CRzOTJmYTVlNDktYjkwMS00YTM5LTk3ODQtYmIzODU4Yzk1YjA0&hl=en&authkey=CMWwwegG). From the hierarchy viewer I can see that they use a custom control for this. I'm l...

All packages that respond to a certain category on Android?

I want to build an Android widget that will update very frequently (5 seconds). This means, I want to only update it when the screen is on and when the home screen is the active Activity. How do I get a list of home apps (or apps that respond to <category android:name="android.intent.category.HOME"/>) In the android API, can I use Int...

playing a looping sound when button is pressed in android

my problem is a simple one. i want to play a looping sound only when a button is pressed. the following are the switch statement and if else approaches i've tried. at best, i can play the sound but it won't pause when the button is no longer pressed. public boolean onTouch(View v, MotionEvent event) { MediaPlayer mp = MediaPlayer...

Android phone reboots while executing my own developed application

I developed an Android application that uses many services, including GPS and orientation (compass). The genre of the application is AR (augmented reality) and I'm moving image views around the screen in real-time depending on the phone orientation. However, after a while, the phone freezes for a second and then reboots (Motorola Droid)....

Highlight child in custom ExapandableListAdapter- Android

Hi Folks, Just a quick question. I've created a custom ExpandableListAdapter, both the parent and child have it's own XML layout file. But it's lost the highlight option when you select it (obviously it still selects the row). What option do I need to set to make it highlight like the standard layout would. Thanks! ...

Android Development: ListPreference Trouble

I don't understand what's going on here. I have a ListPreference with the entries and entryValues correctly set. When I go in the prefernces activity and change the value it successfully works (I added a Toast to output the value after changing the option to test). But when I do the following to compare it, it always executes the else ...

What is the proper URL to get an Auth Cookie from a GAE based Application

I have an android app I want to connect to a Google App Engine based server. I can get the auth token from the AccountManager. It seems the next thing I am supposed to do is talk to an auth page to get a cookie. Following the awesome instructions here: http://blog.notdot.net/2010/05/Authenticating-against-App-Engine-from-an-Android-ap...

Do callbacks occur on the main (UI) thread?

There are a lot of Android SDK APIs where callback handlers are registered. For a concrete example, with MediaPlayer you can set an onCompletionListener callback. Will these callbacks be called from the main (UI) thread? If the answer is "it depends", then I'm looking for some general rules for what callbacks will be called from the m...

ListAdapter / Cursor, Android. Custom Layout problem

Hey everybody! I'm experimenting with the Android platform, and I'm beginning to love it, but right now I'm stuck, at this cursor/list adapter problem-thing. The thing is, that I request a function, returning a data object, with several properties I'd like to map to different TextView's. My list_item.xml <?xml version="1.0" encoding="...

Android: Detect if PVPlayer or AwesomePlayer?

Hello, How can I detect if a device is equipped with the "PVPlayer" components or "AwesomePlayer" components? I noticed that the Droid X, despite being on Android 2.2, still uses the PVPlayer component rather than AwesomePlayer. in other words, the Droid X has difficulty playing certain types of media. Let me know if you need any clar...

What is this called and how can i create something similar in android?

Hello all, I was seeing some application and saw this application i was wondering how they created this horizontal navigation menu for their android application. So what is this horizontal navigation called in android?? and can any one point me to any resource which has some sample example for creating 1 for android? Thanks ...