Question Details

Answered
Why Liff openWindow() isn't working when using in callback ?

I use RxJS Observable an API and subscribe to get response, After i got a response i need to open a new window in liff by using function openWindow().

Every device can open expect iphone X, 11 etc.

Thank you for the answers.

example code.

this.testService.getDataFromApi().subscribe(response => { if(response !== null){ let isBool = response["data"] if(isBool){ return true }else{ liff.openWindow({url: "www.google.com", external: true}) // *can't open on iphone X, 11 * } } })

0
Edited: 1 months ago
Profile picture
Panuwat Uth

Answers

2
Profile picture
シュークリーム
Posted: 1 months ago

It seems the parameter format of liff.openWindow() is not

liff.openWindow("www.google.com", true)

but

liff.openWindow({url: "www.google.com", external: true})

.

Could you check it? https://developers.line.biz/en/reference/liff/#open-window

Profile picture
Panuwat Uth
Posted: 1 months ago
Edited: 1 months ago

シュークリーム

Thank for the answer and I'm sorry about my wrong code on example. Actually, i wrote like this

liff.openWindow({url: "www.google.com", external: true})

but it's still doesn't work :(.

Are you sure? question.vm