Set max time for capturevideo - Codename One - video-capture

How would I go about setting the maximum time a video can be recorded in codename one using capturevideo?

This functionality isn't supported by the capture API at this time. You can use native interfaces to implement it per platform but that might take some work.

Related

Using third-party API to constantly(dynamically) refreshing the data List in Flutter framework

I'm trying to make a simple app using Flutter, cryptocurrency price tracker. Using this API to retrieve a data. That how it looks:
The problem is, it only retrieves the latest data and do not updates as the price changes every time. It will change only after restarting an app. I was thinking to add a floating refresh button but i seems an old school. SO my aim is to let it update the price by itself,in real time(LIVE) without USER doing something, every time there is a change in price. My question is, what technology is behind this ? How could I implement this ? What should I Google in order to find the required knowledge ? Who could give me the right direction to think and learn. I don't really know the special terminology for this concepts, tried my best to explain the question. Thnx!
How could I implement this ?
Following are the steps that you need to follow.
Create a stateful widget with a Periodic Timer object. setup the timer value, say 10 seconds.
Now you will get a callback for every 10 seconds. So, from that callback method, simply call the API end point to fetch the latest data.
Use setState method to show the latest data on the UI.
Thats all, now your app will refresh the data by its own for every 10 seconds without any user interaction.
You can use web sockets.
https://flutter.dev/docs/cookbook/networking/web-sockets
This will let you push updates to the client without polling in real time.

How to set a spending limit for firestore and react native app

I use the firestore blazeplan for a react native application.
I would like to set the spending limit for firestore. I have the owner role and I followed the firestore documentation:
https://firebase.google.com/docs/firestore/quotas#manage_spending
What is not mentioned in the firestore documentation is that setting spending limits is only available in a standard app engine environment.
https://cloud.google.com/appengine/docs/standard/java11/console/#setting_a_spending_limit
When I go to the app engine environment I have to choose a language. Depending on the language the standard environment is available. So my questions are:
Does it matter which language I choose here to enable the standard environment for my app engine? Despite the fact that I don't use that language for my react native app.
Will setting a random language and standard environment enable the option to set a limit to firestore spending for my react native App? Will the monitoring of firestore spending happen correctly? The other option is to select 'Other' but then the standard environment and presumably setting a spending limit is not available.
It doesn't matter which language you choose as pretty much all of the options on there are supported on Standard as mentioned here. The place where you define if you are using App Engine Standard or Flex is on the app.yaml file.
This will most likely enable the option to set the spending limit, I say "most likely" because there was a recent issue in which some users were not able to see the option. If this happens to you, I would suggest contacting Firebase support directly for them to check you console.
As for if the spending will be tracked correctly, most of the times the real time tracking it is done by an estimation. This means that no matter what, you are going to have a bit of a difference between the reported expenses and the billing at the end of the month. This more often than not end up being in benefit of the user.
Either way, I would suggest you to consider putting some budget alerts on your application in you are worried about your spending and this is available regardless of App Engine.
Hope you find this useful!

How to create real time tracking apps like Uber using react native?

I am working with real time tracking application using react-native.
And want the accuracy Uber and Swiggy and other tracking application do.
I am using react-native-geolocation-service, but not getting accuracy like Uber.
I just want to know how Uber track realtime? Does they request to server every single second?
Because there position is moving continuously, which is not possible in my app. I am saving coordinates after every 15 seconds.
Please suggest what can I use for making accurate path?
And what does Uber and other tacking apps used for tracking? And how they get realtime data for every single second?
For getting real time location you can use paid services like https://www.navixy.com/. I have used this service year ago and they are providin lot of functionalities track Android device with their API's.
Try Firebase Realtime database or cloud firestore. It works like realtime data update.
Store lat long on firestore/database whenever there is change in position and within a second you will be able to get those data on other end.
It is having nice performance when it comes to real time data update. I have used it with one of the native application before a year.
For react native, you can use Geolocation api which is having watchposition method. It will be invoked whenever there is location change.

Securely set date that user can't manipulate react-native

Building a simple application which restricts usage based on the date. For example, you can only view a page 3 times per day.
However, if I use the device time, users can change their time and then view these pages again.
Is there another best practice method of doing so? Trying to avoid a call to the server. Using react-native. Thanks
Best practice is only use server time.
you can use following lib
https://github.com/artem-russkikh/react-native-clock-sync
This is kinda tricky without hitting the server.
into
Let's assume that the first time they open your app the user date is correct. (I really don't know any other way checking that in an offline way)
That moment we need to save the current timestamp to the localstorage (called AsyncStorafe in RN).
solution
The only way you can really be sure that the timestamp is correct is keep a task that counts every seconds/minute/hours, whatever is logical in your situation.
issue
Doing this in react native won't get you that far, but we are able to make a Java background service for example that we start as soon as the app closes. Here you should keep up with the time and save this when the app launches to a place where it's also accessible from react native (not sure if AsyncStorage is).
Info
Here you can find some information about bavkground tasks in RN: https://hackernoon.com/easy-os-background-tasks-in-react-native-bc4476c48b8a?source=linkShare-cdf0b7d5ccb4-1538965801
The most secure amd easy way of time cheat prevention is by hitting the server vut if that's not a possibility that this may be a interesting way to still check it. Good luck!

Time limited Shareware

I'm thinking about making a time limited full version of my App, so users can try it for example 7 days.
Is there a recommended Obj-C library?
First of all do not store your data inside the app. Otherwise it would be simple to delete the App from the filesystem and download it again restarting the countdown. Store it in User preferences or Application Support instead. You could use a plist for this. You could also use a hidden file if you like. Just don't make it too complicated or too invasive. Your app can be cracked no matter what security measures you use in the end. Just be fair enough to the end user that could be a prospective customer.
Here is a very nice link on the topic of implementing a time-limited trial in Cocoa:
http://lipidity.com/apple/shareware-licensing-techniques/
Without possibility to protect your data from manipulation/deletion it is not possible to do.
How do yo check, if it is first start of your application, if all your data is wiped out.
Some alternative is "hardcoded" id token and connection to the rest of world (at least for first start, to grab any kind signed data key)
Maybe you could use a server where store UUID's and first time they launched the App. Then, Each time they open your application, it asks your server if they can use it or not. It's harder than store dates on device but if you do that, users will access your application simply changing the date of the device on Settings.