3 Answers, 1 is accepted
0
Hello Kavya,
I was unable to reproduce the issue that you are experiencing. That being said, here are some of the possible reasons for this behavior:
When you are testing plugins I would suggest deploying your app on an actual device.
I hope this helps. Please let me know if you require any further assistance.
Regards,
Garo
Telerik
I was unable to reproduce the issue that you are experiencing. That being said, here are some of the possible reasons for this behavior:
- The plugin is not included correctly to your app. If this is the case, please verify that you followed these steps to include the BLE plugin to your app.
- You are testing the plugin in the AppBuilder Simulator. Have in mind that most of the verified plugins cannot be tested in the simulator. List of plugins supported by the simulator you could find here.
- You are testing the plugin in the Telerik Platform Companion app. Have in mind that few of the verified plugins cannot be tested in the simulator. List of plugins supported by the Companion app you could find here.
- A BLE method is called before the Cordova onDeviceReady event. You could access your plugin only after this event has fired.
When you are testing plugins I would suggest deploying your app on an actual device.
I hope this helps. Please let me know if you require any further assistance.
Regards,
Garo
Telerik
Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.
0
Thomas
Top achievements
Rank 1
answered on 29 Mar 2017, 03:54 PM
We are seeing the same problem with error: "ble is not defined" and have done everything that you suggested.
Still no work :(
If you verify the plugin why does it not work and make errors?
What is the solution?
Thomas
0
Hello Thomas,
Thank you for reporting this to us.
I made a small sample in order to check the behavior of the ble javascript object in a hybrid application and everything worked on my side. For the sake of test I did the following:
Regards,
Kaloyan
Telerik by Progress
Thank you for reporting this to us.
I made a small sample in order to check the behavior of the ble javascript object in a hybrid application and everything worked on my side. For the sake of test I did the following:
- I created a new hybrid application
- In the deviceready event, I added the following code:
if
(ble ==
null
) {
alert(
'BLE is not defined!'
);
}
else
{
alert(
'BLE is defined'
);
};
- Next, I built the app as an application package and deployed in on actual device (in my case, this was an iPad).
- Upon starting the app on the device, I received an alert, stating "BLE is defined". This normally means that the ble object is ready and can be used in your javascript code.
The above said, can you please share some more information about the faulty behavior you are experiencing?
Regards,
Kaloyan
Telerik by Progress
Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.