Skip to content
This repository has been archived by the owner on Aug 30, 2022. It is now read-only.

React-Native library for Android that can schedule automatic launches of your app at specific times.

License

Notifications You must be signed in to change notification settings

WazzaJB/react-native-app-launcher

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Currently under development

Installation

  • Run npm install --save git+https://github.com/MrToph/react-native-app-launcher.git

  • Add the following to android/settings.gradle:

    include ':react-native-app-launcher'
    project(':react-native-app-launcher').projectDir = new File(settingsDir, '../node_modules/react-native-app-launcher/android')
    
  • Add the following to android/app/build.gradle:

    ...
    
    dependencies {
        ...
        compile project(':react-native-app-launcher')  // react-native-app-launcher
    }
  • Add the following to android/app/src/main/AndroidManifest.xml:

    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.reactnativeproject">
    
    <uses-permission android:name="android.permission.INTERNET" />
    
    <application
      android:allowBackup="true"
      android:label="@string/app_name"
      android:icon="@mipmap/ic_launcher"
      android:theme="@style/AppTheme">
    
    ...
    
        <activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
        <receiver android:name="io.cmichel.appLauncher.AlarmReceiver" />   <!-- react-native-app-launcher -->
        </application>
    
    </manifest>
  • Add the following to android/app/src/main/java/**/MainApplication.java:

    package com.motivation;
    
    import io.cmichel.appLauncher.LauncherPackage;  // add this for react-native-app-launcher
    
    public class MainApplication extends Application implements ReactApplication {
    
        @Override
        protected List<ReactPackage> getPackages() {
            return Arrays.<ReactPackage>asList(
                new MainReactPackage(),
                new LauncherPackage()     // add this for react-native-app-launcher
            );
        }
    }

Mofifying/Build the Project in Android Studio

  • Start Android Studio and select File -> New -> Import Project and select the android folder.
  • If you get a Plugin with id 'android-library' not found Error, install android support repository through the SDK manager.

About

React-Native library for Android that can schedule automatic launches of your app at specific times.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 78.6%
  • JavaScript 21.4%