GithubHelp home page GithubHelp logo

t0ry / android_startup_activity Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cleverua/android_startup_activity

1.0 2.0 0.0 85 KB

A custom StartupActivity to workaround a known Android issue with two application instances. The issue is described here[http://code.google.com/p/android/issues/detail?id=2373] and here[http://code.google.com/p/android/issues/detail?id=5277].

android_startup_activity's Introduction

DESCRIPTION

Android OS is really good, however it is not perfect. At least on 1.6, 2.0.1 and 2.1 we have encountered an odd application startup bug, described here and here. Believe me or not, but after a new application version is loaded on the device/emulator we got two instances of the same app. This is especially annoying in production when customers upgrade the app via OTA.

This project solves this by introducing the StartupActivity, which simply prevents another instance of the app to be started.

Usage

Suppose you have an app and its launching activity is MainActivity.

To use the StartupActivity you need to:

  • include the <uses-permission android:name=“android.permission.GET_TASKS” /> statement into your AndroidManifest.xml.

  • make the StartupActivity your launching activity instead of the MainActivity.

  • modify the StartupActivity.onCreate() method to use an Intent pointing to your MainActivity.

Please, make sure you’ve checked the source code for the usage details.

EXAMPLES

To see an example please launch the Android Startup Activity Demo application in Android device emulator.

android_startup_activity's People

Contributors

pavlo avatar vitkhudenko avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.