[Released] Camera Shot plugin is on Assests Store

CameraShot plugin facilitate to the developer to launch the camera by writing single line of code and take snapshot or record video on Android and iOS device.

Features :

  • Launch device camera from your unity app/game
  • Take snapshot
  • Record video
  • Snapshot and recorded video will save on default camera directory
  • All work in single line of code
  • Doesn’t require Unity Pro
  • Easy to integrate
  • 24x7 Support

Content :

  • Documentation
  • Integration guide
  • Example scene

If you have any query then feel free to drop me a email at devesh.pandey19@gmail.com .

Download it from assets store

Plugin Updated!
Now you can use image as texture captured by android device camera.

Hii Devesh, Thanks for your great plugin. I have a issue in this plugin my app crashes when we launch camera and try to save the image in my app. Ashish verma already send you the Log. Please solve the issue and update it.

Hi Narendraom, I sent updated libraries to Mr. Ashish, please check and let me know if you have any problem.

Hi Devesh, I wish to use Handheld. PlayFullScreenMovie and give the path to the file according to your debug. But my app won’t response in ios after that. Is there a problem with the file o I can’t acces this way ?
Thanks

Hi Devesh, your plugin camera shot is throwing error on some device which is : Native libraries not loaded - dropping message for CameraShotListener.OnErrorEvent

can you tell anything about this…?

Hi,

Can you tell me device model and OS version so that I can reproduce it, because I never seen this issue.
You can write me at devesh.pandey19@gmail.com

Hi Devesh, im using the plugin and the app is crashing after record a video on an Android 8 device

The steps to reproduce de error:
1 - Permission.RequestUserPermission(Permission.Camera) granted.
2 - AndroidCameraShot.LaunchCameraForVideoCapture(3)
3 - Opens the Camera and Start recording
5 - And When you stop recoding the app crashes

Do you know why it’s crashing? thank you

LogCat:

09-05 15:47:43.611: E/ActivityTrigger(1194): activityResumeTrigger: not whiteListedcom.realwear.poc/com.astricstore.camerashots.CameraShotActivity/1
09-05 15:47:43.623: E/AndroidRuntime(14869): FATAL EXCEPTION: main
09-05 15:47:43.623: E/AndroidRuntime(14869): Process: com.realwear.poc, PID: 14869
09-05 15:47:43.623: E/AndroidRuntime(14869): java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=101, result=-1, data=Intent { dat=content://com.realwear.poc.provider/external_files/Movies/VID_20190905_084735.mp4 (has extras) }} to activity {com.realwear.poc/com.astricstore.camerashots.CameraShotActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.content.Context.bindService(android.content.Intent, android.content.ServiceConnection, int)' on a null object reference
09-05 15:47:43.623: E/AndroidRuntime(14869): at android.app.ActivityThread.deliverResults(ActivityThread.java:4271)
09-05 15:47:43.623: E/AndroidRuntime(14869): at android.app.ActivityThread.handleSendResult(ActivityThread.java:4315)
09-05 15:47:43.623: E/AndroidRuntime(14869): at android.app.ActivityThread.-wrap19(Unknown Source:0)
09-05 15:47:43.623: E/AndroidRuntime(14869): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1647)
09-05 15:47:43.623: E/AndroidRuntime(14869): at android.os.Handler.dispatchMessage(Handler.java:106)
09-05 15:47:43.623: E/AndroidRuntime(14869): at android.os.Looper.loop(Looper.java:164)
09-05 15:47:43.623: E/AndroidRuntime(14869): at android.app.ActivityThread.main(ActivityThread.java:6518)
09-05 15:47:43.623: E/AndroidRuntime(14869): at java.lang.reflect.Method.invoke(Native Method)
09-05 15:47:43.623: E/AndroidRuntime(14869): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:443)
09-05 15:47:43.623: E/AndroidRuntime(14869): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
09-05 15:47:43.623: E/AndroidRuntime(14869): Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.content.Context.bindService(android.content.Intent, android.content.ServiceConnection, int)' on a null object reference
09-05 15:47:43.623: E/AndroidRuntime(14869): at android.media.MediaScannerConnection.connect(MediaScannerConnection.java:119)
09-05 15:47:43.623: E/AndroidRuntime(14869): at android.media.MediaScannerConnection.scanFile(MediaScannerConnection.java:243)
09-05 15:47:43.623: E/AndroidRuntime(14869): at com.astricstore.camerashots.CameraShotActivity.scanFile(CameraShotActivity.java:606)
09-05 15:47:43.623: E/AndroidRuntime(14869): at com.astricstore.camerashots.CameraShotActivity.onActivityResult(CameraShotActivity.java:551)
09-05 15:47:43.623: E/AndroidRuntime(14869): at android.app.Activity.dispatchActivityResult(Activity.java:7321)
09-05 15:47:43.623: E/AndroidRuntime(14869): at android.app.ActivityThread.deliverResults(ActivityThread.java:4267)
09-05 15:47:43.623: E/AndroidRuntime(14869): ... 9 more
09-05 15:47:43.655: E/ANDR-PERF-MPCTL(557): Invalid profile no. 0, total profiles 0 only
09-05 15:47:43.660: E/libc(827): Access denied finding property "persist.camera.stats.aetest"
09-05 15:47:43.660: E/mm-camera(827): <STATS_AIS ><ERROR> 173: dsps_send_req: DSPS Send Request Timeout!!
09-05 15:47:43.660: E/mm-camera(827): <STATS_AIS ><ERROR> 173: dsps_send_req: DSPS Send Request Timeout!!
09-05 15:47:43.660: E/mm-camera(827): <STATS_AIS ><ERROR> 173: dsps_send_req: DSPS Send Request Timeout!!
09-05 15:47:43.662: E/ActivityTrigger(1194): activityResumeTrigger: not whiteListedcom.realwear.launcher/com.realwear.launcher.ApplicationActivity/2000011
09-05 15:47:43.662: E/mm-camera(827): <ISP ><ERROR> 1005: isp_handler_control_streamoff: stream_off 2 2 ide 10004

androidmanifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.realwear.poc" android:installLocation="preferExternal" android:versionName="1.0" android:versionCode="1">
<supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="true" android:anyDensity="true" />
<application android:theme=" @ /UnityThemeSelector" android:icon="@drawable/app_icon" android:label=" @anon_76954444 /app_name" android:debuggable="true">
<activity android:name="com.unity3d.player.UnityPlayerActivity" android:label=" @anon_76954444 /app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data android:name="unityplayer.UnityActivity" android:value="true" />
</activity>

<activity
android:name="com.astricstore.camerashots.CameraShotActivity"
android:configChanges="orientation|keyboardHidden|screenSize">
</activity>
<activity
android:name="eu.janmuller.android.simplecropimage.CropImage"
android:configChanges="orientation|keyboardHidden|screenSize">
</activity>

<provider
android:name="android.support.v4.content.FileProvider"
android:authorities="com.realwear.poc.provider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource=" @ /provider_paths"/>
</provider>

</application>
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="24" />
</manifest>

Some errors are coming due to android SDK, I would recommend users to update android SDK and follow documentation provided with plugin.

If still there is another issue then please write me on publisher contact (mentioned on assets store).