File tree Expand file tree Collapse file tree 5 files changed +9
-2
lines changed
.github/AAR Source (Android) Expand file tree Collapse file tree 5 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 1010
1111 <uses-sdk android : targetSdkVersion =" 4" />
1212 <uses-feature android : name =" android.hardware.camera" android : required =" false" />
13+ <uses-feature android : name =" android.hardware.camera.front" android : required =" false" />
1314 <uses-permission android : name =" android.permission.READ_EXTERNAL_STORAGE" tools : node =" replace" />
1415 <uses-permission android : name =" android.permission.WRITE_EXTERNAL_STORAGE" tools : node =" replace" />
1516 <uses-permission android : name =" android.permission.READ_MEDIA_IMAGES" tools : node =" replace" />
Original file line number Diff line number Diff line change @@ -131,19 +131,25 @@ else if( isXiaomiOrMIUI < 0 )
131131 }
132132
133133 // Credit: https://github.com/jamesmontemagno/MediaPlugin/issues/307#issuecomment-356199135
134+ // Credit: https://stackoverflow.com/a/67288087/2373034
134135 public static void SetDefaultCamera ( Intent intent , boolean useRearCamera )
135136 {
136137 if ( useRearCamera )
137138 {
138139 intent .putExtra ( "android.intent.extras.LENS_FACING_BACK" , 1 );
139140 intent .putExtra ( "android.intent.extras.CAMERA_FACING" , 0 );
140141 intent .putExtra ( "android.intent.extra.USE_FRONT_CAMERA" , false );
142+ intent .putExtra ( "com.google.assistant.extra.USE_FRONT_CAMERA" , false );
141143 }
142144 else
143145 {
144146 intent .putExtra ( "android.intent.extras.LENS_FACING_FRONT" , 1 );
145147 intent .putExtra ( "android.intent.extras.CAMERA_FACING" , 1 );
146148 intent .putExtra ( "android.intent.extra.USE_FRONT_CAMERA" , true );
149+ intent .putExtra ( "com.google.assistant.extra.USE_FRONT_CAMERA" , true );
150+
151+ intent .putExtra ( "camerafacing" , "front" );
152+ intent .putExtra ( "default_camera" , "1" );
147153 }
148154 }
149155
Original file line number Diff line number Diff line change 1- = Native Camera for Android & iOS (v1.3.6 ) =
1+ = Native Camera for Android & iOS (v1.3.7 ) =
22
33Online documentation & example code available at: https://github.com/yasirkula/UnityNativeCamera
44E-mail: yasirkula@gmail.com
Original file line number Diff line number Diff line change 11{
22 "name" : " com.yasirkula.nativecamera" ,
33 "displayName" : " Native Camera" ,
4- "version" : " 1.3.6 " ,
4+ "version" : " 1.3.7 " ,
55 "documentationUrl" : " https://github.com/yasirkula/UnityNativeCamera" ,
66 "changelogUrl" : " https://github.com/yasirkula/UnityNativeCamera/releases" ,
77 "licensesUrl" : " https://github.com/yasirkula/UnityNativeCamera/blob/master/LICENSE.txt" ,
You can’t perform that action at this time.
0 commit comments