Plugin de Cordova for Universal Windows with reminder of repeated successes
I am trying to add support for Windows universal platform for the plugin following (BluetoothSerial). This plugin reads the data sent by the bluetooth to Serial Port devices. As you can see from this code, I am very close to the goal, but looks like I'm not able to find a solution to my problem.
Let me give you a basic understanding of what made the plugin: initially, the application calls the connect method, so a writer and a reader are initialized, and the playback loop is started. If the application calls the subscribe method, this means waiting for the plugin to send back data every time the specified delimiter character is found in the incoming data.
At the moment the subscribeCallback is executed only the first time, but it seems it is deleted shortly after. Looking at the Android/iOS code, it was possible to set the property setKeepCallbackAsBool KeepCallback (or something similar) in the PluginResult object. Unfortunately I could not find something similar for Windows universal. The only bit of information I could find came from this article:
The API proxy exec Cordova comes success and error callbacks as the first and the second parameter. On other platforms, we can choose to call the recall successful several times, but on Windows, you can only call the once successful recall. We worked around this in passing the callback as an extra parameter function and using that as the success callback in cases where we knew that several calls is assumed (as in the case of event listeners).
So far, however, I wasn0 ' t able to implement this work around.
Do you have any suggestions?
kerrishotts, thank you for taking the time to look at this problem, I was able to make sense of the quote I posted in the first post.
I write this in the hope that it will be useful to someone else. By default Cordova cannot call the recall successful more than once. On other platforms (Android, iOS), it is possible to force Cordova parameter to true setKeepCallbackAsBool (or KeepCallback) property of the PluginResult object. When you develop a plugin for universal Windows (using javascript), there is no PluginResult object. The solution is to pass the callback as an additional parameter. Let me put a code to explain.
It is a piece of code without the workaround of the myPluginFolder/www/myPlugin.js file
Subscribe: function (success, failure, delimiter) {}
Cordova.exec (success, failure, "BluetoothSerial", "subscribe", [delimiter]);
}
And it's the related piece of the code of the myPluginFolder/src/windows/MyPlugin.js file
Subscribe: function (success, failure, args) {}
Delimiter = args [0];
subscribeCallback = success;
}
In this case the subscribeCallback will be executed only once. Now, let me put the code of the workaround:
It is a piece of code in the file myPluginFolder/www/myPlugin.js
Subscribe: function (success, failure, delimiter) {}
Cordova.exec (success, failure, "BluetoothSerial", "subscribe", [, delimiter]);
}
Note how I placed the recall of success also in the matrix arguments. And it's the related piece of the code of the myPluginFolder/src/windows/MyPlugin.js file
Subscribe: function (success, failure, args) {}
Delimiter = args [0];
subscribeCallback = args [1];
}
With this workaround, I can finally call the subscribeCallback as many times as I need.
Tags: PhoneGap
Similar Questions
-
Plugin de Cordova for iOS, binary embedded for custom frame
Hi all
I am trying to create a wrapper to Cordova iOS for a native of specific features.
The plugin uses a custom frame that must be added in the binary shipped (XCode - general) before building. For the normal plugin of Cordova, I can't open XCode project and add in the binaries shipped, but I don't know how in the MAF to the Oracle.
If the custom frame is not added in the binary incorporated, the application is able to build and run but accident after the launch.
Thank you
Kind regards
There are workaround is, open the project (after having built and deployed by MAF jdeveloper) / project/ViewController/deploy/ios_deploy_name/then in xCode, manually add the framework for binaries shipped.
I have not found any solution to Cordova plugin config to automatically add embedded binary files.
Thank you
-
Lync 2013 VDI Plugin does not work in Windows 8 with view Horizon 5.4
Hi all
I start this new thread as it appears by getting the Lync 2013 VDI Plugin works in Windows 8 is going to be different from that of Windows 7 SP1 and Windows 2008 R2. The original on Windows 7 and Lync thread is posted here: http://communities.vmware.com/thread/446960?tstart=0
Here's what I tested and I can determine:
PC/computer laptop/point of customer #1 endpoint (Client light 10Zig):
Windows 7 SP1 32-bit
No installed Office
Lync VDI 32-bit plugin
View of the horizon 5.4
PC/computer laptop/point of customer #2 endpoint (desktop PC):
64-bit Windows 8
2013 32-bit Office installed, but the Lync 2013 desktop client is NOT installed
Lync VDI 32-bit plugin
View of the horizon 5.4
VM:
64-bit Windows 8
Office 2013 32 bit installed
Horizon Feature Pack 2 is installed
Audio redirection works, but the web camera does not have to be picked up. Its a HD LifeCam Microsoft and is supported by Lync 2010/2013. I checked the VDI connects to the virtual computer and it seems the plugin Lync VDI successfully syncs. However, I'm never invited to re - enter my credentials of Lync as I do Windows 7/2008 R2. In addition, I don't see the 'two PC with the green check mark' in the lower right corner of Lync. Who should be present after a successful synchronization of Lync VDI. In fact, there no icons in the lower right corner at all.
After some further reading, I decided to download and install Skype through shop Windows. Also, it does not recognize my camera. In my opinion, the Feature Pack is perhaps the issue here, but I don't know how to dig one more away. TonyHuynh201110141, any ideas?
I had a co-worker for his Mac with the new client View 3 trial and Lync VDI works as expected. I tried again on my side and noticed that it takes exactly 5 minutes to make me a successful pairing. I remove the Lync VDI plugin, then reinstall to see if that makes a difference. At least I know that two important data points:
1 Lync VDI still works
2. the issue was on only my endpoint device.
I will update the thread once I know more.
-
Help raise the window with ExtendScript plugin options
I have a plugin that has an internal link 'options' that brings up an external window upstairs as the "reset". It does not appear in the property Name match. How can I bring to the top of this window with scripts?
Thank you
Those who are not directly accessible through ExtendScript. All the windows popup modal dialog box with "other options" for things not available natively by ExtendScript unfortunately.
-
Shortcut for the new window with several tabs
Is it possible to have a shortcut on the desktop to launch a new window with several tabs? For example - home page is set to "www.google.com", but the shortcut opens new window with tabs "www.cnn.com" and "www.youtube.com".
Then far,.../firefox.exe-nouveau-fenetre followed by the two URL in quotes will open two new windows. Entry - new-window "www.cnn.com" - new-tab 'www.youtube.com' will open two new windows if no instance of firefox is open, but if another window is already open, youtube will add a tab to the already open window, rather than the new window with cnn.com
In reply to myself... withdrawal-order new window (and-new-tab), now it works.
Looks like I'm too complicated it.
shortened final was "C:\Program Files (x 86) \Mozilla ' 'url1'"url2.
-
How can I download the Linux of FireFox plugins for IE Windows versions?
I just need the plug of .NET Framework on a Linux workstation offline. I don't have a Windows box that can access the Internet. Why isn't an option to download a version of Linux from the FF plugin?
There is no such thing as this plugin for Linux. MS fact that this software for the Windows platform and not Linux (there could be for Mac in some cases).
-
I get the ssd drive, I need to buy recovery DVDs for y500 to install new windows with recovery
I get the ssd drive, I need to buy recovery DVDs for y500 to install new windows with recovery
How much it costs
I need to perform a recovery for ssd only
I need direct link for that
Nice day.
He was never a way I know of to download games Windows OEM Lenovo recovery disks. That the process is managed by Service, you'll need to contact them directly (see info below). If I understand correctly, they will confirm your OS by checking the serial number of your machine.
I hope this helps.
Kind regards.
-
The Windows XP operating system disk
I found a cd of OS Windows XP in the House who said for distribution only with a new hp or compaq pc, is it legal to install this on my pc tailor-made with a new product key?I found a cd of OS Windows XP in the House who said for distribution only with a new hp or compaq pc, is it legal to install this on my pc tailor-made with a new product key?
No, it is an OEM drive and only good for the computer, it came with.
If you have a valid license of retail XP but no installation disc:
How to replace Microsoft software
-
I put a password for my computer with Windows Vista Home Premium and now I forgot the password and can not even enter the computer now. Is anyway to recover this password or what is the next step to use the computer again?
Hello WillieBouma1,
You can try this to http://www.wikihow.com/Reset-a-Windows-Vista-Password that will help you with your password (typed in) problem easily. Here is one link: http://www.youtube.com/results?search_query=trinity+rescue+kit&search_type=&aq=f for video detail to achieve this, if you have any problems. I used it a dozen times and it really works! Hope this helps you. Let us know anyway. Make it a great day!
"And in the end the love you take, is equal to The Love You Make" (The Beatles last song from their latest album, Abbey Road.)
-
All the driver for Compaq Presario with OS Windows XP Profesional
Hi admin and all,.
In this case, I am the new office. Where is the computer I use a desktop Compaq Presario CQ3138L with operating system Windows XP Professional PC brands. After the re - install all drivers are not available. After browsing the site HP Web is not available for Windows XP. I'm waiting for all his help. Thanks for the solution
Hello:
What you expect and that you end up with, are two different things.
No HP PC consumer in the past 7 years has support for windows XP.
When you use a PC for work that you can buy a PC company that normally support for other windows operating systems.
You will need to find XP drivers individual available Web sites by the hardware manufacturer.
I'll try and help you find the drivers, but no guarantee of success.
First install the Intel chipset driver and restart.
Then try this graphics driver:
Audio: Accept the contract, download and install the file 3rd on the list (first shown in green).
Network: Download and install the driver for the second on the list.
-
I want to use the same key to install Windows 7 on two different HARD drives and use them one at a time on the same PC.
I have a hot spare disk Bay. I want to be able to exchange the HARD disk for troubleshooting Windows etc. Should I buy another key?
I just realized that some information I have given is incorrect.
I have not installed a new copy of Windows 7 on the second disc. I actually reconfigured it with an image of the first hard drive.
In this case can I leave Windows on the second disk, and exchange them warm without any problem?
I've heard people cloning the C drive and there change places if anything ever goes wrong.
Would not be Windows treats the second disc I've reconfigured as a cloned disk?
Keylonta:
You are right. If you clone a drive with a good installation running, the system knows no difference between readers. It works simply. It is not request a new activation if Exchange you them.
Similarly, if you use something like Acronis to make an image (complete backup of the drive) and then burn that image on a new disk, the system accepts the new drive as the former and, once again, do not request a reactivation.
-
Windows media player plugin for embedded windows media player
Hello
I wrote a plugin for Windows Media Player.
This plugin works fine for the stand-alone media player.
But the same plug-in is not visible in Windows Media Player Embedded.
If I go into WMP embedded plugin option, it does not list my developed plugin.
Please let me know what I need to set up the plugin differently
so that it can be seen in embedded WMP?
How do I set up the plugin for embedded WMP?Best regards
SharadYou should ask this question in forums MSDN http://social.msdn.microsoft.com/forums/en-us/home
--
BarbMVP Windows Entertainment and connected home
My Blog - http://digitalmediaphile.com/
Application Windows 8 Blog Reader of Barb connected world - http://apps.microsoft.com/windows/en-us/app/barbs-connected-world-blog/02f35769-52bf-461c-b1d5-06e54a58d298
-
Hello, how can I find the best internet connections for my windows seven? I use my cell phone internet phone with a usb cable.is there any software from microsoft to help me?
Hello
The fastest internet connection depends on your internet speed provided by her Internet (ISP) Service provider. Therefore, contact them to receive a best speed of the internet.
For more information:
How to increase the speed of navigation: 7 ways to work faster on slow connections
http://www.Microsoft.com/atwork/remotely/connections.aspx#fBid=TN-_TCHYDMB
10 tips to help improve your wireless network
http://www.Microsoft.com/athome/Setup/wirelesstips.aspx#fBid=1vrPRuhAhAg
Internet Explorer is slow? 5 things to try
It will be useful.
-
Cannot synchronize windows security 8 for the family with Web site
I already have a security account for the family windows on pc windows 7 of my son. We just got him a windows Tablet 8 for school and I want to add this device to his account with the same settings. I went through the installation on windows 8 (creation of a local child account for him, which allows security for the family for the account). When I hit the button to manage the settings on the family safety website, it tells me that the service is not available. My Internet as fine (since I'm on this site), so I doubt that it is a temporary problem. On the family safety website, it shows its Windows 7 PC, but not the tablet of windows 8. Someone has ideas of how do I synchronize the security settings for the windows family 8 with the site?
Hi Mike,.
Do you get the error message when you press the button "manage settings on the family safety Web site?
You can check the status of the safety of the family here: https://status.live.com/detail/fss
It is possible that your Microsoft Account needs a form of additional verification.
Follow these steps:
1 1 glisser slide from the right side of the screen, then select settings
2. Select change PC settings.
3. Select accounts
4. Select your account
Now, you can see some indications that your account or the machine needs additional checks. If you could click on the link and follow the instructions provided, this might solve your problem.
Once you are done, follow these steps:
1. go in other accounts (under accounts where you were previously).
2. Select the account you want to have a child, and then click change
3. change the account to a child account, then select OK.
To ensure that you are connected to the parental control service, follow these steps:
1. press on the button of the window on your keyboard
2. tap parental controls and select parental control
3. press on the large enough to Manage settings on the Family Safety website button.
4. you should see a list of people who can manage these settings online.
Let us know the result. If you have any other questions, we will be happy to help you.
-
Windows build fails when add 'cordova-plugin-camera' + 'cordova-plugin-contacts'
all the details here
Windows build fails when add 'cordova-plugin-camera' + 'cordova-plugin-contacts'
Resolved in the thread on the GS.
Maybe you are looking for
-
For you: recently played
Hello I am new to the apple's music and "for you" page is not updated if I play music that I adapted. Can I fix this problem and these songs will improve my recommendations or apple just ignore them and they care only about the songs that I played wi
-
When I click on the drop-down lists for options on a Web site, the list disappears before I can click on any option. I find clear the cache and cookies every time, it will work only once before the compensation again. So it must be allowed for each u
-
I updated my iPad today and now I can't get cellular internet. Can anyone help please?
I updated my iPad today and now I can't get cellular internet. Can anyone help please?
-
I forgot the password to my windows netbook this?
I forgot the password to my windows netbook to connect? Is there anything I can do to get in?
-
Convert a U8 array to a data type of LabView
In my code, the entrance is a fixed-length U8 array reflecting the data in memory, I need to convert it to a predefined data type. For example, the first 2 elements U8 in the arrary must comvert a U16, then 4 U8 U32 data elements data. I wonder if th