Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
261 views
in Technique[技术] by (71.8m points)

android - Notification.requestPermission()不起作用(Notification.requestPermission() not does work)

the notifications work fine in web but when i move it to android mobile it's not work, still stay in first screen.

(通知在网络上工作正常,但是当我将其移至android mobile时无法正常工作,仍停留在第一个屏幕中。)

Notification.requestPermission().then( (permission) => {

(Notification.requestPermission()。then((permission)=> {)

        if (permission === 'granted') {

            console.log('Notification permission granted.');
            this.saveToken()
        } else {

            console.log('Unable to get permission to notify.');

        }
    });
  ask by libi translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...