语言

Menu
Sites
Language
How do I know my web app is running in background ?

It's like a chat app,need a notifacation when app runs background.

so how can I know web app is running in background ?

编辑者为: Brock Boland 17 3月, 2014 原因: Paragraph tags added automatically from tizen_format_fix module.

响应

5 回复
Vineet Tiwari
Hi xi chen, The notification widget shows a pop-up window on the screen to provide notifications. Use the following sample code to add notification in your web app:

text1

text2

Thanks, Vineet Tiwari
Vineet Tiwari
Hi xi chen, The notification widget shows a pop-up window on the screen to provide notifications. Use the following sample code to add notification in your web app:

text1

text2

Thanks, Vineet Tiwari
xi chen
I want to know app is running in background ,not notifacation . #4 have given a answer ,thank you all the same
Lakshmi Grandhi
Hi xi chen, You have use focusin and focusout events to know whether your application is foreground or background. $("#page1").focusin(function (){ console.log("received focus In Event") ; }) $("#page1").focusout(function (){ console.log("received focus Out Event") ; })
xi chen
I will have a try ,thanks very much