Integrate build process with React Native #18
2 changed files with 8 additions and 6 deletions
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue