Skip to content

Commit 4213e4b

Browse files
author
Mihail Slavchev
committed
use AppCompatActivity as a base class for NativeScriptActivity
1 parent 2436cfe commit 4213e4b

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

build/project-template-gradle/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ repositories {
149149
}
150150

151151
dependencies {
152-
def suppotVer = "22.2.0";
152+
def suppotVer = "23.2.0";
153153
if(project.hasProperty("supportVersion")) {
154154
suppotVer = supportVersion
155155
}

build/project-template-gradle/src/main/java/com/tns/NativeScriptActivity.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package com.tns;
22

33
@JavaScriptImplementation(javaScriptFile = "app/tns_modules/ui/frme/frame.js")
4-
public class NativeScriptActivity extends android.app.Activity implements com.tns.NativeScriptHashCodeProvider {
4+
public class NativeScriptActivity extends android.support.v7.app.AppCompatActivity implements com.tns.NativeScriptHashCodeProvider {
55

66
public NativeScriptActivity()
77
{
@@ -48,6 +48,14 @@ protected void onActivityResult(int requestCode, int resultCode, android.content
4848
params[2] = data;
4949
com.tns.Platform.callJSMethod(this, "onActivityResult", void.class, params);
5050
}
51+
52+
public void onRequestPermissionsResult(int requestCode, String permissions[], int[] grantResults) {
53+
java.lang.Object[] params = new Object[3];
54+
params[0] = requestCode;
55+
params[1] = permissions;
56+
params[2] = grantResults;
57+
com.tns.Platform.callJSMethod(this, "onRequestPermissionsResult", void.class, params);
58+
}
5159

5260
public boolean equals__super(java.lang.Object other) {
5361
return super.equals(other);

0 commit comments

Comments
 (0)