Skip to content

Commit b8cceb5

Browse files
authored
Image added
1 parent 7cc4136 commit b8cceb5

1 file changed

Lines changed: 28 additions & 5 deletions

File tree

README.md

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ An Android Library to send Firebase notifications to users easily.
33

44
# Demo
55

6-
6+
![alt tag](https://photos.google.com/photo/AF1QipNXo2WogpGQF_Z_0LeQ4rKShKCJ26IpTnXBSHDa "With empty EditText")
7+
![alt tag](http://domain.com/path/to/img.png "Completed all EditText")
8+
![alt tag](http://domain.com/path/to/img.png "Final Result")
9+
![alt tag](http://domain.com/path/to/img.png "Demo Video")
710

811
# Download
912

@@ -31,6 +34,7 @@ An Android Library to send Firebase notifications to users easily.
3134
* Send by TOPIC or TOKEN
3235
```java
3336
easyNotify.setSendBy(EasyNotify.TOPIC);
37+
or
3438
easyNotify.setSendBy(EasyNotify.TOKEN);
3539
```
3640
* IF Send by TOPIC
@@ -41,10 +45,6 @@ An Android Library to send Firebase notifications to users easily.
4145
```java
4246
easyNotify.setToken("YOUR_FIREBASE_TOKEN");
4347
```
44-
* IF Send by TOKEN
45-
```java
46-
easyNotify.setToken("YOUR_FIREBASE_TOKEN");
47-
```
4848
* Notification Optional Parameters
4949
```java
5050
easyNotify.setTitle("YOUR_TITLE_STRING");
@@ -71,5 +71,28 @@ An Android Library to send Firebase notifications to users easily.
7171

7272
});
7373
```
74+
* Full Code - Example
75+
```java
76+
EasyNotify easyNotify = new EasyNotify(api_key.getText().toString());
77+
easyNotify.setSendBy(EasyNotify.TOPIC);
78+
easyNotify.setTopic(topic.getText().toString());
79+
easyNotify.setTitle(title.getText().toString());
80+
easyNotify.setBody(body.getText().toString());
81+
easyNotify.setClickAction(click_action.getText().toString());
82+
easyNotify.setSound(sound.getText().toString());
83+
easyNotify.nPush();
84+
easyNotify.setEasyNotifyListener(new EasyNotify.EasyNotifyListener() {
85+
@Override
86+
public void onNotifySuccess(String s) {
87+
Toast.makeText(MainActivity.this, s, Toast.LENGTH_SHORT).show();
88+
}
89+
90+
@Override
91+
public void onNotifyError(String s) {
92+
Toast.makeText(MainActivity.this, s, Toast.LENGTH_SHORT).show();
93+
}
94+
95+
});
96+
```
7497

7598

0 commit comments

Comments
 (0)