Q&A

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
  • 2
  • 1544
  • twitter facebook

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

  • 1

シュークリーム

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 :(.

  • 0
Are you sure? question.vm