This has probably been asked before, but I can't find a good way of implementing it. I'm trying to write a program that manages a form of messages, and these messages are received from an external data source. This all works. However, the problem comes when I try to notify the user: I would like to have the notification jump directly ...
Hi! I am a bit new to Android. What I need to do is send data back and forth between an activity and a service locally. The information sent is sensitive and must not be able to be picked up by other apps. This excludes using broadcast and the onBind() function if I understand things correctly?
So the activity needs to send some string ...
After I either receive a phone call or make one, (and other undocumented interruptions) my application gets a NullPointerException when resuming my activity. Can any explain to me where it is and/or how to fix it? When my activity resumes, it is calling onCreate it seems, and it is trying to execute something that is null after Resuming....
I created a test Activity that installs a shortcut of itself on the Android Home screen. When you click a button, the Activity is supposed to remove the same shortcut it just created. However, nothing I do seems to delete the shortcut.
Here is the Java code (ShortcutTest.java):
import java.net.URISyntaxException;
import android.app.A...
I am working on an Android project where a group of buttons needs to show on the bottom of every screen (activity) in the application. The group of buttons are basically a navigation bar. I want to know the best way to do this without creating new buttons for every activity. I have been around programming (C++/C#) for many years but a...
Hi guys,
I need to detect when the mouse or keyboard activity is present. My application runs in the background (tray) and I need to detect this activity even when my app isn't in focus.
I don't need to know what keys were pressed, but simply WHEN they are pressed.
Can I do this with just Java? I have read some solutions using JNI a...
We all know that hitting the back button on the device doesn't kill the application, it merely finishes (destroys) the activity running on the foreground.
Well I have come across some code which helps me capture the back button signal so that I cannot exit the application. The only way to exit it in such cases is to press the home key.
...
Hi,
I'm building a game which works as some type of a quiz. I ask user the question and when he submits the answer(click or touch correct answer) I need to refresh the page with some other question.
How should i implement this? How to wait for users answer and continue when onClick or OnTouch listener finishes?
Should i use Handler cla...
A Follow up to this question: http://stackoverflow.com/questions/3488880/group-of-views-controls-on-multiple-screens
I have created a parent class and a child class that inherits from it. When I set the OnClickListener in the child class, the event fires when the button is clicked. When I move the set OnClickListener to the parent cla...
Hey hey!
In my android app, I'm making a method that pop all activities and bring up the first activity.
I use this code:
Intent intent = new Intent(this, MMConnection.class);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
this.startActivity(intent);
As I noticed that the transition was still a left to right animation, does someon...
I would think this should be a relatively easy question to answer, but I'm brand new to android development and so not sure where else to turn.
I have a simple layout (relative currently) for my main Activity. I want to create an object (a card for a card game) that will have all of the necessary properties for that card (value, suit, ...
I have some activities and I have to display a fullscreen ad image before displaying the activity... all my activities extends a custom activity and I thought it was a great idea to implement that advertisement there, so I did:
public class BaseActivity extends Activity {
public void onCreate(Bundle icicle){
super.onCreate(i...
Hi all,
At first place, I have been learnt that the developers of "Jbpm" is transfered to "Activity Bpmn 2" in recent times (ex: Tom).
What the important thing I am wondering about is whether the support for Jbpm will be over or not.. Besides, I would be glad to hear your ideas about if the improvements of Activity Bpmn will make it bet...
Hi all,
I have an app that needs to scan a barcode to get a code before it can continue.
I use this code to start the scanning activity:
finish = (Button) findViewById(R.id.finishButton);
finish.setOnClickListener(new OnClickListener() {
public void onClick(View viewParam) {
/*Prompt the user to s...
Hello all!
I am developing my first android app and need a little bit of help. I am creating a recipes page and I would like to have a Favorites button on it. I would like the user to be able to click the favorites button while they are viewing a recipe and have it added to the favorites page. However when the user clicks the button ...
I am trying to add an object to an arraylist but when I view the results of the array list, it keeps adding the same object over and over to the arraylist. I was wondering what the correct way to implement this would be.
public static ArrayList<Contact> parseContacts(String responseData) {
ArrayList<Contact> Contacts = new Arra...
When I restart an Activity using
Intent intent = new android.content.Intent();
intent.setClass(this, this.getClass());
this.startActivity(intent);
A lot of the state is remembered, but I want to clear it all (its a rare exception handler that I am using to try to clear all).
...
While testing on Android 1.6 using a G1 I have noticed that when I slide out the keyboard it kills the activity and recreates it even though I have set my activity to only display in portrait mode.
Same happens when I push the keyboard back in.
I get onSaveInstance, onDestroy called, then onCreate, onResume, OnrestoreInstance...
I und...
I have a problem:
I have a UI thread which displays webwiew and another chatActivity which displays chat.
I keep on getting data from server which would be displayed on both Activities.
What is the best way to do this viz doInBackground or Service,
If service, than can i bind 2 activity with 1 service i.e. if user press logout from UI...
Have following setup:
MainActivity class - extends activity
MyLayout class - extends View
Prefs class - extends PreferenceActivity and implements OnSharedPreferenceChangeListener
MainActivity creates a MyLayout class and sets it as its contentview. Once the user presses on the menu, Prefs class starts where the user can change some s...