android

Problem about getting value from inner class in Android

Hi I got something wrong in my code and I don't know why My program have 2 spinner box and 1 textview. when I choose something in both spinner it should call method from getrate inner class which return some value to textview. This getrate class working on my java app but it's don't working on android app. here is my code public class ...

Cannot find certain implementing classes in Android

In short, I am looking for the implementation of the IAlarmManager. I am interested in the scheduling done by the AlarmManager.setInexactRepeating method and so I started looking for the implementation but I haven't been able to find anything. Internally to AlarmManager, I can see that the actual work is being done by an android.app.IA...

Android Thumbnail Loading Problem

I'm using a thumbnail loader in my project the one mentioned below. The problem is that the it loads all the thumbnails properly except the ones who's size is of about 40K. When our back end is giving that sort of thumbnails are not generated and sometimes this eventually leads to a Crash too. What m I supposed to do with this ? public...

Microphone input

I'm trying to build a gadget that detects pistol shots using Android. It's a part of a training aid for pistol shooters that tells how the shots are distributed in time and I use a HTC Tattoo for testing. I use the MediaRecorder and its getMaxAmplitude method to get the highest amplitude during the last 1/100 s but it does not work as e...

Android - Avoiding an activity to destroy, just stopping or pausing it when pushing the back button

Hi, I would like to pausing or putting the application on background when pressing the back button, I don't want the application to go through the destroy state. Things are when I override onKeyDown and when I force to pause or stop the application by using onPause, I have some issuees with the wakelock and application crash, but when I...

Set List View Size Android

Hello , I am using List View in my project where i have used a xml file which is used to create the list item.Then i have used it programmatically in my class which is extended by ListActivity. But the problem is i have to add a button in the bottom of screen which is not related to list view but List view covers all the screen. So,is th...

Error using eclipse for Android - No resource found that matches the given name.

Common problem I'm sure, but I can't figure it out. In my AndroidManifest.xml and main.xml I'm getting the no resource found that matches the given name. I've double checked for typos and it used to work, but now I'm popping up with all these errors saying it can't find my strings in my strings.xml. These are the ones I'm getting er...

android: Email an XML string (in-memory file) as an attachment

How can I email an XML string (or an in-memory file) in android as a file attachment without actually creating a physical File? I want to just build an XML data string (backup data) and have the user email it. ...

Intent to be fired when a call ends?

Hi I have an already built application and I want to add a feature that has to be started when a call ends. How can I achieve that? I thought that declaring in my manifest something like this <activity android:name="Filter"> <intent-filter> <category android:name="android.intent.SOMETHING" /> </intent-filter> </a...

How to create and manage custom themes for whole Android system?

Hello, I know how to create and apply styles and themes thanks to http://developer.android.com/guide/topics/ui/themes.html. However, this method only works for our own activity or application. I'd like to create themes that could dress the whole system (i.e. all activities). Of course, I'd like to select one of these theme by programin...

Is there a way to programmatically perform a factory reset on an Android device?

Understanding how incredibly dangerous this question is, I'd like to know if it is possible to programmatically issue a factory reset, as available in Droid and G1. Does anyone know how this is implemented? Is this implemented using the standard Android SDK, a Motorola-specific function, or something else? ...

Android: How can I set a listener to the MenuButton?

I want to do a custom action when pressing on the Menu button on the phone. Is it possible to set an onClickListener (or similar) on the button and if so, how? onCreateOptionsMenu is only called the first time the button is pressed - I've already tried this. ...

Can I write an Android app that receives a command from a web site?

I would like to write an Android application that can be activated by sending it a command from a web site. Is this possible? Actually, the app would be running on the phone and I would be sending it a command via HTTP. ...

Android - Display HTML Formatted String

I need an example of how to display the strings that I have marked up with simple html into a TextView. I have found "Spanned fromHtml(String source)", but I don't know how to plug it into my java code. Here is my Java: package com.SorenWinslow.TriumphHistory; import android.app.ListActivity; import android.os.Bundle; import android.w...

How to display a Yes/No dialog box in Android?

Yes I know there's AlertDialog.Builder, but I'm shocked to know how difficult (well, at least not programmer-friendly) to display a dialog in Android. I used to be a .Net developer, and I'm wondering is there any Android-equivalent of the following? if (MessageBox.Show("Are You Sure?", "", MessageBoxButtons.YesNo) == DialogResult.Yes) ...

Android TextView with scrollbars and maxHeight.

I need to set the TextView maximum height (either using maxHeight or maxLines). And if there are more lines of text the scrollbars should be shown. What markup should I use for this? Initial idea was to wrap TextView with ScrollView, but ScrollView has no maxHeight attribute. ...

Connecting GPS coordinates taken from a database in Android using Overlay

I am currently building an application that allows users to track where their phone has been on a Google Map. At the moment, when the onLocationChanged() method is called, the application stores the current GPS longitude and latitude in a database and calls the animateTo() method to the current position. Using SDK 1.5, how would I go a...

How to include third party classes into the Android apk?

I have a couple of third party classes which serve as a library I can build my application upon. They are contained in a folder which was added Java Build Path -> Libraries (in Eclipse) with "Add Class Folder". It works fine so far an my app compiles. But the produced .apk contains only my classes and therefore the application does not r...

JNI - GetObjectField returns NULL

I'm currently working on Mangler's Android implementation. I have a java class that looks like so: public class VentriloEventData { public short type; public class _pcm { public int length; public short send_type; public int rate; public byte channels; }; _pcm pcm; } The signature for my pcm object: $ javap...

Changing the height of an existing, visible TextView

Hi I'd like to programatically increase the height allocated to a TextView, and have the activity layout redrawn accordingly (the text view has a maximum height until the user clicks it, then it takes up all height required, wrap_content). setHeight() isn't working, even coupled with invalidate() or postInvalidate(). I am able to change...