Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70435

Ionic4 TypeError: navigator.app.exipApp is not a function

$
0
0

@WLHY wrote:

this.platform.backButton.subscribe(() => {
                if (this.router.url === '/home') {
                    if (click_times === 0) {
                        this.toastService.info('click again to exit app');
                        click_times++;
                        setTimeout(() => {
                            click_times--;
                        }, 2000);
                    } else {
                        try {
                            navigator['app'].exipApp();
                        } catch (e) {
                            console.log(e);
                        }
                    }
                } else {
                    this.goBackService.goBack();
                }
            });

Ionic version:4.11.0
Cordova version:9.0.0

Error Info: TypeError: navigator.app.exipApp is not a function

I use chrome://inspect/#devices to debug it,and find that at first time do the action navigator['app'].exipApp(),it has no error ,but nothing happend.
And when I do navigator['app'].exipApp() again ,the code catch error ‘TypeError: navigator.app.exipApp is not a function’.
Why?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70435

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>