Update bind script
This commit is contained in:
parent
0c0d23d871
commit
a9d08f64f4
2 changed files with 7 additions and 2 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
export PROJECTPATH=$PWD
|
||||
export GOPATH="$PROJECTPATH/go"
|
||||
export GO111MODULE=auto
|
||||
export GO111MODULE=on
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
echo "Usage: ./bind.sh <gmitohtml tag, commit hash or local path>"
|
||||
|
@ -38,6 +38,7 @@ if [[ ! "$1" == *\/* ]]; then
|
|||
LIBPATH="."
|
||||
fi
|
||||
go get golang.org/x/mobile/bind
|
||||
gomobile init
|
||||
gomobile bind -target android -androidapi 21 -javapkg space.rocketnine -o $PROJECTPATH/libs/gmitohtml.aar $LIBPATH
|
||||
|
||||
echo "Finished."
|
||||
|
|
|
@ -78,7 +78,11 @@ public class XeniaService extends Service {
|
|||
|
||||
Intent notificationIntent = new Intent(this, MainActivity.class);
|
||||
notificationIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
|
||||
PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, notificationIntent, 0);
|
||||
int flags = 0;
|
||||
if (Build.VERSION.SDK_INT >= 23) {
|
||||
flags = PendingIntent.FLAG_MUTABLE;
|
||||
}
|
||||
PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, notificationIntent, flags);
|
||||
|
||||
builder.setContentIntent(pendingIntent);
|
||||
|
||||
|
|
Loading…
Reference in a new issue