Skip to content

Commit

Permalink
Support API level 30 - version 1.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
terreng committed Aug 3, 2022
1 parent fdf75dd commit 405dc7e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cordova-plugin-open-app-link",
"version": "1.0.2",
"version": "1.0.3",
"description": "A Cordova plugin for opening a link only if there's an app installed to handle it.",
"cordova": {
"id": "cordova-plugin-open-app-link",
Expand Down
2 changes: 1 addition & 1 deletion plugin.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
id="cordova-plugin-open-app-link"
version="1.0.2">
version="1.0.3">
<name>cordova-plugin-open-app-link</name>
<description>A Cordova plugin for opening a link only if there's an app installed to handle it.</description>
<license>MIT</license>
Expand Down
5 changes: 1 addition & 4 deletions src/android/OpenAppLink.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public boolean execute(String action, JSONArray data, CallbackContext callbackCo
Context context = this.cordova.getContext();
String url = data.getString(0);

if (launchNativeBeforeApi30(context, Uri.parse(url))) {
if (launchUri(context, Uri.parse(url))) {

callbackContext.success("true");

Expand Down Expand Up @@ -87,8 +87,6 @@ public static Set<String> extractPackageNames(List<ResolveInfo> resolveInfos) {
return packageNameSet;
}

/* Cordova doesn't support Android api level 30 yet
static boolean launchUri(Context context, Uri uri) {
boolean launched = Build.VERSION.SDK_INT >= 30 ?
launchNativeApi30(context, uri) :
Expand All @@ -109,6 +107,5 @@ static boolean launchNativeApi30(Context context, Uri uri) {
return false;
}
}
*/

}

0 comments on commit 405dc7e

Please sign in to comment.