- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have run an Eddystone Scan in my mobile evo viewer, its works fine. But i try convert it to an app using INTEL XDK , evothings scan not supported. I have installed the separate plugins (cordova-plugin-eddystone , cordova-plugin-ble which is inbuilt in eddystone plugin ) and also tried inbuild js method also. But scan not working.
I have checked evothings object is defined or not,
if (evothings) { console.log('evothings is defined') } else { console.log('evothings not defined') } if (evothings.ble) { console.log('evothings.ble is defined') } else { console.log('evothings.ble not defined') } if (evothings.eddystone) { console.log('evothings.eddystone is defined') } else { console.log('evothings.eddystone not defined') }
In my console returns 'evothings.ble not defined' , "Uncaught TypeError: Cannot read property 'stopScan' of undefined " that line number is 853 on eddystone.dist.js file.
evothings.ble.stopScan(); evothings.ble.startScan(serviceUUIDs, onDeviceFound, onError);
In evothings.ble.startScan and evothings.ble.stopScan is not working. Kindly explain how to proceed it further.
- Tags:
- HTML5
- Intel® XDK
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Where are you checking for the presence of these plugin APIs? They will not show up in the Simulate tab and they will not show up in App Preview. They will only work on Android from the Debug tab or within a built app.
Please read this doc page > https://software.intel.com/en-us/xdk/docs/intel-xdk-debug-and-test-overview <
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have built apk and tested in my mobile device (Sumsung S5 and Smartphone A8 model)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Abdul -- make a new project based on the "hello cordova" sample app and add those two plugins to the app and build an APK. Then run that APK on your two devices. Scroll to the bottom of the app's screen and scroll within the "text area" below the "license terms and conditions" link. Then scroll within that text box until you find a list of plugins that are part of the app, similar to what you see in the screenshot below. If you see the plugins you added to this sample they will show up in the list (they are not part of the list I'm showing below because this is a build of the standard sample).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Paul,
I have built sample app "hello cordova" and also install those two plugin. When i run apk in my mobile, Evothings Cordova BLE ( https://github.com/evothings/cordova-ble ) not diplayed in plugin list.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, I am one of the maintainers of the plugin in question (https://github.com/evothings/cordova-ble).
Are there any special requirements for plugins for Intel XDK? (Sorry, I have not used Intel XDK myself). Any hints towards make the plugin working would be appreciated.
Best regards, Mikael Kindborg
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mikael -- the only restriction we have, in our current build system, is we do not execute plugin gradle scripts. We hope to remove that restriction in a future release of the build system. However, I don't see any gradle scripts in your plugin that would cause a problem. Other than that restriction, the Intel XDK builds standard Cordova apps.
Abdul -- perhaps you are using the wrong technique or an older version of the XDK? This plugin requires Cordova CLI > 6.0, which means you'll have to use 3491 or later to install it into your project (because 3400 and older uses Cordova CLI 5.x to "install" the plugins into your project). Likewise, you need to insure you're building with CLI 6.2.0 in the Build Settings. I just did the test I outlined in a previous post and I can see that the plugin is present in my app. Likewise, and "evothings" object shows up in my JavaScript namespace, which I believe is where this plugin's API is accessed (at least according to the example). I see the README says you should add some JS lib files to access this at a higher level, I haven't tried that, but I'm pretty confident that will work, as well. BTW -- you do not add those JS lib files as plugins, those are just simple JavaScript library files that you add using a <script> tag in your index.hmtl file. I recommend you add them AFTER the cordova.js script tag, not before. See the comments at the bottom of the "hello cordova" index.html file for the recommended order of JS scripts in your app. Those add-on BLE JS libs are "device-dependent" JS libraries, not "device-independent" JS libraries.
Some pictures might help:
In the Simulate tab:
from the Simulate debug console:
From a built app on a real device:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Paul,
Thank you for your response, now ble plugin works fine.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm also interested in this same Evothings BLE plugin.
That in mind, I've been able to successfully add this plugin to the project and get it to show up in Hello, Cordova app as Paul illustrated above, but only in simulation. If I run the app via the Test & App Preview, this specific plugin does not show up.
Is this expected behavior for 3rd-party plugins?
Thanks!
-ssbc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
SSBC -- please see these doc pages regarding App Preview and the Test tab:
- https://software.intel.com/en-us/xdk/docs/intel-xdk-app-preview-overview
- https://software.intel.com/en-us/xdk/docs/using-the-test-tab
Especially the highlighted paragraph under the "Purpose" section.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for clarifying, Paul!
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page