I'm implementing some marker draggable behaviour in an ItemizedOverlay class by overriding the onTouchEvent which works fine - I can drag markers around and the map stays stationary or if I start the drag on the map itself, then the map scrolls and the markers stay stationary (this is my intended behaviour). However, I wanted an addition...
I am trying to use the javax.xml.xpath package to run XPath expressions on a document with multiple namespaces, and I'm having goofy performance problems.
My test document is pulled from a real, production example. It is about 600k of xml. The document is a fairly complex Atom feed.
I realize that what I'm doing with XPath could be d...
I have an AlertDialog created within a switch case statement which is inside a for loop. On the AlertDialog there is an EditText for input. When the box pops up the for loop is run through in the background. I want the loop to wait until input is sent to continue. Here is the code for the AlertDialog:
for(int i=0; i < code.length(); i++...
Is there an API in android to access the headphone hardware input? Ideally I'd like to be able to directly read the incoming voltage/current. Accessing this in either Java or the NDK would be fine. Preferably if there's a way to do this on non rooted phones.
...
I have android G1 firmware 1.6, I am trying to record voice from the app with the follow code.
MediaRecorder recorder = new MediaRecorder();
recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
recorder.se...
I have a texture.png which I would like to tile, to create a textured background for my window.
Will I run into any problems with different screen resolutions?
If so, what is the best way to support a textured background for multiple devices?
Should I have 1 image instead? How large should it be?
...
Hi,
I have a class that is called when my app launches.
public class MainActivity extends Activity implements NetworkEvent.
In this situation,
list = (ListView) findViewById(R.id.list);
works perfectly. However if I then call a new intent via:
String[] names = object.names();
Intent myIntent = new Intent(MainActivity.this, ...
Hi,
I have an activity A which invokes Activity B on Button Click,and a Button click on Activity B invokes Class C. When button is clicked in Activity B , B calls a static method in Class C which passes its reference as one of the argument to method in C and other argument is path to the sound file that needs to be played. Once control r...
Hi,
I have been searching around for any info on creating a video player. Here is what I am looking for, I want to create a player to play videos (stream preferably) with my own custom playback buttons. The player will be set in a View (size of the view varies). Can i do this with just the MediaPlayer class, and can i add it in a View. ...
I've written a program in Java that takes in an image file and manipulates the image. Now I'm trying to access the camera so that I can take the photo and give it to the image processing program however I'm lost as to how to do this. I've read the information about the camera class and how to ask for permissions but I don't know how to a...
I am developing an Android app and I am using a library I wrote. This library has a class that contains some static fields. One of them is a API key. This key is used by other classes in my library to make calls on a remote service.
I initialize the API key on my main Activity once when it is created and the savedInstanceState is null.
...
I have the following drawable:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient
android:startColor="#2F2F2F"
android:endColor="#5A5A5A"
android:angle="90"
android:dither="true"
/>
</shape>
Is there anyway to start the start...
I have a ListView and an ExpandableListView inside of a TabActivity. I have overridden the setOnItemClickListener for the ListView. I have 2 tabs and one uses the ListView and the other uses the ExpandableListView. For some reason I cannot click on any of the items in the first ListView. If I change tabs to the ExpandableListView and...
I've got an input popup that I'm displaying over my activities main view that has some edit boxes in it. When the popup is displayed the activities view stays dimmed in the background (like with an alert dialog).
The issue I'm having is that when the keyboard comes up the popup is ok, but activities view in the background is shifting up...
I am building an app that will be an Android listview. Each listview object will be a title and a few sub-categories and ratings. I would like the user to be able to sort the listview by these ratings or sub-categories. Thank you in advance.
...
What's the current status of using the latest version of the Android SDK with the latest version of Eclipse 3.6?
Previously I've read that there were bugs/problems, and warned to continue using Eclipse 3.5 Galileo for the time being.
Is this still the case, or have the issues been resolved?
I'm running Windows 7 64-bit, but I'm actuall...
How can i use a pipe channel to open and read a file on android? Can anyone give me an example?
...
I was trying to use this code below to run a native and i get a classnotfoundexception for android.os.exec in Class execClass = Class.forName("android.os.Exec")..any idea y?
try {
// android.os.Exec is not included in android.jar so we need to use reflection.
Class<?> execClass = Class.forName("android.os.Exec");
Method ...
Is it possible to have multiple Shared Preferences per app? If you create a PreferenceActivity, the values by default are persisted to /data/data/[PACKAGE_NAME]/shared_prefs/[PACKAGE_NAME]_
preferences.xml
Is there a way to have multiple such files and which one to use for a given PreferenceActivity?
...
I'm trying to create a notification that uses a different sound than Notification.DEFAULT_SOUND. Is there an easy way I can pop up a Sound picker where the user can choose from? and how do I use the sound picked for my notification?
...