I understand that Quickblox javascript sdk uses jquery and nodejs modules. So does it work with nativescript?
In NativeScript you can use node modules, which don't have platform dependecies.
Quickblox JavaScript sdk depends on jQuery, which uses the DOM. This means that it is not possible to use it. However Quickblox also has also iOS and Android sdk, which you can use. To do that you will have to wrap them in plugins. More information about it could be found in the {N} documentation.
Yes, now QuickBlox supports NativeScript (QuickBlox on-boarding advisor here).
Quoting from our blog post:
Start your integration today – go to QuickBlox Javascript main hub and connect JS SDK 2.8 and above. With this update you do not need to change anything in your code – the same Javascript API is supported under NativeScript, Browser and Node.js
https://github.com/QuickBlox/quickblox-javascript-sdk/releases/tag/2.8.0
Related
Can I run any node app under nativescript? From my point of view nativescript is a different runtime than node.js. But Node.js incorporates the Google Chrome V8 JavaScript engine as well. The only difference seems that some major functionality of nativescript app depends on core modules and plugins, which provides access to the underlying native mobile platforms.
For example if I run npm install matrix-js-sdk or npm install libp2p, then I can create and run a ns application with functionality of those packages in the same way as I would create a node application?
There is two native bridges that connect the "native" and the "JavaScript" world. One for Android and one for iOS, and these two runtimes are the core of the framework enabling many of the unique features in NativeScript. These two runtimes are using different JavaScript engines - V8 for the Android runtime and JavaScriptCore for the iOS runtime. This means you can use node based library in nativescript apps. But some libraries will not work for example crypto which uses
Secure random number generation that is not supported by v8.
For more info on the issue check this.
For more info on how nativescript works check this.
The scenario:
For both iOS and Android, capture a "call-end" (hangup) event.
Use the captured event to trigger an options window.
What would the differences be to do this using Ionic, React Native, NativeScript, and Flutter?
Implementing a feature for Ionic, ReactNative, and Flutter are more or less same. You must probably write a plugin where you will have to implement the feature in native languages (Objective C / Java) and interface them with JavaScript for Ionic & ReactNative / Dart for Flutter.
But it's quite different with NativeScript as it has a JavaScript runtime that has 100% access to all device apis. You may write a plugin if you are willing to reuse the code or just directly access any api within your project using just JavaScript. If you use TypeScript, life will be even more easier with the typings for all the native apis.
Here is a video that briefly discusses the differences between these platforms.
Purely informational question, not really a problem but:
I remember following the instructions and seeing that there were some steps to get the react-native-fbsdk working. These steps involved messing with my android build.gradle and adding the iOS SDK and the info.plist and whatnot. That aside, why doesn't Facebook utilize the javascript SDK? Is it not possible? If so, why is it not possible for Facebook to do this? If it is possible, why did they opt to utilize the both the android and iOS SDK?
One value prop of React Native is that it's not just an HTML 5 website embedded in a native wrapper. It literally uses the native APIs/components, and the same goes for SDKs. Technically, a pure JS SDK could be optimized for a browser experience, rely on window or document, and while the functionality might be able to be executed natively, the polyfills provided in RN might not be enough to cover the implementation. The way it makes API calls are probably different too. The views are different too (no DOM in RN), so that would apply for any SDK views (button?).
I just finished converting an iOS SDK to a React Native package and I feel that the implementation will be more inline with how the original iOS SDK was designed, since it's using those methods under the covers instead of pure JS. JS is just invoking the native methods, not taking over the methods.
Just my $0.02...
Does Apache Cordova have the abilty to use the mobile device's bluetooth. I'm currently making an app on Android and it uses bluetooth but I would also like to make the same app on Apache Cordova and I can't find any type of documentation regarding using Apache Cordova and bluetooth.
Apache Cordova can make all platform APIs from iOS or Android available within a so called WebView. A WebView is basically rendering HTML, CSS and executing JavaScript. Platform APIs can be made available through plugins in Apache Cordova and inside the WebView can be used via JavaScript. You can either write your own plugin or use an existing one.
Android allows for Bluetooth classic and Bluetooth low energy. To my best knowledge iOS only has support for Bluetooth low energy. There are several plugins available for bluetooth support inside an Apache Cordova app, just use the plugin search on the Apache Cordova Website: https://cordova.apache.org/plugins/
Ranked by github stars you might use the following plugin for bluetooth le:
https://github.com/randdusing/cordova-plugin-bluetoothle
Or the following for bluetooth classic:
https://github.com/don/BluetoothSerial
#AdamV,
You'll have to use a plugin. Most anything you want to do on Phonegap requires a plugin.
My list (duplicate of Phonegap offical, list on page)
http://codesnippets.altervista.org/documentation/phonegap/plugins/list_of_plugins.html
The Cordova version:
http://plugins.cordova.io/#/search?search=bluetooth
I have been investigating in this feature for a long time. All I can find is a pure iOS native code that checks for the key "UIApplicationLaunchOptionsLocationKey" from the LaunchOptions, if it is found it calls the LocationManager to start it and keep on listening to the location updates.
You can find this code in this github:
https://github.com/voyage11/GettingLocationWhenSuspended
I need the same concept, but with a way to integrate it in Worklight, through cordova plugin or something. As I'm already creating the geofencing triggers using the hybrid Worklight APIs, I need to keep the geofencing alive even when the app is suspended/terminated and also if the phone is restarted.
Please I need you support urgently. Thanks
Worklight provides the ability to create Cordova plug-ins.
You could implementing your own native code then, mimicking that from the Xcode project you've found on GitHub.
Read more here: Adding native functionality to hybrid applications