Pushbullet is a service and set of applications that can mirror notifications, files, links, SMS messages, etc. among your devices (Android, iOS, PC, browser) and recently added chat features.
The service also offers the PushBullet API, whcih makes it possible for you to write programs that interoperate with the service.
This thread presents a demo program that makes some basic use of the API in VB6.
Requirements
You need a Pushbullet account.
The program requires GDI+ and MSXML 3.0, and should run on any 32-bit x86 (or WOW64) OS from Windows 95 forward as long as these two items have been installed.
Edanmo's IStream interfaces & functions typelib (STRM.tlb, included in attachment).
Scenario
Here we have small (and silly) application: KwayZKalk, a simple four-function calculator.
When an exception is raised (division by zero) KwayZKalk will pop up a Submit Error Report dialog. There the user can enter comments, a contact email address, and then click on Send Report or they can click on Don't Send instead.
If they click Send Report a capture of the main Form is done and pushed to the author along with a summary of the error and the user's optional comments and email address.
The author gets these "pushes" and can use them to take action (normally this would be problem diagnosis) and perhaps contact the user for more information or to send a fix. The author could have another VB6 program to extract these reports and log them into a database for action, but in simple cases they'll just get them on their PC, phone, tablet, wherever they have the Pushbullet app installed.
The program could also be designed to push only to one specific device.
Preparing KwayZKalk
First you need a Pushbullet account. Then you should install one of the client apps or at least go to the site and log on via the browser. This gives you somewhere to receive the "pushes."
Next you can go to your account settings on the web site to retrieve your account's AuthToken value.
Then you can go into the ConfigScrambler subfolder of the attachment and compile ConfigScrambler.vbp, an accessory utility used to apply some trivial encryption. Real applications should use much stronger standards-based encryption techniques than this program does.
Now you can open the template PBConfig.txt file (Unicode JSON text) using Notepad and replace the dummy AuthToken value with your real AuthToken. Save the file and exit Notepad.
Run ConfigScrambler.exe, which will read your PBConfig.txt and write a new PBConfig.dat file. Hex dumps of both are presented by ConfigScrambler.exe to help satisfy your curiosity. Now you can exit the program.
Cut and paste PBConfig.dat from this folder into the parent (KwayZKalk) folder where KwayZKalk can find it.
Finally compile KwayZKalk.vbp to create the dummy application, or you can run it from within the IDE.
Running KwayZKalk
Run the program. It should already be set to divide by zero, so go ahead and click on the "equals" button (just has a horizontal line on it).
This should divide by zero, firing off the Send Error Report dialog. Fill in the comments and email fields and then click on Send Report.
This should screen-capture the KwayZKalk main form and push the image and text information to the Pushbullet service, showing a simple upload animation until complete.
That's about it, and then you should be able to go into the Pushbullet client app on any device (or the web client in your browser) to see the Error Report.
![Name: Flow.png
Views: 93
Size: 15.9 KB]()
Flow of Error Reporting
![Name: PushCapture.png
Views: 72
Size: 30.1 KB]()
"Push" as it appears in the Windows PC Client
Beyond KwayZKalk
It is also possible to have your code bundle things up into a ZIP archive and upload and "push" that.
There are also quite a few other things you can do using the Pushbullet API.
The service also offers the PushBullet API, whcih makes it possible for you to write programs that interoperate with the service.
This thread presents a demo program that makes some basic use of the API in VB6.
Requirements
You need a Pushbullet account.
The program requires GDI+ and MSXML 3.0, and should run on any 32-bit x86 (or WOW64) OS from Windows 95 forward as long as these two items have been installed.
Edanmo's IStream interfaces & functions typelib (STRM.tlb, included in attachment).
Scenario
Here we have small (and silly) application: KwayZKalk, a simple four-function calculator.
When an exception is raised (division by zero) KwayZKalk will pop up a Submit Error Report dialog. There the user can enter comments, a contact email address, and then click on Send Report or they can click on Don't Send instead.
If they click Send Report a capture of the main Form is done and pushed to the author along with a summary of the error and the user's optional comments and email address.
The author gets these "pushes" and can use them to take action (normally this would be problem diagnosis) and perhaps contact the user for more information or to send a fix. The author could have another VB6 program to extract these reports and log them into a database for action, but in simple cases they'll just get them on their PC, phone, tablet, wherever they have the Pushbullet app installed.
The program could also be designed to push only to one specific device.
Preparing KwayZKalk
First you need a Pushbullet account. Then you should install one of the client apps or at least go to the site and log on via the browser. This gives you somewhere to receive the "pushes."
Next you can go to your account settings on the web site to retrieve your account's AuthToken value.
Then you can go into the ConfigScrambler subfolder of the attachment and compile ConfigScrambler.vbp, an accessory utility used to apply some trivial encryption. Real applications should use much stronger standards-based encryption techniques than this program does.
Now you can open the template PBConfig.txt file (Unicode JSON text) using Notepad and replace the dummy AuthToken value with your real AuthToken. Save the file and exit Notepad.
Run ConfigScrambler.exe, which will read your PBConfig.txt and write a new PBConfig.dat file. Hex dumps of both are presented by ConfigScrambler.exe to help satisfy your curiosity. Now you can exit the program.
Cut and paste PBConfig.dat from this folder into the parent (KwayZKalk) folder where KwayZKalk can find it.
Finally compile KwayZKalk.vbp to create the dummy application, or you can run it from within the IDE.
Running KwayZKalk
Run the program. It should already be set to divide by zero, so go ahead and click on the "equals" button (just has a horizontal line on it).
This should divide by zero, firing off the Send Error Report dialog. Fill in the comments and email fields and then click on Send Report.
This should screen-capture the KwayZKalk main form and push the image and text information to the Pushbullet service, showing a simple upload animation until complete.
That's about it, and then you should be able to go into the Pushbullet client app on any device (or the web client in your browser) to see the Error Report.
Flow of Error Reporting
"Push" as it appears in the Windows PC Client
Beyond KwayZKalk
It is also possible to have your code bundle things up into a ZIP archive and upload and "push" that.
There are also quite a few other things you can do using the Pushbullet API.