Skip to content

Commit

Permalink
Bugfix for #46
Browse files Browse the repository at this point in the history
  • Loading branch information
yasirkula committed Sep 14, 2020
1 parent 3fa2f74 commit 9b86397
Show file tree
Hide file tree
Showing 5 changed files with 280 additions and 216 deletions.
6 changes: 3 additions & 3 deletions .github/AAR Source (Android)/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.yasirkula.unity">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" package="com.yasirkula.unity">
<application>
<provider
android:name="com.yasirkula.unity.NativeCameraContentProvider"
Expand All @@ -10,6 +10,6 @@

<uses-sdk android:targetSdkVersion="4" />
<uses-feature android:name="android.hardware.camera" android:required="false" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" tools:node="replace" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" tools:node="replace" />
</manifest>
4 changes: 4 additions & 0 deletions .github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ After building your project, verify that NativeCamera's `<provider ... />` tag i

If your project uses ProGuard, try adding the following line to ProGuard filters: `-keep class com.yasirkula.unity.* { *; }`

- **NativeCamera functions return Permission.Denied even though I've granted the permission"**

Declare `WRITE_EXTERNAL_STORAGE` permission manually in your [**Plugins/Android/AndroidManifest.xml** file](https://answers.unity.com/questions/982710/where-is-the-manifest-file-in-unity.html) with the `tools:node="replace"` attribute as follows: `<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" tools:node="replace"/>` (you'll need to add the `xmlns:tools="http://schemas.android.com/tools"` attribute to the `<manifest ...>` element).

## HOW TO

### A. Accessing Camera
Expand Down
Binary file modified Plugins/NativeCamera/Android/NativeCamera.aar
Binary file not shown.
Loading

0 comments on commit 9b86397

Please sign in to comment.