Retrieve Blackberry OS in Blackberrywebworks using javascript - blackberry-webworks

How to retrieve Blackberry OS version in Blackberrywebworks using javascript?

Just use blackberry.system.softwareVersion and don't forget to add <feature id="blackberry.system" /> to your config.xml
You can find full docs here
https://developer.blackberry.com/html5/apis/blackberry.system.html#.softwareVersion

Related

How can i set my app is supported with all Android devices ? - Ionic-v3

yesterday I upload my ionic app on google play store but there showing 9751 Supported Android Device only what should I do for all device support for my app…any help, please.
I build the ionic app using this commend: ionic Cordova build android --prod --release
and I added this in the config.xml file
<platform name="android">
<preference name="android-minSdkVersion" value="16" />
<preference name="android-targetSdkVersion" value="26" />
</platform>
I have showing like this Supported Android Devices: 9751
Based on your settings and Android developers Distribution dashboard you are supporting 99.4% of android devices out there, You can bring down you min and target SDK supported to lower versions of android, but:
You will lose the higher end devices
It is not suggested, especially less than 14 as lots of design elements have changed and memory management libraries have changed.
If you change your target SDK in this level, after all the coding and building has finished you have to go and update your gradle libraries, which will be opening the door to lots of problems.
Bringing down your minimum sdk version, you will have run-time problems with older devices.
So my suggestion, keep it safe, don't change anything.

How to create Android app links using branch.io in Ionic 2/3 app?

I'm having a bit of difficulty understanding the implementation of some of the branch concepts for the Ionic platform Wrapper SDK .
I've generated short URLs using the SDK, but it seems to get redirected in the browser before the app is launched. Link -> Browser -> App handoff.
How do I avoid this redirection? I've enabled Android app link, added SHA 256 of certs and added all configs in config.xml as per SDK docs.
Is it possible to generate long links as using the "/a/ and the Branch Key" as in https://bnc.lt/a/key_live_kaFuWw8WvY7yn1d9yYiP8gokwqjV0Swt?foo=bar&baz=456&$fallback_url=https%3A%2F%2Fbranch.io%2F
Something like branchcordova://a/key_live_kaFuWw8WvY7yn1d9yYiP8gokwqjV0Swt?foo=bar&baz=456&$fallback_url=https%3A%2F%2Fbranch.io%2F
Looks like a configuration issue. Have you added your Link Domain on the config.xml file? You can find your Link Domain on the Link Settings page.
<!-- sample config.xml -->
<widget id="com.eneff.branch.cordovatestbed"
version="0.0.1" xmlns="http://www.w3.org/ns/widgets"
xmlns:cdv="http://cordova.apache.org/ns/1.0">
<!-- Branch -->
<plugin name="branch-cordova-sdk" spec="^2.5.0" />
<branch-config>
<branch-key value="<YOUR LIVE KEY>" />
<uri-scheme value="<YOUR URI SCHEME>" />
<link-domain value="<YOUR LINK DOMAIN>" />
<ios-team-release value="<YOUR TEAM ID>" />
</branch-config>
Long links can only be generated using your Link Domain.
Something like branchcordova://a/key_live_kaFuWw8WvY7yn1d9yYiP8gokwqjV0Swt?foo=bar&baz=456&$fallback_url=https%3A%2F%2Fbranch.io%2F is incorrect.
Someting like https://example.app.link/fzmLEhobLD?foo=bar&baz=456&$fallback_url=https%3A%2F%2Fbranch.io%2F is correct.
You should use https://link.example.com if you have a custom link domain configured.
More info on Long Links- https://docs.branch.io/pages/links/integrate/#long-links
If we use the Android app link (URI scheme), then the app would be open directly. But, it would be detected as a non-branch link and we might not get any analytics data or branch.io related features.
The redirection of short and long URLs seems to depend on the app which is opening the link. Some apps like Hangout app do the redirect thing.
If we are to open a branch link from inside our app, we could do the following to somehow skip the redirection.
const longLink = https://bnc.lt/a/key_live_kaFuWw8WvY7yn1d9yYiP8gokwqjV0Swt?foo=bar&baz=456;
window.open(longLink, '_system');

Ionic app not makes http requests

I developed an app with Ionic v1 and tested with "ionic serve" and "ionic run android" and works fine. It makes all $http requests to an external API (that allows CORS) and I recive the data well.
The probleme comes when I try to test the app in real mode. I added the app to Ionic view to test in Android mobile device and I see that the requests to the API are not performed (because I not see any data printed in tha app).
For what reasons can be? I need to perform extra configs in my API server? I need to perform some special configs to Ionic app?
PD: I installed cordova withelist plugin and added this lines to config.xml file:
<access origin="*" />
<allow-navigation href="*" />
<allow-intent href="*" />
You verify if Cordova CLI has generated these Android permissions entries in your AndroidManifest.xml?
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
I hope that helps.
Greetings.

Can't find plist in PhoneGap project

I am developing an Audio Application for iOS using PhoneGap and the audio stops when iPhone's screen is locked. I have read that you need to define in ".plist" file what processes should be run in background. However I am unable to find any plist file on my windows machine.
I am building PhoneGap for iOS remotely using latest version.
go to Resource folder on your phoneGap project .Resource ->your apps name-info.Plist file will be there.
on the config.xml file of phonegap project you can add:
<config-file target="config.xml" parent="/*">
<feature name="AllowBackgroundAudio">
<param name="ios-package" value="AllowBackgroundAudio" onload="true" />
<param name="onload" value="true" />
</feature>
</config-file>
Or you can try using the cordova-allow-background-audio plugin.

Phonegap App : External URL don't open in InApp Browser of IOS

External URLs don't open in the system's browser in my PhoneGap IOS application. I'm using PhoneGap Build 2.7.0.
Javascript:
window.open(myURL, '_blank', 'location=yes');
Config.xml
<plugins>
<plugin name="InAppBrowser" value="CDVInAppBrowser" />
</plugins>
<access origin="*" />
How to solve this? when i using the url "www.google.com" it works fine but when i used required url for my app it did not worked even that url works fine in browser.
Javascript:
myURL = encodeURI(myURL);
window.open(myURL, '_blank', 'location=yes');
Using of encodeURI method fix the above issue
Take reference from this link.
I have used this plugin for my IOS application development way back. It works like a charm.
Also, it is easy to integrate.
Hope it helps !