Hello Junwei, >> But I think you must reference cordova.js file into your index.html then cordova.require() would be triggered. My project is here in zip file :-- https://github.com/dinguluer/UiMagician/tree/master/testing_folder
But if you see index.html file in this location \Bluetooth_comm\www\index.html I have added reference to cordova.js file :-- <script src="cordova.js"></script> Still it is not triggring Please suggest. Regards, Dinesh On Thu, Dec 10, 2015 at 12:44 PM, Lin, Wanming <[email protected]> wrote: > Hi, Dinesh > > > > I am not familiar with these examples. > > But I think you must reference cordova.js file into your index.html then > cordova.require() would be triggered. > > > > Thanks, > > Wanming > > > > *From:* Dinesh Guleria [mailto:[email protected]] > *Sent:* Thursday, December 10, 2015 2:04 PM > *To:* Lin, Wanming > *Cc:* Fu, Junwei; [email protected]; Zhang, Belem > > *Subject:* Re: [Crosswalk-help] bluetooth plugin -- cordova -- HTC dmobile > > > > Hi Wanming, > > > > If you see author have given some examples working with this plugin. > > https://github.com/bcsphere/apps > > > > In this example author is including following three javascript files :-- > > > https://github.com/bcsphere/apps/blob/master/cc.microduino/btmodule/index.html > > <script type="text/javascript" src=" > http://www.gatt.io/framework/org.underscorejs.underscore/underscore.js > "></script> > > <script type="text/javascript" src=" > http://www.gatt.io/framework/org.bcsphere.bluetooth/bluetoothapi.js > "></script> > > <script type="text/javascript" src=" > http://www.gatt.io/framework/org.bcsphere/bc.js"></script> > > > > And in this javascript file related to above example :-- > > > https://github.com/bcsphere/apps/blob/master/cc.microduino/btmodule/js/index.js > > > > Author is calling cordova.require for plugin :-- > > onDeviceReady : function(){ > > var BC = window.BC = > cordova.require("org.bcsphere.bcjs"); > > } > > > > I have one question that if someone have included the plugin using > following command, in their project :-- > > cordova plugin add https://github.com/bcsphere/bluetooth.git > > Then is it necessary to include javascript files in index.html or call to > cordova.require() is more than enough to use plugin functionality ? > > > > Please suggest. > > > > Regards, > > Dinesh > > > > On Thu, Dec 10, 2015 at 10:16 AM, Dinesh Guleria <[email protected]> > wrote: > > Hi Wanming/Junwei, > > > > I am resending my messgae which was undelivered before. > > > > Thanks for your reply. I have been using crosswalk for android for a long > time now for UiMagician (open source project) generated apps. > > https://sites.google.com/site/uimagician/ > > > > But now i have to use bluetooth+crosswalk both together. But plugin is not > responding at all. > > > > I am using intel xdk to compile project on intel cloud server. Please see > the attached project. > > You can download the zip project from here :-- > > https://github.com/dinguluer/UiMagician/tree/master/testing_folder > > > > >> we didn’t use this Bluetooth plugin befor > > Can you suggest any other bluetooth plugin which you may have used before > successfully. > > > > >> Does this a Crosswalk plugin issue? Have you try without Crosswalk? > > No i have not tried without crosswalk. > > > > Regards, > > Dinesh > > > > On Thu, Dec 10, 2015 at 9:55 AM, Dinesh Guleria <[email protected]> > wrote: > > Hello Wanming, > > > > Attachment is rejected by your @intel.com mail ID. > > > > You can download the zip project from here :-- > > https://github.com/dinguluer/UiMagician/tree/master/testing_folder > > > > Regards, > > Dinesh > > > > On Thu, Dec 10, 2015 at 9:38 AM, Dinesh Guleria <[email protected]> > wrote: > > Hi Wanming/Junwei, > > > > Thanks for your reply. I have been using crosswalk for android for a long > time now for UiMagician (open source project) generated apps. > > https://sites.google.com/site/uimagician/ > > > > But now i have to use bluetooth+crosswalk both together. But plugin is not > responding at all. > > > > I am using intel xdk to compile project on intel cloud server. Please see > the attached project. > > > > > > >> we didn’t use this Bluetooth plugin befor > > Can you suggest any other bluetooth plugin which you may have used before > successfully. > > > > >> Does this a Crosswalk plugin issue? Have you try without Crosswalk? > > No i have not tried without crosswalk. > > > > Regards, > > Dinesh > > > > On Thu, Dec 10, 2015 at 7:38 AM, Lin, Wanming <[email protected]> > wrote: > > Hi, Dinesh > > > > I have attached the attached html & js files. Please suggest how to use > this plugin ?? > > > > Sorry, I didn’t see the attachment you shared, and we didn’t use this > Bluetooth plugin before. > > Does this a Crosswalk plugin issue? Have you try without Crosswalk? > > If it is a Crosswalk issue, please share your simple code for us, I think > we can help. J > > > > Thanks, > > Wanming > > > > *From:* Fu, Junwei > *Sent:* Thursday, December 10, 2015 8:40 AM > *To:* Dinesh Guleria; [email protected] > *Cc:* Lin, Wanming; Zhang, Belem > *Subject:* RE: [Crosswalk-help] bluetooth plugin -- cordova -- HTC dmobile > > > > @Wanming, could you please help to verify it, file a bug if it can’t work > with crosswalk plugin. > > > > Thanks, > > Junwei. > > *From:* Crosswalk-help [ > mailto:[email protected] > <[email protected]>] *On Behalf Of *Dinesh > Guleria > *Sent:* Thursday, December 10, 2015 12:25 AM > *To:* [email protected] > *Subject:* Re: [Crosswalk-help] bluetooth plugin -- cordova -- HTC dmobile > > > > Can someone please suggest .. right Bluetooth plugin to use .?? > > Regards, > Dinesh > > On Dec 9, 2015 3:06 PM, "Dinesh Guleria" <[email protected]> wrote: > > Also at the end of this link says to use following library for HTC desire > :-- > > com.htc.android.bluetooth.le.ja > > http://www.bcsphere.org/portal.php?mod=topic&topicid=3 > > > > My Android version is 4.3 i.e api-19. > > > > So do i have to add this file in my project ? > > > > Please suggest. > > > > Regards, > > Dinesh > > > > On Wed, Dec 9, 2015 at 2:56 PM, Dinesh Guleria <[email protected]> > wrote: > > I modified my functions onDeviceReady() & scanForDevices() , but following > alert messages does not occurs :--- > > alert('test'); in handler onDeviceReady() > > alert('test_1'); in following onclick event scanForDevices(); > > > > This means plugin is not detected by my cordova crosswalk app ? > > > > ---------------------- code ----- > > > > > > function onDeviceReady() { > > alert("Device ready ..!!!"); > > > > if (typeof BC != "undefined") { > > alert("GOT THERE"); > > } > > else > > { > > alert('BC not defined'); > > } > > > > BC = window.BC = cordova.require("org.bcsphere.bcjs"); > > alert('test'); > > } > > > > function scanForDevices() { > > alert("Scanning ..!!!"); > > BC.Bluetooth.StartScan(); > > alert('test_1'); > > } > > > > ----------------------------------- > > > > On Wed, Dec 9, 2015 at 2:43 PM, Dinesh Guleria <[email protected]> > wrote: > > This plugin, i am using :--- > > https://github.com/bcsphere/bluetooth > > > > Have someone used it before ? > > > > Regards, > > Dinesh > > > > On Wed, Dec 9, 2015 at 2:36 PM, Dinesh Guleria <[email protected]> > wrote: > > Hi, > > > > > > Mobile model :-- > > HTC Desire 516 > > > > I am trying to use bluetooth plugin inside my cordova crosswalk app. > > Bluetooth apps :-- > > https://github.com/bcsphere/apps > > > > I am trying to search for available bluetooth devices, but nothing > happens, if i use this function. :-- > > BC.Bluetooth.StartScan() > > > > I have attached the attached html & js files. Please suggest how to use > this plugin ?? > > > > > > Please suggest how to use this plugin ? > > > > Regards, > > Dinesh > > > > > > > > > > > > > > >
_______________________________________________ Crosswalk-help mailing list [email protected] https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-help
