diff --git a/.travis.yml b/.travis.yml index 0840f0cf..637e9893 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ install: - export PATH=/usr/bin:$PATH - sudo dpkg --add-architecture i386 - sudo apt-get -qq update - - sudo apt-get -qq install build-essential ccache git libncurses5:i386 libstdc++6:i386 libgtk2.0-0:i386 libpangox-1.0-0:i386 libpangoxft-1.0-0:i386 libidn11:i386 python2.7 python2.7-dev openjdk-8-jdk unzip zlib1g-dev zlib1g:i386 m4 libc6-dev-i386 npm + - sudo apt-get -qq install build-essential ccache git libncurses5:i386 libstdc++6:i386 libgtk2.0-0:i386 libpangox-1.0-0:i386 libpangoxft-1.0-0:i386 libidn11:i386 python2.7 python2.7-dev openjdk-8-jdk unzip zlib1g-dev zlib1g:i386 m4 libc6-dev-i386 npm nodejs - sudo pip install --upgrade cython==0.25.2 pip setuptools - git clone https://github.com/akinwale/buildozer.git - cd app diff --git a/p4a/pythonforandroid/bootstraps/lbry/build/src/main/java/org/kivy/android/PythonService.java b/p4a/pythonforandroid/bootstraps/lbry/build/src/main/java/org/kivy/android/PythonService.java index bbe6bdfb..1c3fddf5 100644 --- a/p4a/pythonforandroid/bootstraps/lbry/build/src/main/java/org/kivy/android/PythonService.java +++ b/p4a/pythonforandroid/bootstraps/lbry/build/src/main/java/org/kivy/android/PythonService.java @@ -90,14 +90,16 @@ public class PythonService extends Service implements Runnable { String serviceDescription = extras.getString("serviceDescription"); Context context = getApplicationContext(); - Notification notification = new Notification(context.getApplicationInfo().icon, - serviceTitle, System.currentTimeMillis()); Intent contextIntent = new Intent(context, PythonActivity.class); PendingIntent pIntent = PendingIntent.getActivity(context, 0, contextIntent, PendingIntent.FLAG_UPDATE_CURRENT); - /*if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) { - notification.setLatestEventInfo(context, serviceTitle, serviceDescription, pIntent); - }*/ + Notification notification = new Notification.Builder(context) + .setContentTitle(serviceTitle) + .setContentText(serviceDescription) + .setContentIntent(pIntent) + .setWhen(System.currentTimeMillis()) + .setOngoing(true) + .build(); startForeground(1, notification); }