android

Sending "alert/notification" to cell phone from website

I was wondering if there was a way for a website to send an alert/notification to a cell phone (smart phone, android, iphone... stuff like that) where the notification will ask the user a question and they have to answer the question and the response is sent back to the website and their answer is logged in the database. I would also li...

AutoCompleteTextView suggestion results sticking to screen when they shouldn't

my AutoCompleteTextView is created with a custom adapter to show suggestions for ~3000 Strings. while typing in the input view, suggestions are coming up as expected, except that sometimes a chunk of the dropdown view with suggestions is being clipped or looks like its detached from the AutoCompleteTextView. this extra chunk of the drop...

Locking the screen in android

Hi friends, I want to lock the screen through my program. i am using the following code to do the same..But its not working for me..I dont know where i am wrong..even i am not getting any errors in logcat..I am using 1.6 public class KeyGaurd extends Activity { KeyguardManager keyguardManager; /** Called when the activity is first creat...

How to turnoff suggestions in edittext?

How to turnoff suggestions in edittext in android? ...

Using Android, how can I select rows from a ListView which contains Button controls

I have the following, very simple test program for using a ListView. I create a ListView and set it as the content view. I set a ListAdapter which supplies the rows. There are 30 rows, and each row consists of a LinearLayout ViewGroup. Into that ViewGroup, I place a TextView and a Button. When I run the program, I find that I cannot ...

What is this resource and why can't Android find it?

Hey, Sorry if this is a dumb question. I'm an amateur programmer and new to Android, though I've prided myself on not having to bother anyone for help until this point. The problem I'm having is that my program randomly seems to hang on startup. It doesn't happen all the time, and when does happen, it sometimes unfreezes within severa...

Java package convention

I'm developing an Android project which currently has 4 packages: com.myapp.app.activities com.myapp.app.db com.myapp.app.ws com.myapp.app.utils Would I be able to create an additional package which is just com.myapp.app ? Eclipse isn't letting me create this package. It tells me a package with this name already exists. If I sta...

BackupManager & BackupAgent in Android 2.2

I've reviewed the docs and the sample BackupRestore app and written my own test app implementing android:backupAgent. I extended the BackupAgent class because my main concern is being able to backup data from a database. I can't seem to even make a simple proof-of-concept app work with this feature. To make things exceptionally simple...

Using static in Java singletons?

I am building a singleton service in Java for Android: final class MyService { private static Context context = null; // ... private MyService() { myObj = new MyObj(context); // ... } private static class Singleton { private static final MyService INSTANCE = new ...

Disappearing dividers in Spinner drop-down list

Hi experts, I am writing my first simple Android App: It loads temperature samples from a Java based measurement system (CSV via HTTP), shows the available channels in a Spinner and when a channel is selected, it shows the corresponding value and a timestamp in two TextViews. The App works fine, except a little cosmetic problem: The ite...

How to define an activity for the Search Button?

I am not using a SearchManager, but I have built my own custom search activity. I want this to be shown when the user clicks on the Search button. How can I do this? ...

Android: Receive a SMS from a defined number in an invisible way.

Hello all In my android application that is now working fine, I am sending custom SMS from a user to other one. Once I detect the SMS come from my application, I do my stuff with the message and everything work fine. But now, I do not want the SMS application to detect this message as it is totally useless for the user. So what I wou...

How to add overlay view over other view in android?

I want to put button above image view. How can i do this? (Please, don't offer to set Background, cause i need ImageView) ...

How can I create a TableLayout with 4 columns?

I am having problems creating a table layout with 4 columns, that span horizontally. I want my Row to look like this: AAPL | 200.00 | Image Divider | 1.53 (+1.5%) I want the 200.00 to be right aligned, as well as the 1.53(+1.5%). <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/an...

Android data directory.

Is it possible to provide files int the data/data directory of an android application on install? If so, where would I put these files in my project? ...

Android: How to transfer a test fixture file to device from unit test application

I'm writing an Android JUnit test and want to copy/reset a test fixture file (it's an SQLite database file.) If I were within the main application, I know I could just place the file in the assets directory and use getResources().getAssets().open(sourceFile) However, this API appears to be unavailable from the ActivityInstrumentationTe...

Android: Use spinner in a sub tab.

Hi, I'm trying to put a spinner in a sub-tab in my android app. Touching the spinner causes a crash. Searching seems to suggest that for some reason it is not possible to use spinners in sub-tabs, but this seems silly to me. I've also tried using activity groups as an alternative to sub-tabs, but I get the same crash. Has anyone...

Implementation of slide gesture like is done in the call log list view

In the call log, there is a feature that when you slide one direction it will call the number and in the other direction message the missed number. In each case the missed number in the list view is pushed aside by either "Call" with a green background or "Message" with an orange background. I think this is really need and would like t...

Drawing a gameboard like checkers in Android

I want to design a gameboard such as Checkers (but with the possibility of having different board tiles. Now, OO logic and reason tell me I should have a 'tile' class which I can draw, and I draw x by y number of these on one canvas. My question is what is the best performant way to draw such a board? Is it reasonable to do it the way ...

When to call ScrollTo on a WebView

I want to open a website in a WebView and then have it start a certain pixel distance down the page. I see the WebView has a scrollTo() method, but when is the soonest I can call this and how do I detect that? I would like to have it appear to the user, that the page opens up at the scroll position. So I don't want to wait until the e...