Git Product home page Git Product logo

Comments (1)

dawidgdanski avatar dawidgdanski commented on July 27, 2024
  1. I close the app from the task manager

By closing application from the task manager you kill the process the application is running on. There is no way to bring the applicatoin back until you do it manually by launching it.

  1. I need the service to continue scanning on the background even if the app is killed.

If you hide your application scanning in search of BLE devices to the background, there is a high probability that the OS will kill your application. You can read more about it here: http://stackoverflow.com/questions/31169434/application-startup-lifecycle/31170603#31170603

However, you can prevent it from doing that by:

2.1 giving your application "foreground priority" by starting from your service notification via [Service.startForeground()](http://developer.android.com/reference/android/app/Service.html#startForeground%28int, android.app.Notification%29)

2.2 Starting your service by returning Service.START_STICKY parameter. WHen your app is killed and the OS finds some resources your service will be launched again and you can enable scanning once again.

from kontakt-android-sdk.

Related Issues (20)

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.