Phonegap Singleton Mode

Source: Internet
Author: User

Today, when cloud push is used, the app is opened, and a message result is pushed in the console and clicked, and a client is re-opened...

OK. What I need is a singleinstance. I used singleinstance to achieve the effect.

Reference What Baidu Knows

Manifest. android: launchmode = "standard" has four properties configured under the activity tag in XML. The default attribute is the above. Each standard startactivity will instantiate an instance and there are three types: when singletop starts an activity in this mode, if an instance with this activity already exists at the top of the stack, it will not be instantiated again.
Otherwise, a new activity object singletask is instantiated. If the activity instance (any location) exists in the stack when the activity in this mode is started, the activity object is not re-instantiated.
Instead, the previous activity objects are reused and all other activity objects on the activity object are removed (equivalent to the activity being destroyed ); this should be what you call singleinstance. A single instance starts a stack to store activity instances in this startup mode!

 

Phonegap Singleton Mode

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.