Integrate build process with React Native #18

Merged
akinwale merged 8 commits from react-base into master 2017-12-28 19:06:32 +01:00
2 changed files with 8 additions and 6 deletions
Showing only changes of commit 5c85db2614 - Show all commits

View file

@ -8,7 +8,7 @@ install:
- export PATH=/usr/bin:$PATH - export PATH=/usr/bin:$PATH
- sudo dpkg --add-architecture i386 - sudo dpkg --add-architecture i386
- sudo apt-get -qq update - 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 - sudo pip install --upgrade cython==0.25.2 pip setuptools
- git clone https://github.com/akinwale/buildozer.git - git clone https://github.com/akinwale/buildozer.git
- cd app - cd app

View file

@ -90,14 +90,16 @@ public class PythonService extends Service implements Runnable {
String serviceDescription = extras.getString("serviceDescription"); String serviceDescription = extras.getString("serviceDescription");
Context context = getApplicationContext(); Context context = getApplicationContext();
Notification notification = new Notification(context.getApplicationInfo().icon,
serviceTitle, System.currentTimeMillis());
Intent contextIntent = new Intent(context, PythonActivity.class); Intent contextIntent = new Intent(context, PythonActivity.class);
PendingIntent pIntent = PendingIntent.getActivity(context, 0, contextIntent, PendingIntent pIntent = PendingIntent.getActivity(context, 0, contextIntent,
PendingIntent.FLAG_UPDATE_CURRENT); PendingIntent.FLAG_UPDATE_CURRENT);
/*if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) { Notification notification = new Notification.Builder(context)
notification.setLatestEventInfo(context, serviceTitle, serviceDescription, pIntent); .setContentTitle(serviceTitle)
}*/ .setContentText(serviceDescription)
.setContentIntent(pIntent)
.setWhen(System.currentTimeMillis())
.setOngoing(true)
.build();
startForeground(1, notification); startForeground(1, notification);
} }