Monday, March 16, 2015

Sample Notification. It uses new Image server


Deploy WAR for sthana-core server on EC2.

- Hit sthana core server by URL: http://52.1.153.252:8080/sthana-core-1.0/#/clients

- Leshan page with 'Client' shows.
- Enter this server IP into sthana client App > Settings > OK
- It should show mobile client as 'Registered' in Leshan page.
- click on client ID.
- Click on 'Observe' in Device section. (to verify the device)
- Go to Notification section, click 'Write' and jump to sample JSON.


---------------Alternate Local JAR running method if Core server not working------------------

- Run Leshan from D:\sthana\leshan\leshan-standalone\target
with $ Java -java leshan-standalone-0.1.10-SNAPSHOT-jar-with-dependencies.jar

- Hit Leshan server in browser with: http://54.85.77.102:8080/#/clients/
- If leshan throw some error, check 8080 port is free to run on.
--------------------------------------------------------------------------------------------------------------------

Enter Sample notification in Notification section: Change vendor ID always, because limit is set yet for each vendor.

{
   "vendorId":2,
   "contentTitle":"Welcome Shedd Aquarium",
   "contentText":"Welcome Shedd Aquarium",
   "smallIconPath":"http://ec2-52-0-157-177.compute-1.amazonaws.com/unsafe/300x200/http://64.17.140.53/wp-content/uploads/2014/01/shedd-aquarium.jpg",
   "largeIconPath":"http://ec2-52-0-157-177.compute-1.amazonaws.com/unsafe/300x200/https://totravelornot.files.wordpress.com/2013/12/012.jpg",
   "vendorPhone":"3129392438",
   "vendorLocation":{
      "name":"1200",
      "street":"South Lake Shore Drive",
      "city":"Chicago",
      "zip":"60605",
      "state":"IL",
      "country":"USA",
      "coordinates":{
         "latitude":41.8678,
         "longitude":-87.6139
      },
      "distance":0,
      "id":2
   },
   "product":{
      "upc":"999999",
      "name":"Chicago CityPASS ",
      "modelNumber":"",
      "manufacturere":"",
      "longProductDescription":"Chicago CityPASS includes priority entry to Shedd Aquarium",
      "shortDescription":"Chicago CityPASS includes priority entry to Shedd Aquarium",
      "deals":[
         {
            "dealName":"Save 50% off Chicago’s 5 best attractions",
            "dealImage":"Deal Image",
            "promoCode":"e74d77f5-0a29-4325-bf35-770b3fe7b274",
            "id":2
         },
         {
            "dealName":"Save 50% off Chicago’s 5 best attractions",
            "dealImage":"Deal Image",
            "promoCode":"e74d77f5-0a29-4325-bf35-770b3fe7b274",
            "id":2
         }
      ],
      "categories":[
         {
            "name":"Recreation",
            "subCategories":[

            ],
            "id":2
         }
      ],
      "images":[
         {
            "imageFilePath":"http://ec2-52-0-157-177.compute-1.amazonaws.com/unsafe/300x200/http://famouswonders.com/wp-content/uploads/2013/09/Shedd-Aquarium.jpg",
            "imageType":"PNG",
            "imageView":"LEFT",
            "id":3
         },
         {
            "imageFilePath":"http://ec2-52-0-157-177.compute-1.amazonaws.com/unsafe/300x200/http://www.danleysoundlabs.com/danley/wp-content/uploads/2012/07/shedd-aquarium.jpg",
            "imageType":"JPEG",
            "imageView":"FRONT",
            "id":4
         }
      ],
      "id":2
   }
}





No comments:

Post a Comment