How to get IMEI number in Blackberry 10 device using webworks? - blackberry-webworks

I am working on Blackberry 10 App using webworks and I want to get the device IMEI number using webworks. I did not find any solution to get IMEI number on internet.

Check out the Identity API - https://developer.blackberry.com/html5/apis/blackberry.identity.html
It will return the IMEI and the UUID.

In javascript include this code
function functionName()
{
var transportList = blackberry.identity;
IMEI_No = transportList.IMEI;
}
and in config file include
<feature id="blackberry.identity" />
This will return the Imei number.

Related

Flutter : How to Allow any device to create a single account only

i am working in flutter app,
I want each user to create only one account through his device
That is, banning the device from creating other accounts for two days
After two days, the user can create another account only, and so on,
in my case : save device id or token and date Time in firebase and before create account app check if this device was registered or not if registered check time , this way is right ?
and how can i get device id or any constant number from device ?
thanks
I'm sorry, I think I may not have fully grasped your question, here's my guess about what you are asking based on the agglomeration of English words you've put:
You are using Flutter to develop the front-end of an application while using Firebase for the back-end. You want to make sure that each device could only create one account every 48 hours. Please correct me if my understanding is wrong.
There's never a unique solution to those kind of questions, and I think your approach (timestamp + some ID that tells devices apart) is a decent one.
To get the device ID, it looks like you can use the device_info_plus plugin according to here: How to get unique device id in flutter?
You need to find and store unique device ID in the database.
You can find unique device using this plugin
dependencies:
device_info_plus: ^3.2.3
Create a method:
Future<String?> _getId() async {
var deviceInfo = DeviceInfoPlugin();
if (Platform.isIOS) { // import 'dart:io'
var iosDeviceInfo = await deviceInfo.iosInfo;
return iosDeviceInfo.identifierForVendor; // unique ID on iOS
} else if(Platform.isAndroid) {
var androidDeviceInfo = await deviceInfo.androidInfo;
return androidDeviceInfo.androidId; // unique ID on Android
}
}

Flutter Web UUID Unique Identifier

How can I get UUID in Flutter Web.
I need some unique identifier in order to keep record of devices useb by customer,my testing device,develeper device.
In android, I'm using device_info_plugin.
How can I get Unique identifier in Web?
Thanks in Advance
You can use platform_device_id to get the browser details.
For browser info, you can use it as
import 'package:platform_device_id/platform_device_id.dart';
String? deviceId = await PlatformDeviceId.getDeviceId;
print($deviceId);
OR
hare is the Answer to the approach to set a custom uuid for flutter web

How do we find the list of VOIP URLschemes registered in the device?

I DO NOT want to use the following:
if let url = URL( string: "tel://4151231234" )
{
UIApplication.shared.open( url, options: [:] )
}
Instead, I would like to have a list of supported URLschemes in the device that allows making phone calls. Something that would result in a list a bit like the following:
"tel://", "whatsapp://", "facetime://", "Hangout://", etc.
The problem using the "tel://" URL scheme is that iOS returns
iPhone Calls Not Available" on all devices that are not paired
with an iPhone even though they have VOIP apps that supports phone calls.
I do not want to become a VOIP app myself (using CallKit).
But I do not mind using using CallKit IF I don't implement
the entire API to become a phone app.
The Contact App has the behavior that I am looking for:
- When Selecting a contact (in the Apple's contact app),
Tap on "Call" at the top
- A pop up list of applications supporting phone calls is listed
including 'Call', "Facetime" and "Hangouts" (in my iPad).
I would like to have the list that allows the Contact app to know which apps (and also which URLschemes) can be used to make phone calls.
I bet it is simple... I just don't know ;( Help me please :<
I DO NOT want to use the following:
if let url = URL( string: "tel://4151231234" )
{ UIApplication.shared.open( url, options: [:] )
}
What would be the code to create a list of apps/URLscheme that support making phone calls?

using userAgent String How to find request comes from only mobile devices?

In case of Android phone I checked a condition using.
if (userAgent.contains("Mobile"))
but how to check for windows phone or i-phone? not for tablet.
In case of windown phone Will i check many conditions for browser like uc-browser or opera mini.
please confirm me Does userAgent contain common string? using this we recognize request comes from mobile?
You can use the following code to detect Mobile in iOS devices :
if (navigator.userAgent.match(/(iPhone)/))
return true;
And you can detect mobile device for android OS as described by Google in the following link:
https://googlewebmastercentral.blogspot.com.au/2011/03/mo-better-to-also-detect-mobile-user.html
And for Windows Phone use the following condition:
if(navigator.userAgent.match(/Windows Phone/i) ||
navigator.userAgent.match(/iemobile/i) ||
navigator.userAgent.match(/WPDesktop/i)){
return true;
}

Blackberry Facebook prob: Could not select proper Transport decriptor

I am using Blackberry Facebook SDK (FacebookBlackBerrySDK-v0.8.25.jar) for facebook integration for my app. I am using the following code.
ApplicationSettings as = new ApplicationSettings(NEXT_URL, APPLICATION_ID, APPLICATION_SECRET, PERMISSIONS);
Facebook fb = Facebook.getInstance(as);
User user = fb.getCurrentUser();
I have tested the app in simulator of OS 5.0 and device and simulator of OS 6.0. it is working fine. But when I am testing the same in a device of OS 5.0, it is giving "Could not select proper Transport descriptor". What may be the problem behind it? Is it related to the device? How to solve the problem?
Download the SDK source code and change the ConnectionFactory parameters in com.blackberry.util.ui.BrowserScreen.