All Projects → judemanutd → Autostarter

judemanutd / Autostarter

Licence: mit
This library helps bring up the autostart permission manager of a phone to the user so they can add an app to autostart.

Programming Languages

java
68154 projects - #9 most used programming language
kotlin
9241 projects

Projects that are alternatives of or similar to Autostarter

Open Pixel Art
A collaborative pixel art project to teach people how to contribute to open-source
Stars: ✭ 331 (-0.9%)
Mutual labels:  hacktoberfest
Validator Docs
Validação de CPF, CNPJ, CNH, NIS, Título Eleitoral e Cartão Nacional de Saúde com Laravel.
Stars: ✭ 334 (+0%)
Mutual labels:  hacktoberfest
Pact Python
Python version of Pact. Enables consumer driven contract testing, providing a mock service and DSL for the consumer project, and interaction playback and verification for the service provider project.
Stars: ✭ 335 (+0.3%)
Mutual labels:  hacktoberfest
Dev Ios
DEV Community iOS App
Stars: ✭ 334 (+0%)
Mutual labels:  hacktoberfest
Bugbug
Platform for Machine Learning projects on Software Engineering
Stars: ✭ 334 (+0%)
Mutual labels:  hacktoberfest
Stream
🗄️ Stream plugin for WordPress
Stars: ✭ 335 (+0.3%)
Mutual labels:  hacktoberfest
Rf24mesh
OSI Layer 7 Mesh Networking for RF24Network & nrf24L01+ devices
Stars: ✭ 329 (-1.5%)
Mutual labels:  hacktoberfest
Livecode
LiveCode cross-platform development environment (engine)
Stars: ✭ 336 (+0.6%)
Mutual labels:  hacktoberfest
Pode
Pode is a Cross-Platform PowerShell web framework for creating REST APIs, Web Sites, and TCP/SMTP servers
Stars: ✭ 329 (-1.5%)
Mutual labels:  hacktoberfest
Grouparoo
🦘 The Grouparoo Monorepo - open source customer data sync framework
Stars: ✭ 334 (+0%)
Mutual labels:  hacktoberfest
Kmeans
k-means clustering algorithm implementation written in Go
Stars: ✭ 332 (-0.6%)
Mutual labels:  hacktoberfest
Egeria
Open Metadata and Governance
Stars: ✭ 328 (-1.8%)
Mutual labels:  hacktoberfest
Pandas alive
Create stunning, animated visualisations with Pandas & Matplotlib as easy as calling `df.plot_animated()`
Stars: ✭ 333 (-0.3%)
Mutual labels:  hacktoberfest
Nnstreamer
🔀 Neural Network (NN) Streamer, Stream Processing Paradigm for Neural Network Apps/Devices.
Stars: ✭ 329 (-1.5%)
Mutual labels:  hacktoberfest
Admin
A beautiful and fully-featured administration interface builder for hypermedia APIs
Stars: ✭ 335 (+0.3%)
Mutual labels:  hacktoberfest
Iproute2 Cheatsheet
iproute2 command reference
Stars: ✭ 330 (-1.2%)
Mutual labels:  hacktoberfest
Node Build Monitor
A Build Monitor written in Node.js, which supports several build services and can be easily extended.
Stars: ✭ 336 (+0.6%)
Mutual labels:  hacktoberfest
Trefle Api
🍀 Trefle is a botanical JSON REST API for plants species, allowing you to search and query over all the registered species, and build the next gardening apps and farming robots.
Stars: ✭ 335 (+0.3%)
Mutual labels:  hacktoberfest
Netcdf C
Official GitHub repository for netCDF-C libraries and utilities.
Stars: ✭ 336 (+0.6%)
Mutual labels:  hacktoberfest
Guark
Build awesome Golang desktop apps and beautiful interfaces with Vue.js, React.js, Framework 7, and more...
Stars: ✭ 334 (+0%)
Mutual labels:  hacktoberfest

Autostarter

Download license API

This library helps bring up the autostart permission manager of a phone to the user so they can add an app to autostart.

Why this library?

In my experience so far when using Firebase to integrate cloud messaging or notifications in app, phones running stock android OS receive notifications perfectly whereas phones which have custom UI installed on them from the OEM such as Xiaomi, Letv do not receive any fcm calls.

This is because the OEM's by defaut add an unrecognized app to the blacklist which prevents it from running in the background and receiving notifications, apps like Whatsapp on the other hand are known apps which are whitelisted by the OEM and can hence receive notifications.

To work around this the user must allow your app to autostart which gives your app the required permission to run in the background and listen for any messages from Firebase. Unfortunately since this is an OEM specific problem and not an android sdk problem, there is no documented api for bringing up the autostart permission manager of a phone.

Each manufacturer has their own version of it with different package names, hence this library was created to curate a list of all the packages used by each OEM for their version of the autostart permissiong manager.

Usage

Gradle

Add this to your module's build.gradle file:

dependencies {
        // ... other dependencies
        implementation 'com.github.judemanutd:autostarter:1.0.8'
}

Maven

<dependency>
    <groupId>com.github.judemanutd</groupId>
    <artifactId>autostarter</artifactId>
    <version>1.0.8</version>
    <type>pom</type>
</dependency>

Once you have integrated the library calling the following function will bring up the autostart permission manager of the phone. The function returns a boolean to indicate if the action was as success or a failure.

    AutoStartPermissionHelper.getInstance().getAutoStartPermission(context)

In order to check if your phone is supported by the library you can call the following command.

     AutoStartPermissionHelper.getInstance().isAutoStartPermissionAvailable(context)

In order to keep the library small and simple I have not included any dialogs or pop ups, It is upto you to provide the user with a message if necessary.

On phones that are not running a custom UI or that do not require an autostart permission, this code will not open any new screen.

Note

As of now the library has support for the following manufacturers :

  1. Xiaomi
  2. Redmi
  3. Letv
  4. Honor [ Untested ]
  5. Oppo [ Untested ]
  6. Vivo [ Untested ]
  7. Huawei
  8. Samsung
  9. Asus
  10. One Plus [ Untested ]

I will be adding support for other manufacturers as and when possible. I am also open to PR's and contributions from others.

Related Info

Since this depends entirely on the OEM and not on android itself, the underlying component that this library makes use of is continuously changing. Do check out these repositories for further information on this issue

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].