I have a running game thread (lets call it 'A') that will call a new activity to start from within it ('B'). The game thread object itself is declared and run from another activity 'C' though so how can I pass a Bundle from 'A' to 'B'? An intent is used in 'A' to launch 'B' but would a different method be applicable?
I cannot just creat...
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...
OK, so not entirely sure this is possible...
But trying to write an application so that I can run some code before any of the following activities are performed.
1) APK is downloaded from web and market launches installer
2) Install button is pressed on android market
Is it possible to intercept and prompt on these events, or has Goo...
I have an android application which allows the user to open up google maps or navigator to show a certain address. This functionality was working in the past, but now I get the following error and the app crashes:
ERROR/AndroidRuntime(2165): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.int...
Hi,
I'm working on an app and I want to integrate the Last.fm app into it. Basically, when someone is looking at an artist in my app, I would like to have a button that they can tap to open up Last.fm application with the artist's information.
This intent works, but it loads a menu asking which app I would like to use (Browser or Last....
I'm attempting to write a BroadcastReceiver to be notified when the Android OS kills an app in order to reclaim resources. I've tried filtering on "android.intent.action.PACKAGE_RESTARTED" but I never seem to receive that broadcast, even when I force close an application.
So, am I using the correct intent action filter? If not, what i...
Hi :-),
I've started to write a small app for android. It looks very nice, but there is one thing I don't understand.
I've created a new intent in the activity A and I've added a serialized vector intent.putExtra("key", vector). On the called activity B I'm doing this: Vector<ItemModel> items = (Vector<ItemModel>) getIntent().getExtras...
I figured out how to pass a String value between activites thanks to this site, however I'm having trouble passing an image. What I'm trying to to is have a user click a button that opens the gallery and allows selecting of a picture. Then I have another button that opens another activity that displays an ImageView. I want to be able to ...
Does anyone know how to access the contacts from the Galaxy S?
I have this line of code:
Intent intent = new Intent(Intent.ACTION_VIEW, Contacts.CONTENT_URI);
startActivity(intent);
and it works on the emulator as well as on the Samsung i5700. I tried running my app on Samsung i9000 (Galaxy S) but it crashes.
I am getting the follo...
How, in android, do I start an app set as the default (i.e. Handcent for Messaging, Dolphin for browsing)?
I can only find how to use definite package names for intents:
Intent i = new Intent(Intent.ACTION_MAIN);
i.addCategory(Intent.CATEGORY_LAUNCHER);
switch (position) {
case 0: //messages
i.setPa...
I've been wondering if it is possible to use an IntentService to do some networking while keeping the queue of pending intents prioritized. My goal to be able to download some images in the background, add more if needed (send another Intent) and be able to reset the queue if necessary (preferably using a specific Intent). That is all po...
I tried using the following data in my intent filter:
<data android:scheme="http" android:host="an.example.i.p" android:pathPrefix="t" />
Why doesn't the following url trigger it?
http://an.example.i.p/t/v2.aspx/chase/a.test.auto
...
Hi there
Hopefully this is very simple.
I have a central activity that can be launched from two separate classes. I was hoping that in this central activity I could have an IF statement like
if(this.getIntent() == MainMenu.class)
{
// Do something here
}
But obviously that isn't legal so how could I structure an expression to chec...
Is it possible to call the built-in Video Recorder in Android through an implicit Intent? I did some search but haven't figured out yet.
Many thanks.
...
Hi,
I'm currently looking for a way to launch the default browser application on Android and pass a session cookie to it.
My application communicates with an external API over which I have no control using HttpClient, then passes the user to the site for the final stages.
I am aware that this is probably possible using a WebView, Howe...
I've been experimenting with the Android SDK over the past few days, in readiness to write an App for the store, however I've run across a bit of a problem.
The App I'll be writing requires that the user has a Google account associated with the phone. Retreiving and making use of the Auth token etc was not a problem, however I would lik...
My music application constantly plays music in the background, however I'd like to be able to detect when another application starts playing audio (such as the YouTube app) so I can pause/mute/stop the audio in my application.
This will allow a user to continue browsing the web whilst listening to music, but then if they wish to watch a...
I have a menu and would like to open a new Activity when the user clicks on the menu item:
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle item selection
switch (item.getItemId()) {
case R.id.add_symbol:
System.out.println("ADD SYMBOL CLICKED!");
Intent myIntent...
My application starts with a welcome screen Activity, but that screen has an option to skip that screen altogether in future launches.
What's the proper Android way to do this? Initially, I just automatically detected the skipWelcome preference and switched to the 2nd activity from Welcome. But this had the effect of allowing the use...
Hello,
I am facing a problem with a clock widget i made. I want the user to touch the clock and launch the clock app on the phone. this is the code:
//this worked on my nexus 2.1
if(VERSION.SDK.equals("7")){
RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.widget);
Intent AlarmClockIntent ...