简体   繁体   中英

How I can get value from WebView and push to the notification

I just started to develop for Android recently and don't know much about Java

My problem is I want show my website on webView , but how I can get a value from my URL and pass it to a notification? With cookie? With Session? With JSON Url?

For example you will go to www.test.com by your PC and you will see have 5 notification ( Actually this value is saved into a cookie ) , Is there any way that I can get cookie of my website from webView of application and it into a notification of android app ?

You cannot push that specific cookie from your computer to the Android Phone, or at least it would be really inconvenient.

But since you have to build the cookie from data, that data should be available for use buy GCM https://developer.android.com/google/gcm/index.html

Another alternative is to create a scheduled task that visits the website, gets the cookie and displays a notification if necessary.

I must say the question is rather vague, if you could be more specific it would probably help solve your problem!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM