How to get a unique identifier for a device running a flutter web app? - flutter

I would like to get a unique identifier like a mac address for a desktop machine running my flutter web app.
Something similar to device Id for ioS and Android. I have tried all the available plugins but none of them return a value and I was wondering if there is such feature or is this still missing from Flutter Web

I don't believe this is possible in Flutter Web as it is compiled to JavaScript and it is not possible to get machine identifiable information such as a MAC address as that would be a security and privacy risk to obtain that information from the browser. You could try creating your own identifier using uuid or something similar depending on your exact use case. However; such a solution would not be permanent and users would get a new identifier when their browser cache is cleared.

Related

How to do Remote Updates On Flutter

I have a flutter chat app. Companies like Whatsapp & Facebook update their app without forcing users to uninstall or manually uploading the APK again to google play. Is this possible with futter i tried using firebase remote config but it didn't work as i expected ( Changing UI on the go ). Any answer will be appreciated.
WhatsApp and Facebook use React Native with CodePush (if I'm not wrong).
You can't update an app without forcing a user somehow to update the app from a store with Flutter as it compiles to binary and React Native – not
There are multiple things you can do and it is based on what you want to achieve. [From your question your goal is not clear.]
Change Something based on configuration.
If you have configurations defined then you can use Firebase remote config to pass on value to devices and devices should behave according to value that you have set on Firebase Remote config.
Limitation of this approach:
In this approach, don't expect your newly updated code will into existing app. Above approach works, if code is already there in the compiled binary and you just want to switch path.
Binary version update:
If you want to force new app version download then it would require a different approach,
Android: Yes it is possible.
iOS: In-App update is not possible. You can show prompt to user by saying that new version is available and redirect user to new version on Store.
If user has enabled auto-download in iPhone settings then there are chances that app version updated to new version when user come to app.
For implementation look at here: Binary version update
Flutter now has unofficial support for code push using Chimera Flutter Code Push.
Here is a full tutorial

Is it possible to see if PWA was installed from the APP Store vs. Mobile Browsing?

At the moment my Mobile experience is m-web and my app is PWA (app stores) ... but I want to join the two and just have PWA.
But I need to differentiate between the App Store download and the Mobile download - at least for the first few usages. (i.e. if someone downloads from the app store, I want to "hide" certain content until they have purchased, however if they access direct from mobile, they can have the content directly.)
Is this possible with PWA - to see if the version they have was downloaded from the APP store vs downloaded through mobile browsing?
You do not need to submit your PWA to the app store. Users can just access it directly.
You can wrap your PWA in a hybrid shell, something like the soon to be deprecated Cordova for example. If you do this, I believe there would be some sort of flag to check if the shell is present.
Apple is known for rejecting and removing hybrid apps, just FYI. This one reason why so many brands are abandoning native apps.
It feels like you are doing something of #3.
I get why you want users to pay through your web interface, the 30% tax is repressive. But doing this will most likely get you tossed from the app store. This is the foundation of BaseCamp's complaints.
https://love2dev.com/apple-appstore-pwa/
if (window.matchMedia('(display-mode: standalone)').matches) {
console.log("This is running as standalone.");
}
Sure you need to edit standalone if you use some other display property

Ionic BLE Connection Issues

I'm using the Ionic Native BLE plugin to scan and connect to bluetooth devices. I'm able to get the plugin to list available devices, but I'm unable to get it to show already paired devices. This is the plugin I'm using:
https://ionicframework.com/docs/native/ble/
After searching through the documentation and finding examples, I've come to the conclusion that using this plugin to list already paired devices is just not possible. Is this the correct conclusion?
If so, do you know of any other plugins I could use to facilitate the looking up of paired bluetooth devices? I'm using Ionic 3.
We have been working on a simple BLE button and had the same issues. The only way we found out how to do this was to disconnect the button on app close (which the latest BLE version seems to do). We save the device ID (localStorage) when a user connects a device and then when the app starts up again the user has to wake up the device and the app starts scanning on startup. If the saved device id is the the id as your locally saved id it connects automatically.
If you, or anyone, wants to try other plugin, you can also try this: https://ionicframework.com/docs/v3/native/bluetoothle/
I first started using the same plugin that you use. After I encountered some difficult issues due to the strange operations of some bluetooth devices, I tried the second plugin and I found it to be better. That was three years ago and I can't say how the other plugin has improved in the present. One thing I like with the bluetoothle plugin is that it has many methods available and that gives more control to the bluetooth operations. You can look at these methods in its repo:
https://github.com/randdusing/cordova-plugin-bluetoothle

Google Chrome App Chrome Managemement Licence Serial Number in Kiosk Mode

Is there anyway to get a Chrome Management Licence device serial number or unique identifier within a Chrome Kiosk App?
I am asking this as we are trying to post unique content to each kiosk and using a uuid such as serial number is an obvious way to do this.
I realise that without the chrome management licence getting a serial number or uuid is not possible due to privacy but i am hoping there is a way with the chrome management licence.
Solution is here:
https://developer.chrome.com/extensions/enterprise_deviceAttributes
Only work on enrolled devices where the app is pushed from the cpanel
chrome.enterprise.deviceAttributes.getDirectoryDeviceId(function callback)

Calling other existing smart TV applications from another application for Samsung Smart TV SDK

I am using Samsung smart TV SDK for developing an app.
Is it possible to call an existing smart TV app from another app. It is possible in Android, is it also possible here? And if yes, how do you do it?
It's possible if you know the widgetID of the application that you want to call. widgetID is number formatted string which you will get when you register your application to certification team.
But if you want to call the application that is not yours and you don't know the widgetID of the application then it's not possible.
http://samsungdforum.com/Guide/ref00006/common_module_widget_object.html#ref00006-common-module-widget-object-runsearchwidget
you may get success in loading other smarttv app by using location.href if that app is hosted on some server, this can be achieved in test environment as i have done it my self, But here are some issues of doing it,
when you will send app for Samsung QA, they will straight way refuse the app, as its strictly against their policy to use server redirection,
more ever the biggest issue is with the key codes, so far as per my experience with smart tv app, i can say that Samsung have the different key codes then the other smart tv