Nativescript camera take multiple pictures before returning to the app - nativescript

I have a NS 4.1.3 application using TS where I use the nativescript-camera plugin to allow the user to take photos which are saved to the device's photos library.
Everything works great, however, after each photo the camera closes and the user is back at the app and if they want to take another picture they have to go through the same process.
Is there a way to open the camera, take multiple pictures and only when done return back to the app? I could not find anything on the plugin's github page.
Thank you.

you can't take multiple photos in one session using native camera api due to platform limitation. what you can do is capture camera session using AVCaptureSession for ios and CameraCaptureSession camera2 api for android and then show it to user. after that on some button click capture photo.
here is some plugins which might help you:
https://github.com/NickIliev/NativeScript-cameraApp-poc
https://www.npmjs.com/package/nativescript-camera-preview

I ended up using navivescript-camera-plus
They have done a great job exposing the Camera and Library functionality via the plugin's api.

Related

Background Location Tracking for Android with Xamarin.Forms

I am creating a xamarin form app which require user location after every 10 meter.
I am able to get location when app is running in foreground but unable to get location when app get into background.
Any advice will be great.
You need to create a background service in Xamarin.Android and then call that using dependency services. You could also look at Shiny. It is a good plugin built for this purpose.
https://github.com/shinyorg/shiny
Background updates are handled a bit different on each platform. For Android, you will want to integrate a foreground service that subscribes to location changes and the user interface binds to.
You could use the Xamarin.Essentials and MessagingCenter for this.
For more details, please check the code sample in the link below. https://stackoverflow.com/a/63665571/11850033

Using non native camera or gallery

I have a part in my app where users can set a picture from gallery or take it with the camera. The app works perfectly with the native camera or gallery, but with other camera or gallery apps both intents returns null. What I have to do to make my app works fine with non native apps?
Please understand that a negative message is not a fault of the messanger. Let me cite the ultimate answer to a different question here:
there are thousands of possible camera apps -- preloaded or installed by users -- that could claim to support ACTION_VIDEO_CAPTURE, and any of them can have bugs as this one does. There is no EXTRA_PLEASE_AVOID_BUGS that you can pass on the Intent to change that.
This said, check that you are not running into the infamous low-memory condition when you launch an intent. You can find more info and some references here.

Share videos camera roll wp 8

I tired to googling that how share videos form camera roll in windows phone 8 like in Nokia video upload and facebook app. I used to try this
http://msdn.microsoft.com/en-us/library/windowsphone/develop/ff967563(v=vs.105).aspx
Only share picture but I want to share only videos for my app e.g. when my app show in list when share a video by camera roll of windows phone in sharing
To quote the link you included in your question:
Note that this extensibility is only available when the photo is a JPG
file.
And from my experience, I can confirm that it is not possible to register your app as a share target for a video file.
In other words, if a user tries to share a video from the camera roll or another app, there is no way to make your app appear as one of the options in that list.
Did you try using the share media task function?
Check this article out from the msdn :
http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj207027(v=vs.105).aspx
You can use MediaLibrary and there is already an answer for your question in this link. As said, there is no way to select existing sound media and video files through default choosers. Thank you.

Handling Images in PhoneGap

Current Behavior:
I have build a PhoneGap application that takes photos using Camera and the upload to a server. User can see all the photos that are uploaded as thumbnails.
What I am trying to do:
I want that the user should be able to tap on a photo thumbnail and the selected photo should open in the default image viewer for iOS/Android. Also, user should be able to swipe the photo in the default image viewer to see additional photos. This behavior is similar to what Facebook or any other app implements.
I am not sure how this feature is implemented and I am surprised that there is no one who faced this problem.
Thanks for all the help
Try this:
I haven't checked it, but it should work fine.

Grabbing a screenshot programmatically in webos

Is there any way to grab a screenshot of the currently active screen in webos programmatically?
The use-case is an app that takes a screen shot every few seconds for recording user activity.
EDIT: I'm interested in code that actually runs on the device.
There's a private service bus API to grab a screenshot that you can use from the shell via luna-send:
luna-send -n 1 luna://com.palm.systemmanager/takeScreenShot '{"file":"sshot.png"}'
This won't work from a non-com.palm application, so it's possible to do this in homebrew, but not in a catalog app.

Resources