iammannan / EasyNotifyLibProject

Send firebase notifications to your users very easily: A new Android Lib
32 stars 19 forks source link

Click Action Issue Fixed... #7

Open obaida-mostarihi opened 4 years ago

obaida-mostarihi commented 4 years ago

Hey @iammannan Can you fix your code...???

so i noticed that the String 'nclick_action' is not used .....

i used it in the sendNotification Method it was: this.notificationObject.put("title", this.ntitle).put("body", this.nbody).put("sound", this.nsound); changed it to: this.notificationObject.put("title", this.ntitle).put("body", this.nbody).put("sound", this.nsound).put("click_action",this.nclick_action);

and if anyone wants to use it just change the code and in the
easyNotify.setClickAction("name"); //any name you want

and you should change your manifest e.x

`<activity
            android:name=".Activities.InboxActivity"
        >
            <intent-filter>
                <action android:name="name" /> <!-- here the same name  -->
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>

        </activity>

that's it.... and thank you....

obaida-mostarihi commented 4 years ago
   <activity
            android:name=".Activities.InboxActivity"
        >
            <intent-filter>
                <action android:name="name" /> <!-- here the same name  -->
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>

        </activity>