How to restrict user to fetch only specific length video from the iPhone PhotoLibrary - uiimagepickercontroller

I am working on an iOS application. In my application I have a screen in which user can add video and can share that added video to somewhere like FB and this purpose allowing user to add video in two ways user can add video
Shoot the new video from the Camera
Add the video from the iPhone library
I restrict to the user to don't add video more than the specific length say 60 sec, for this purpose have used the videoMaximumDuration property of UIImagePickerControllershooting time this property works properly, as the video reach to the maximum duration an alert popups and restrict to the user to shoot video more than that length.
But as in fetching the video from the library that property does not restrict to the user to show video less than or equal to that length.
How can I restrict the user so that he could not fetch the video which is more than a specific length?

Use the delegate method imagePickerController:didFinishPickingMediaWithInfo: to check the picked video. Should it be too long provide a message to the user and return to the picker.

Related

Flutter cache and retrieve images in same widget, is it possible?

Hei!
I have a quiz app that shows a list of active games. This list also shows the opponents profile image. The list is a stream from firestore.
Everytime the user changes to another screen and back to the gamelist the images are downloaded again..this uses alot of network traffic.
I cant put the images in cache when the app starts as i dont know what games the player have, and they are changing. Is there a way to get the image from url , put it in cache, and IF its in cache , use that image..in the same widget?
I believe cached_network_image package is what you need.

Best practice for screen/page tracking across Web and Mobile app using Google Analytics

My product consists of a website, an iOS app, and an Android app. All of them are having the same set of screens.
I try to set up them so that I can see combined analytics data (e.g. average engagement time on each screen, screen view, interesting app event) in Google Analytics. I wonder what is the best practice to achieve that.
I set up a GA4 property with 3 data streams for Android app, iOS app, and website. I let Android app and iOS app manually send screen_view event with the same screen name. This way it is possible to see analytics data like avg. engagement time from Android/iOS combined.
But for website, gtag.js uses page_view and it logs 3 informations: page_title (default=document.title), page_location (default=location.href), and page_path (default=location.pathname).
In GA dashboard > Engagement > Screen and Page, they provided data filters of 4 possibilities:
Page title and screen class
Page path and screen class
Page title and screen name
Content group
It seems I have the following choices:
Let my website to manually send page_view with page_title=screen name that app is using. Then I can see combined engagement data using Page title and screen name option.
Let my app (iOS and Android) to send screen class as page path. Then use Page path and screen class.
The 1st choices is more feasible for me, but still require a lot of effort. Is there any other solution to achieve this?
Another option is to come up with own event - it requires a lot of effort. Such as event name page [name: <anything from app/website>].
Anyway from my experience I recommend to use built-in events page_view, screen_view for better manipulation across GA4, BigQuery, DataStudio. GA4 interface is built for such events.
For naming screens I recommend to create (at least) google sheet documentation with 3 columns (at least) - Web, Android, iOS. At the end you will end up with amazing GA4 capabilities. Think about Pareto principle 80/20, it is not required to log all of the interactions.

Flutter/Dart/Firebase - Reduce unnecessary data loading

I tried searching my specific problem but I could not find any suitable solution.
I would like to thank everybody in advance for your help.
I am currently developing an iOS app.
The App represents a user profile which can be updated by the user.
Everything from the authentication, registration and the possibility to update your user data works fine with the help of Firebase. Now I would like to optimize some code.
So the application has 2 Screens, HomeScreen and EditScreen.
(Besides the Screens needed for registration and login).
To keep my question short:
How can I reduce the amount of data which is loaded from firebase?
Example:
1. User is on the HomeScreen, to build the view his image loads from Firebase Storage
2. He wants to edit his Image and therefore switches to the Editscreen, where his image will be loaded again
3. After changing his image, the new image will be uploaded to Firebase Storage and he can see his new image on the Editscreen
4. If he now switches back to the HomeScreen his new image will be loaded again from Firebase
Is there a good way to reduce the amount of loading?
Like caching the image between step 1 and 2?
As there is always a little delay in displaying his image.
Thanks!
Sadly I am not allowed to share any code.
You can check out the flutter_advanced_networkimage package. It will cache your photo upon load. For everything else, you should just move your profile object (or whatever it is that calls for the firebase user's information) above those routes and pass it down through your widget tree through arguments or state management.

How To Find The Rate At Which User Watches a Video Then Goes To Another Webpage (CTR)

Can someone tell me what's the best way to measure users that go to a home page and watch a video then go to another page in the same website vs a user that goes to the website and doesn't watch the video. I would like to provide a measurement showing users that watched the video then went somewhere else in the same website vs users that didn't watch the video. I am thinking that users that watch a video would go to another webpage at a higher rate then users that don't watch the video.
Sequence segments are your friend! They allow you to create a segment based on Users or Sessions performing actions on your site in a particular order.
Are you tracking video plays via event tracking?
If so, you could create a sequence segment based on sessions, where the sequence starts anywhere in the session, with step 1 based on the event, and step 2 immediately follows as a pageview of any page on the site excluding the home page (so as to not include possible home page refreshes).
This would give more granular data than (for example) a sequence segment including someone simply visiting the homepage and then navigating to another page, without actually having watched any of the video.
Couple of good articles on Sequence Segments that are worth the read:
https://www.bounteous.com/insights/2016/04/04/sequence-segments-more-accurate-reporting/
https://online-metrics.com/how-to-leverage-sequence-based-segments-in-google-analytics/

XAMARIN FORM : how to send message to specific number of watsapp

i have page in which i have image of watsapp icon. What i want is when i tap on that image it go to watsapp to specific number which will be our company number, so client can text us or send any image or file through watsapp
The easiest way would be through the custom URL scheme as described here: https://faq.whatsapp.com/en/iphone/23559013
Which basically tells you to open a URI like this: whatsapp://send?text=Hello%2C%20World!. You can simply open it by calling to the Device.OpenUri method of Xamarin.Forms. This should work cross-platform for iOS and Android.
If you want to share a photo immediately this isn't possible as far as I know. It is possible to someone that is in your recent chats, by the sharing API, but to my knowledge you can't send it to a random number. At least not for iOS, it might be different for Android.

Resources