1919
2020public class EasyNotify {
2121
22+ private String ntitle = "title" ;
23+ private String nbody = "body" ;
24+ private String nclick_action = "MAINACTIVITY" ;
25+ private String ntopic = "allDevices" ;
26+ private String ntoken = "A0CALSKNLKAS45CLKSC655" ;
27+ private String nsound = "default" ;
28+ private String sendBy = TOPIC ;
29+ private String API_KEY ;
30+
31+ public static String TOPIC = "SEND_BY_TOPIC" ;
32+ public static String TOKEN = "SEND_BY_TOKEN" ;
33+
34+ private JSONObject notificationObject ;
35+ private JSONObject dataObject ;
36+ private JSONObject bodyObject ;
37+
2238 public void setTitle (String ntitle ) {
2339 this .ntitle = ntitle ;
2440 }
@@ -35,6 +51,10 @@ public void setTopic(String ntopic) {
3551 this .ntopic = ntopic ;
3652 }
3753
54+ public void setToken (String ntoken ) {
55+ this .ntoken = ntoken ;
56+ }
57+
3858 public void setSound (String nsound ) {
3959 this .nsound = nsound ;
4060 }
@@ -43,23 +63,6 @@ public void setSendBy(String sendBy) {
4363 this .sendBy = sendBy ;
4464 }
4565
46- private String ntitle = "title" ;
47- private String nbody = "body" ;
48- private String nclick_action = "MAINACTIVITY" ;
49- private String ntopic = "allDevices" ;
50- private String ntoken = "A0CALSKNLKAS45CLKSC655" ;
51- private String nsound = "default" ;
52- private String sendBy = TOPIC ;
53- private String API_KEY ;
54-
55- public static String TOPIC = "SEND_BY_TOPIC" ;
56- public static String TOKEN = "SEND_BY_TOKEN" ;
57-
58- private JSONObject notificationObject ;
59- private JSONObject dataObject ;
60- private JSONObject bodyObject ;
61-
62-
6366 private void sendNotification () throws IOException , JSONException {
6467 OkHttpClient client = new OkHttpClient ();
6568
0 commit comments