implemented basic settings page with background service running option
This commit is contained in:
parent
c6e0c6b39a
commit
6f6696b5bb
16 changed files with 764 additions and 104 deletions
src/main/java/io/lbry/lbrynet/reactmodules
|
@ -0,0 +1,31 @@
|
|||
package io.lbry.lbrynet.reactmodules;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.pm.ActivityInfo;
|
||||
|
||||
import com.facebook.react.bridge.ReactApplicationContext;
|
||||
import com.facebook.react.bridge.ReactContextBaseJavaModule;
|
||||
import com.facebook.react.bridge.ReactMethod;
|
||||
|
||||
import io.lbry.lbrynet.LbrynetService;
|
||||
import io.lbry.lbrynet.ServiceHelper;
|
||||
|
||||
public class DaemonServiceControlModule extends ReactContextBaseJavaModule {
|
||||
private Context context;
|
||||
|
||||
public DaemonServiceControlModule(ReactApplicationContext reactContext) {
|
||||
super(reactContext);
|
||||
this.context = reactContext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "DaemonServiceControl";
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void stopService() {
|
||||
ServiceHelper.stop(context, LbrynetService.class);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue