nfc - How to run android program without open the app? -


My app can be opened by NFC, and then use the information in the tag to do some processing, processing is approximately 5 Is seconds.

If my app has been opened by NFC, then I do not want it to be shown on screen. So it's on crate.

  @OrrideCreative on Public Zero (Bundle Saved InstantState) {super.onCreate (SavedInstanceState); SetContentView (com.ab.R.layout.test); Intent = getIntent (); If (NfcAdapter.ACTION_NDEF_DISCOVERED.equals (getIntent). GetAction ()) {Log.v ("nfc", "Start processing"); SystemClock.sleep (5000); // Processing Log.v Simulation ("NFC", "End Processing"); This.finish (); System.exit (0); }}  

But this is not work, the app will display about 5 seconds on the screen.

Even I do not process anything

  if (NfcAdapter.ACTION_NDEF_DISCOVERED.equals (getIntent). GetAction ()) {this.finish ( ); System.exit (0); }  

I can still see the app screen in very short time.

How do I stop the app to show the screen if I use NFC?

Android: Theme = "@Android: Style / Theme Transcellant. Any title "

This makes your activity invisible (if it is empty).


Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -