Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(android): support metadata filtering #93

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ in case of vulnerabilities.

### Fixed
- Complete migration to ns8 and fix build issues by [@rigor789](https://github.com/rigor789) ([#92](https://github.com/proyecto26/nativescript-inappbrowser/pull/92)).
- Fix support `Metadata Filtering` for Android by [@jcassidyav](https://github.com/jcassidyav) ([#93](https://github.com/proyecto26/nativescript-inappbrowser/pull/93)).

## [3.1.2] - 2021-06-28

Expand Down
3 changes: 3 additions & 0 deletions demo/App_Resources/Android/native-api-usage.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"whitelist-plugins-usages": true
}
3 changes: 2 additions & 1 deletion demo/App_Resources/Android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
android:name="com.tns.NativeScriptActivity"
android:label="@string/title_activity_kimera"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|smallestScreenSize|screenLayout|locale|uiMode"
android:theme="@style/LaunchScreenTheme">
android:theme="@style/LaunchScreenTheme"
android:exported="true">

<meta-data android:name="SET_THEME_ON_LAUNCH" android:resource="@style/AppTheme" />

Expand Down
3 changes: 3 additions & 0 deletions demo/App_Resources/iOS/native-api-usage.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"whitelist-plugins-usages": true
}
6 changes: 3 additions & 3 deletions demo/app/home/home-view-model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export class HelloWorldModel extends Observable {
modalPresentationStyle: "formSheet",
modalTransitionStyle: "coverVertical",
modalEnabled: true,
enableBarCollapsing: false,
enableBarCollapsing: true,
formSheetPreferredContentSize: {
width: widthDIPs - widthDIPs / 6,
height: heightDIPs - heightDIPs / 6,
Expand All @@ -65,8 +65,8 @@ export class HelloWorldModel extends Observable {
"my-custom-header": "my custom header value",
},
hasBackButton: true,
browserPackage: "",
showInRecents: false,
browserPackage: "com.android.chrome",
showInRecents: true,
});
await sleep(800);
Dialogs.alert({
Expand Down
34 changes: 34 additions & 0 deletions src/platforms/android/native-api-usage.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"uses": [
"com.proyecto26*:*",
"android.app:Activity*",
"android.content:Context*",
"android.content:Intent*",
"android.content.pm:ResolveInfo*",
"android.content.pm:PackageManager*",
"android.content.res:Resources*",
"android.graphics:BitmapFactory*",
"android.graphics:Color*",
"android.net:Uri*",
"android.os:Build*",
"android.os:Bundle*",
"android.provider:Browser*",
"android.text:TextUtils*",
"android.nfc:NfcAdapter*",
"androidx.browser.customtabs:CustomTabsClient*",
"androidx.browser.customtabs:CustomTabsIntent*",
"androidx.browser.customtabs.CustomTabsIntent:Builder*",
"androidx.core.graphics:ColorUtils*",
"android.support.customtabs:CustomTabsClient*",
"android.support.customtabs:CustomTabsIntent*",
"android.support.customtabs.CustomTabsIntent:Builder*",
"android.support.customtabs.action:CustomTabsService*",
"android.support.v4.graphics:ColorUtils*",
"java.lang:Object*",
"java.lang.reflect:Method*",
"java.util:List*",
"java.util:Arrays*",
"java.util.regex:Pattern*",
"java.util.regex:Matcher*"
]
}
Binary file modified src/platforms/android/nativescript_inappbrowser.aar
Binary file not shown.