android

Is there a VPN-provider API for Android?

Is there a way to build a VPN 'provider' for Android? A way to add new VPN types to the existing VPN infrastructure? OpenVPN, for instance, though also things like pppoe might fit in this category. ...

android: any tutorials on creating menus for apps?

I need a very simple menu which probably contains only one or two items: settings/options, where pressing one of them should show some customer defined parameters (is it called dialog), e.g., number of results shown. Is there any good tutorial on creating such kind of menus? I've looked at the "notepad" example in android, it doesn't rea...

Chaning coding style due to Android GC performance, how far is too far?

I keep hearing that Android applications should try to limit the number of objects created in order to reduce the workload on the garbage collector. It makes sense that you may not want to created massive numbers of objects to track on a limited memory footprint, for example on a traditional server application created 100,000 objects wi...

Android horizontal scollview behave like iPhone (paging)

I have a LinearLayout inside a HorizontalScrollView. The content is just a image. While scrolling, I need to achieve the same behavior you get when setting the paging option on a the iPhone equivalent of the HSW (scrolling the list should stop at every page on the list, not continue moving). How is this done in Android? Should I impleme...

managedQuery() vs context.getContentResolver.query() vs android.provider.something.query()

Pretty simple. What is the difference among those three? I want to list every Image in a device. Should I use managedQuery(), android.provider.MediaStore.Images.Media.query() or context.getContentResolver.query() ...

Android Pausing and Resuming Tutorial

I'm having some difficulty figuring out the best ways to pause and resume my application. Is there any comprehensive tutorial or something similar that would help me make sure that I'm not missing any important steps? Mostly I'm just worried about not dealing with the memory being used by my application. There's a few apps I own that w...

How to send -Dflag to android app

Is there a way to send -D directives to an android app? On desktop java I would just do java -Dsomeflag=value. How would you do this on android? I am building with eclipse. ...

why is there different id syntax in the Android docs?

This page in the Android documentation defines an element id as follows: <TextView android:id="@+id/label" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Type here:" /> However this page defines it as: <EditText id="text" xmlns:android="http://schemas.android...

Android - how to set keystore

Hi, I'm running a sample application that has a map component to it. The app launch find, but I don't see the map loading. I read sometime ago that it might be caused by keystore mismatch? How do I set keystore? Been trying to find it from google and eclipse but can't find where I can change that. Thanks, Tee ...

Weird onclick behavior of images on home screen widget

I wrote a home screen widget with one image on it. When the image is clicked, browser will be opened for a url link. Generally, it is working. But a weird thing is that, when I click background, then click the picture, the browser will not be open. Until I click the second time on the picture, the browser opens. The steps to reproduce is...

[Android] Change language settings (locale) for the device

Hi, I know it's possible to have multiple languages in a single application through the res/string and depending on Locale. Here is a case http://stackoverflow.com/questions/2078289/android-controling-the-user-language Now how can I change the language in the phone ? Like I'd do by Menu > Settings > Language & Keyboard > Select locale ...

Does Android 2.1's Browser Support HTML 5 and What Video Format Does It Play?

The company I work for produces allot of video and we want to target as many devices as possible, but the question came up of what does the Android do? I personally own an Android based phone running 2.1, but I can't seem to get the HTML 5 tag to work. Even when I can trigger the browser to playback the video it just throws a notificat...

Android ProgressDialog Progress Bar doing things in the right order

I just about got this, but I have a small problem in the order of things going off. Specifically, in my thread() I am setting up an array that is used by a Spinner. Problem is the Spinner is all set and done basically before my thread() is finished, so it sets itself up with a null array. How do I associate the spinners ArrayAdapter wi...

Android -- How to scale/resize text to fit a TextView?

Hello all, I'm trying to create a method for resizing multi-line text in a TextView such that it fits within the bounds (both the X and Y dimensions) of the TextView. At present, I have something, but all it does is resize the text such that just the first letter/character of the text fills the dimensions of the TextView (i.e. only the ...

ArrayIndexOutOfBoundsException with custom Android Adapter for multiple views in ListView

I am attempting to create a custom Adapter for my ListView since each item in the list can have a different view (a link, toggle, or radio group), but when I try to run the Activity that uses the ListView I receive an error and the app stops. The application is targeted for the Android 1.6 platform. The code: public class MenuListAdap...

How can I disable a view behind my SlidingDrawer in Android?

I have a SlidingDrawer that pops up from the bottom of the screen and fills the screen about 80%. Even though the SlidingDrawer view is in focus, it is still possible to click on items, buttons and other elements in the view that is behind the SlidingDrawer. When SlidingDrawer is active/pulled up/in focus, I want to disable the entire vi...

Interaction between Java and Android

I am currently trying to research how to use Android with an existing java based system. Basically, I need to communicate to/from an Android application. The system currently passes object data from computer to computer using ActiveMQ as the JMS provider. On one of the computers is a display which shows object data to the user. What ...

How to make a TableLayout from XML using programmable way ?

hi guys, I am trying to add TableLayout to the LinearLayout from resourse(xml) using programmable way. The added TableLayout count is dynamic. It would be between 1 - 10. I think it is better way to make it from resource xml. Because design doesn't break. How to make it ? Actually I don't know how to create a new instance from the ...

Loop through all subclasses in an Android view?

I’m working on a game for Android. To help implement it, my idea is to create a subclass of a view. I would then insert several instances of this class as children of the main view. Each instance would handle detecting when it was pressed (via OnTouchListener). The problem I’m having now is how do I loop through all these sub-views s...

How to do a fadein of an image on an Android Activity screen?

I'd like to display a photo on an Android Activity screen with doing gradual and continual fade-in from pale monotone sepia to the final full color. I know how to do it on a Java Image/BufferedImage for the Graphic object but unfortunately I know nothing for the Android programming environment. Could anyone help? ...