- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When I try to scan a QRCode with Android devices QR code screen automatically flips to horizontal, any help to keep the screen in portrait orientation and rotate only if I rotate the phone.
document.addEventListener("intel.xdk.device.barcode.scan", barcodeScanned, false);
try{
intel.xdk.device.scanBarcode();
}
catch(error){
alert(error.message);
}
- Tags:
- HTML5
- Intel® XDK
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you are using Cordova* 3.X build options (Crosswalk* for Android*, Android*, iOS*, etc.), you can set the orientation under the Projects panel > Select your project > Cordova* 3.X Hybrid Mobile App Settings - Build Settings. Under the Build Settings, you can set the Orientation for your desired mobile platform.
If you are using the Legacy Hybrid Mobile App Platform build options (Android*, iOS* Ad Hoc, etc.), you can set the orientation under the Build tab > Legacy Hybrid Mobile App Platforms Category- <desired_mobile_platform> - Step 2 Assets tab.
[iPad] Create a plugin (directory with one file) that only has a config xml that includes the following:
<config-file target="*-Info.plist" parent="UISupportedInterfaceOrientations~ipad" overwrite="true"> <string></string> </config-file> <config-file target="*-Info.plist" parent="UISupportedInterfaceOrientations~ipad" overwrite="true"> <array> <string>UIInterfaceOrientationPortrait</string> </array> </config-file>
Add the plugin on the build settings page.
Alternatively, you can use this plugin: https://github.com/yoik/cordova-yoik-screenorientation. You can import it as a third-party Cordova* plugin using the Cordova* registry notation:
- net.yoik.cordova.plugins.screenorientation (includes latest version at the time of the build)
- net.yoik.cordova.plugins.screenorientation@1.3.2 (specifies a version)
Or, you can reference it directly from the GitHub repo:
- github.com/yoik/cordova-yoik-screenorientation.git
- github.com/yoik/cordova-yoik-screenorientation.git#06b93e6
The second reference provides the git commit referenced here (we do not support pulling from the PhoneGap registry).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Alexander,
I am positive the Intel XDK plugin does not supports device orientation changes. I would like to prompt you to use the Cordova plugin but I see that you have already been advised to do so in previous posts.
Intel XDK plugins are no longer maintained. So you will benefit from switching over.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you provide me an example of Cordova Plugin Scan because I tested all the examples I found and doesn't work for me.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Hamilton. Is this with Cordova or Intel XDK Plugin?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I made this APP using Intel XDK and build with Cordova Android. In the past, it was only Android. In the last month I publish a new version (Cordova) with the same plugin (QR Code).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using Intel XDK Scan Plugin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ah, i forgot, the plugin is https://github.com/wildabeast/BarcodeScanner
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Alexander> This one I didn´t use/test yet.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here is the problem when I added third party plugin to my project I get this message and the build process is interrupted
- Building a Cordova 4.1.2 application.
- The application name is "Biipit"
- The package name is "com.alexanderfleites.biipit"
- Plugin "org.apache.cordova.device" (0.2.13) installed.
- Plugin "org.apache.cordova.dialogs" (0.2.11) installed.
- Plugin "com.phonegap.plugins.facebookconnect" (0.10.1) installed.
- Plugin "nl.x-services.plugins.socialsharing" (4.3.19-dev) installed.
- Plugin "com.intel.xdk.device" (1.0.7) installed.
- Plugin "org.apache.cordova.splashscreen" (0.3.5) installed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The second one, because hen you enter in the first one said that this plugin is deprecated and you need to use the other.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you remove the reference to the barcode plugin does the build succeed? Also, are you referencing it using the ID or the github repo address? I notice that it has been converted to the new Cordova CLI 5.x format (see the ID inside the plugin.xml file in the repo) and that might be causing some trouble. It does not appear to have any dependencies, so you should be able to retrieve it successfully from the git repo. Here's the git address you would use to do that:
https://github.com/phonegap/phonegap-plugin-barcodescanner.git
This will give you the latest version. To specify a specific version from the repo you need a "git ref tag" -- which this one has in spades. In that case, to specifically retrieve version 2.20 you would specify the plugin this way:
https://github.com/phonegap/phonegap-plugin-barcodescanner.git#2.20
To specify the current latest version, specifically, you would do this:
https://github.com/phonegap/phonegap-plugin-barcodescanner.git#v3.1.2
Note that the format of the git ref tag depends on the repo tags, it can be anything. See the "Tags" list under the "branch: master" pulldown in the upper left of the repo file list.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello
Someone have a QR example that run and I can download to add in a new proyect. I need read QR and barcode in IOS and Android app.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using https://github.com/wildabeast/BarcodeScanner.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page