Skip to content

Instantly share code, notes, and snippets.

💻
Building

vivek soni vivex

💻
Building
Block or report user

Report or block vivex

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View .env.testing
APP_ENV=testing
APP_DEBUG=true
APP_KEY=key
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=sample
DB_USERNAME=shippable
DB_PASSWORD=
View shippable.yml
language: php
php:
- 5.6
services:
- mysql
addons:
hosts:
View gist:3f4271b177180d76c17c
try {
Result result = sender.send(msg2, account.getGcmRegId(), retries);
if (StringUtils.isEmpty(result.getErrorCodeName())) {
System.out.println(msg2.toString() + "GCM Notification is sent successfully" + result.toString());
return true;
}
System.out.println("Error occurred while sending push notification :" + result.getErrorCodeName());
View gist:7fa1bf79693fd199fc6a
Message msg = new Message.Builder().build();
Message msg2 = new Message.Builder().addData("message","Something New for You").build();
View gist:adb861ed2d983e0199f8
/**
* Created by vivex on 12/6/15.
*/
@Service
public class NotificationService {
/**
* gcmRegId is the id which android app will give to server (one time)
**/
public boolean pushNotificationToGCM(String gcmRegId,String message){
View pom.xml
<dependency>
<groupId>com.ganyo</groupId>
<artifactId>gcm-server</artifactId>
<version>1.0.2</version>
</dependency>
You can’t perform that action at this time.