android - Destroying Activity or application itself from another application -


I have two applications, one is a receiver and it is starting my application. it works fine. Now I want to delete my application from the receiver. Is this possible? Please note that these are my own applications

This is possible but the activity is -method.

You can register an activity using a registerReiver (..) for a receiver and handle your logic in your activity. Do not forget the ungrassed receiver (...) inside OnDestroy.

Example:

  Broadcast receiver MRIVAR; @ Override Public Waste Create (Bundle Saved InstantState) {IntentFilter filter = new IntentFilter (); Filter.addAction (...); MReceiver = new broadcast receiver () {@ Override Public Records on Receive (Reference Reference, Intent of Intent) {// Applied Logic Finish (); }} Register Receiver (MREC, Filters); }    

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -