Skip to content
This repository has been archived by the owner on Mar 12, 2019. It is now read-only.

Commit

Permalink
Make service foreground
Browse files Browse the repository at this point in the history
  • Loading branch information
mkg20001 committed Feb 24, 2017
1 parent 12124d0 commit 44e32e8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,14 @@
env = loadEnv()

if env["platform"] == "android":
import android
from jnius import autoclass
Service = autoclass('org.kivy.android.PythonService').mService
notifi=autoclass("android.app.Notification$Builder")(Service)
notifi.setContentTitle("ZeroNet")
notifi.setContentText("ZeroNet is running")
notification=notifi.getNotification()
Service.startForeground(233,notification)

print "env %s" % env

Expand Down

0 comments on commit 44e32e8

Please sign in to comment.