Work on service class
This commit is contained in:
parent
80b8ca06c2
commit
b60cde6e4f
|
@ -145,6 +145,7 @@ public class PythonService extends Service implements Runnable {
|
|||
builder.setContentText("Reticulum Running");
|
||||
builder.setContentIntent(pIntent);
|
||||
|
||||
// TODO: Generalise this
|
||||
Bitmap icon_bitmap = BitmapFactory.decodeFile("/data/user/0/io.unsigned.sideband/files/app/assets/notification_icon.png");
|
||||
Icon service_icon = Icon.createWithBitmap(icon_bitmap);
|
||||
// builder.setSmallIcon(context.getApplicationInfo().icon);
|
||||
|
|
|
@ -6,6 +6,20 @@ from jnius import autoclass, cast
|
|||
|
||||
Context = autoclass('android.content.Context')
|
||||
|
||||
class RnsService():
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
def start(self):
|
||||
pass
|
||||
|
||||
def stop(self):
|
||||
pass
|
||||
|
||||
def restart(self):
|
||||
self.stop()
|
||||
self.start()
|
||||
|
||||
class sidebandservice():
|
||||
|
||||
def __init__(self):
|
||||
|
|
|
@ -707,7 +707,6 @@ class SidebandCore():
|
|||
def __start_jobs_immediate(self):
|
||||
# TODO: Reset loglevel
|
||||
self.reticulum = RNS.Reticulum(configdir=self.rns_configdir, loglevel=7)
|
||||
RNS.log("Reticulum started, activating LXMF...")
|
||||
|
||||
if RNS.vendor.platformutils.get_platform() == "android":
|
||||
if not self.reticulum.is_connected_to_shared_instance:
|
||||
|
@ -818,7 +817,7 @@ class SidebandCore():
|
|||
RNS.log("Error while adding I2P Interface. The contained exception was: "+str(e))
|
||||
self.interface_i2p = None
|
||||
|
||||
|
||||
RNS.log("Reticulum started, activating LXMF...")
|
||||
self.message_router = LXMF.LXMRouter(identity = self.identity, storagepath = self.lxmf_storage, autopeer = True)
|
||||
self.message_router.register_delivery_callback(self.lxmf_delivery)
|
||||
|
||||
|
|
Loading…
Reference in New Issue