Git Product home page Git Product logo

Comments (4)

mshukla19 avatar mshukla19 commented on May 2, 2024

hey i am also facing the same problem. If you have figured out the steps can you please post them here?

from iosched.

mangini avatar mangini commented on May 2, 2024

You should be able to use gradle to interact with GAE:
cd gcm-server
[change build.gradle to point to your app id/email]
./gradlew.sh gaeUpdate

from iosched.

mshukla19 avatar mshukla19 commented on May 2, 2024

well i have used gradle..did gradle gaeUpdate ..the device is registered correctly but i get a problem in sending a notification..
There are a few doubts i have -

  1. what has to be done with web-inf/classes/api.key.example file..do i have to write the my API key for Android there also?
  2. there is a checkuser() method in Baseservlet which has some authentication code for google.com..do i have to make some changes there or leave it as it is?
  3. when i go to my-app.appspot.com/admin and send a message from there..it says scheduleupdate.java not found..There is actually no file called scheduleupdate..so what should i do with it?

from iosched.

AlexKorovyansky avatar AlexKorovyansky commented on May 2, 2024

@mshukla19 take a look how it was solved in our case β€”Β gdgomsk@5b970ce.

For sending messages from server to mobile app you can use httpie tool (http://httpie.org/)

Several useful examples:

  1. $ http POST https://your-app-gcm.appspot.com/send/global/test Authorization:key=top-secret message="Hello World!" -j -v
  2. $ http POST https://your-app-gcm.appspot.com/send/global/sync_schedule Authorization:key=top-secret sync_jitter=0 -j -v
  3. $ echo
    '{
    "format": "1.0.00",
    "audience": "all",
    "expiry": "2016-07-14T19:40:00Z",
    "title": "Title Goes Here",
    "message": "Message goes here testing 1234 foo bar qux",
    "minVersion": "1",
    "maxVersion": "201",
    "url": "http://www.google.com"
    }' |
    http POST https://your-app-gcm.appspot.com/send/global/notification Authorization:key=top-secret -j -v
  4. $ echo
    '{
    "format": "1.0.00",
    "audience": "all",
    "expiry": "2016-07-14T19:40:00Z",
    "title": "Title Goes Here",
    "message": "Message goes here testing 1234 foo bar qux",
    "minVersion": "1",
    "maxVersion": "201",
    "url": "http://www.google.com",
    "dialogTitle": "Dialog Title",
    "dialogText": "Hello! This is a test dialog. Lorem ipsum dolor sit amet.",
    "dialogYes" : "Definitely!",
    "dialogNo" : "NO way!"
    }' |
    http POST https://your-app-gcm.appspot.com/send/global/notification Authorization:key=top-secret -j -v

Information about types of messages and its inner structure you can find here:

from iosched.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.