Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
BlackBerry Development Advisor
oros
Posts: 1,557
Registered: ‎04-12-2010
My Device: BlackBerry Z10

Client-Side Push Inititator

[ Edited ]

For a slightly more readable version of this sample (config.xml and index.html), please see this KB here.

http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/Client-Side-Push-Inititator/ta-p...

 

This will soon be made available on Github as well.


Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.
Developer
peardox
Posts: 1,229
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C

Re: Client-Side Push Inititator

Erik

 

I've been Chatting with Tim about Headless (short convo <g>)

 

I can imagine a scenario whereby we had a headless sitting waiting for a push and on reciept fired up our WW app

 

I'm thinking specifically of a well-designed scenario that in a running app would create an event - then you close it

 

Putting it simplistically...

 

My app wants to know when I am nearing home as it's got my shopping list stored away.

 

WW-Headless-Starter sits in the background noting things I wanna do and be alerted about

 

Now - headless picks up I'm on the way home by my GPS and starts my Shopping List app which makes a loud noise to remind me I have to get dinner in or me + the cat starve

 

My app only need know headless exists and get it to trigger me when pre-defined things happen

 




Click the like button if you find my posts useful!
New Member
Natalie_lie
Posts: 2
Registered: ‎03-16-2014
My Device: Bold

Re: Client-Side Push Inititator

Dear Sir My name is Natalie I am a beginner programmer in PHP and MySQL I need SIMPLEST PHP script to Push BBM Message from : My Friend --> to Blackberry Server --> to My Website Server and from My Website Server --> to Blackberry Server --> to my friend ID Please see in attachment image here http://www.lowcostwebmaster.com/bbm.jpg Thanks
BlackBerry Development Advisor
oros
Posts: 1,557
Registered: ‎04-12-2010
My Device: BlackBerry Z10

Re: Client-Side Push Inititator

For a PHP Push Initiator, this is a good starting point (note that "simplest" is tough around push as it is a bit of a complex topic.)

Writing a Server-Side Push Application Using PHP
http://docs.blackberry.com/en/admin/deliverables/50897/writing_server-side_push_application_using_ph...

The above goes through the PHP as well as an HTML form to send the pushes from.


To go the other way, you can't push from a device to a server. Push inherently goes through the BlackBerry Infrastructure and is intended to deliver small payload data to BlackBerry devices. It isn't intended to be used to send data anywhere else.

That being said, you should be able to use a standard Ajax request to send a message to a web server, and be able to receive that data via PHP and respond to it.
http://www.w3schools.com/ajax/ajax_xmlhttprequest_send.asp

What you do on the PHP side when the request arrives would be up to you.

Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.
New Developer
abinlesly
Posts: 105
Registered: ‎06-11-2013
My Device: DEVELOPER

Re: Client-Side Push Inititator

What is the equivalent of push initiator in native codes?

******Blackberry Developer*******---Built for the Kill-----
#######Developer of @Sudoku#########
BlackBerry Development Advisor
oros
Posts: 1,557
Registered: ‎04-12-2010
My Device: BlackBerry Z10

Re: Client-Side Push Inititator

You can find the native push documentation here:
https://developer.blackberry.com/native/documentation/cascades/device_comm/push/developing_a_push_en...

Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.