i have gone through tons of link but still do not found any thing useful so need help to understand the concept of GCM
- 78 Posts
- 0 Reply Likes
Posted 4 years ago
JesseMonroy650 (Volunteer), Champion
- 3325 Posts
- 122 Reply Likes
Reviewed Video Tutorials, but none about "push" - yet!
There are many good written tutorial on push online:
Google: Phonegap push gcm tutorial
This video is for CLI, not Build - Phonegap Plugin Push Tutorial. I watched it. At this time, it is correct. If you find one for PGB, let me know.
I recommend the tutorial by devgirl.org, even though it is out of date - done in 2013. (right now the website is down, so I can't tell what has changed.)
Here is better list to search by:
Top Bloggers for Cordova/Phonegap.
Best of Luck
Jesse
- 78 Posts
- 0 Reply Likes
Good to see your reply!
while Browsing i found https://pushbots.com/ as very easy
followed https://www.youtube.com/watch?v=TdXXV... step by step
but its not working
Can you help me in fixing it?
JesseMonroy650 (Volunteer), Champion
- 3325 Posts
- 122 Reply Likes
JesseMonroy650 (Volunteer), Champion
- 3325 Posts
- 122 Reply Likes
If you have the code in a zip file, can you put it some place public so I can look at all the code and your directory strucutre.
Jesse
- 78 Posts
- 0 Reply Likes
i am creating a hello world app for that i will upload zip in minutes
- 78 Posts
- 0 Reply Likes
JesseMonroy650 (Volunteer), Champion
- 3325 Posts
- 122 Reply Likes
okay. You have two mistakes.
1) change the directory structure so that what is in the www/ is the root.
This tutorial has the example. An HTML Boilerplate for Phonegap.
2) The new security protocol means you must use CSP in the header of your index.html _OR_ remove all CSS and Javascript from the index.html (in this case just move it to a file.)
Below is the code for the CSP.
This whitelist workshee should also help.
HOW TO apply the Cordova/Phonegap whitelist system
Best of Luck
Jesse
NOTE DOING THIS WILL MAKE YOUR APP INSECURE. IT IS UP TO YOU TO SECURE YOUR APP.
Add this to your
config.xml
<plugin name="cordova-plugin-whitelist" source="npm" spec="1.1.0" />
<allow-navigation href="*" />
<allow-intent href="*" />
<access origin="*" /> <!-- Required for iOS9 -->
NOTE YOUR APP IS NOW INSECURE. IT IS UP TO YOU TO SECURE YOUR APP.
Add the followin to your
index.html
<meta http-equiv="Content-Security-Policy"
content="default-src *;
style-src * 'self' 'unsafe-inline' 'unsafe-eval';
script-src * 'self' 'unsafe-inline' 'unsafe-eval';">
- 78 Posts
- 0 Reply Likes
i dont get your point 1 as it is still in that structure only
2> * when * is used then why to white list any other thing
- 78 Posts
- 0 Reply Likes
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
2. Your app runs into a javascript error on
var listeningElement = parentElement.querySelector('.listening');
var receivedElement = parentElement.querySelector('.received');
listeningElement.setAttribute('style', 'display:none;');
receivedElement.setAttribute('style', 'display:block;');
Do you see why?
And why do you have this coded, anyway?
- 78 Posts
- 0 Reply Likes
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
- 78 Posts
- 0 Reply Likes
may be solved problem one look into it
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
Excuse me, but this may be way over your head. Are you sure you want to complete this project all by yourself?
- 78 Posts
- 0 Reply Likes
i know i lack basics as i dont have any trainer or do not have attended any classes for that
i have coaded
goo.gl/nOUwg6
and
goo.gl/Nu3d6Q
by my self only
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
I appreciate your efforts.
But....have another look at your package. It contains all errors I have shown you already three months ago in this thread:
http://community.phonegap.com/nitobi/...
- wrong directory structure
- old deprecated plugins
- blackberry stuff where it shouldn't be at all
- etc.
So, you may have no trainer and no classes, but it looks like you don't really learn much from the information you are receiving here, either.
- 78 Posts
- 0 Reply Likes
i have uploaded this one first but i dont know what is the problem in it
http://farmtocustomer.com/www.zip
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
You should correct that, first. Then correct the config mistakes (old plugins, etc.).
- 78 Posts
- 0 Reply Likes
still not working
- 78 Posts
- 0 Reply Likes
JesseMonroy650 (Volunteer), Champion
- 3325 Posts
- 122 Reply Likes
Not correct.
For *Phonegap Build*, `index.html` and `config.xml` both sit in the root directory and there is no `www/` directory. No other items are required, and infact you want to remove anything not list in `index.html` before uploading to *build.phonegap.com*.
Jesse
- 78 Posts
- 0 Reply Likes
JesseMonroy650 (Volunteer), Champion
- 3325 Posts
- 122 Reply Likes
It is your file. I have no idea what the issue is. Perhaps your server is caching the file - try changing the file name.
FWIW: here is a tutorial
An HTML Boilerplate for Phonegap
The files are on github and will load directly on to build.phonegap.com
Jesse
- 78 Posts
- 0 Reply Likes
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
JesseMonroy650 (Volunteer), Champion
- 3325 Posts
- 122 Reply Likes
Jesse
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
The main question from the OP was, I believe:
... process of sending push notification using google cloud messaging ?
... so need help to understand the concept of GCM
Not sure how we arrived at looking at the zip file. OP wants information about sending notifications and the concept behind GCM.
So, I would suggest working your way through
https://developers.google.com/cloud-m...
JesseMonroy650 (Volunteer), Champion
- 3325 Posts
- 122 Reply Likes
@Vikash
Let us know, if you get the build working.
Jesse
- 78 Posts
- 0 Reply Likes
JesseMonroy650 (Volunteer), Champion
- 3325 Posts
- 122 Reply Likes
JesseMonroy650 (Volunteer), Champion
- 3325 Posts
- 122 Reply Likes
the app builds correctly.
If you are having an issue with the push, start a new thread and please say what the problem is IN THE NEW THREAD.
Jesse
- 78 Posts
- 0 Reply Likes
App has build successfully but push is not working
JesseMonroy650 (Volunteer), Champion
- 3325 Posts
- 122 Reply Likes
- 78 Posts
- 0 Reply Likes
Related Categories
-
PhoneGap Build
- 15111 Conversations
- 275 Followers
-
Plugins
- 1283 Conversations
- 38 Followers
-
Programming (Others)
- 1167 Conversations
- 23 Followers


