Questions tagged [onnewintent]

protected method in android.app.Activity class

onNewIntent(Intent) is a protected method in android.app.Activity class and this is called for activities that set launchMode to "singleTop" in their package, or if a client used the FLAG_ACTIVITY_SINGLE_TOP flag when calling startActivity(Intent).

55 questions
0
votes
1 answer

How can I clear all but the top two activities in Android?

My App's activity structure can be any of the following. Case1: A > B > B > B > D Case2: A > B > D Case3: A > B > B > B > C > D There is an option in Activity D that when selected I would like to end up with this on the stack: A > B Where…
0
votes
2 answers

int value passed with intents doesn't change second time despite onNewIntent()

I pass an integer value (guide) to the next class(activity) like this: in different activities.. first: public void onClick(View v) { Intent intent002a = new Intent(getApplicationContext(), GameOver002a.class); …
0
votes
0 answers

Intent.hasExtra(NfcAdapter.EXTRA_TAG) return null

I am trying to read an NFC tag on my activity (this is not the main activity). Everything is working fine, just that this does not read the "NfcAdapater.EXTRA_TAG", and this is required to get the text of the tag NFC. Activity private IntentFilter[]…
user5667374
0
votes
1 answer

Android get result from Camera Intent in onNewIntent

I have an Activity with android:launchMode="singleInstance" . I want launch camera from this and then process result, but startActivityForResult doesn't work with singleInstance. So maybe it's possible to get result from camera using onNewIntent…
Oleg Ryabtsev
  • 457
  • 2
  • 9
  • 24
0
votes
1 answer

How to Pass onNewIntent value to Fragment?

I want to pass intent value to fragment, right now in the activity i am getting the intent value through onNewIntent but i am passing the intent value through Bundle to Fragment but it's not working. * MainActivity.java * @Override protected void…
Anshuman Patnaik
  • 221
  • 1
  • 3
  • 9
0
votes
1 answer

Using onNewIntent and activity lifecycle to verify if a message has been seen

I have a push notification server to deliver messages to my Android app and I'd like to know the best way to notify the server when the message has been seen. Currently i'm trying to send the ack message to the server as soon as the main activity…
Felipe Jun
  • 722
  • 11
  • 22
0
votes
1 answer

not getting to onNewIntent after tapping to another NFC enabled device.(android)

The main problem is that we are unable to go to onNewIntent() when i tap my phone with other NFC enabled phone(NFC is ON). Under no circumstances other than the main intent, i am unable to reach onNewIntent. I have tried all the three filters…
0
votes
1 answer

How to OnNewIntent function inside SherlockFragment?

In my application I am using SherlockFragment for Sidenavigation menu and as well as Tab fragments. Here I got a position to use OnNewIntent function inside SherlockFragment. But its returning an error like "The method onNewIntent(Intent) of type…
0
votes
2 answers

progressDialog in onNewIntent

I am using onNewIntent when I am scanning NFC tags. I want to show ProgressDialog while tag is scanned. I tried use a thread but it crashed my app. Is there some way how I can show progressDialog when onNewIntent starts? public void…
Matwosk
  • 459
  • 1
  • 9
  • 25
0
votes
1 answer

Logging out from an android app

I have an app with many Activities, A (the main), B, C, D, E and a Service running in the background... My app is a client connected to a server. At a certain point the server tells the client to log out, the service receives the message and now I…
Luigi Tiburzi
  • 4,265
  • 7
  • 32
  • 43
1 2 3
4