mirror of
https://github.com/liberatedsystems/openCom-Companion.git
synced 2024-11-25 14:50:37 +01:00
Start service on Android
This commit is contained in:
parent
536c77396f
commit
f8f058687e
@ -96,7 +96,9 @@ class SidebandApp(MDApp):
|
|||||||
self.guide_action()
|
self.guide_action()
|
||||||
|
|
||||||
self.app_state = SidebandApp.ACTIVE
|
self.app_state = SidebandApp.ACTIVE
|
||||||
self.start_android_service()
|
|
||||||
|
if RNS.vendor.platformutils.get_platform() == "android":
|
||||||
|
self.start_android_service()
|
||||||
|
|
||||||
def start_android_service(self):
|
def start_android_service(self):
|
||||||
service = autoclass('io.unsigned.sideband.ServiceSidebandservice')
|
service = autoclass('io.unsigned.sideband.ServiceSidebandservice')
|
||||||
|
@ -150,13 +150,6 @@ public class PythonService extends Service implements Runnable {
|
|||||||
// builder.setSmallIcon(context.getApplicationInfo().icon);
|
// builder.setSmallIcon(context.getApplicationInfo().icon);
|
||||||
builder.setSmallIcon(service_icon);
|
builder.setSmallIcon(service_icon);
|
||||||
notification = builder.build();
|
notification = builder.build();
|
||||||
|
|
||||||
// Log.v("python service", "Testing WM locks...");
|
|
||||||
// WifiManager wm = (WifiManager) getSystemService(Context.WIFI_SERVICE);
|
|
||||||
// MulticastLock ml = wm.createMulticastLock("sometag");
|
|
||||||
// Log.v("python service", "WM locks done");
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
startForeground(getServiceId(), notification);
|
startForeground(getServiceId(), notification);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user