I want to use the badge notification to put a number next to the icon if there is an image in one of the Graphics. Do I need to use the Push notification that is used in the lesson?
Thanks
Mark
Badge Notification
Moderators: LCNeil, heatherlaine, kevinmiller, elanorb
Re: Badge Notification
HI Mark,
All you would need to do is use the iphoneSetNotificationBadgeValue command to set this number when an image is imported.
You can test this by creating a button and then placing the following script-
on mouseUp
iphoneSetNotificationBadgeValue 10
end mouseUp
You should notice the number "10" next to your iOS app icon.
Kind Regards
Neil Roger
--
RunRev Support Team ~ http://www.runrev.com
LiveCode – Realize fast, compile-free coding
—
All you would need to do is use the iphoneSetNotificationBadgeValue command to set this number when an image is imported.
You can test this by creating a button and then placing the following script-
on mouseUp
iphoneSetNotificationBadgeValue 10
end mouseUp
You should notice the number "10" next to your iOS app icon.
Kind Regards
Neil Roger
--
RunRev Support Team ~ http://www.runrev.com
LiveCode – Realize fast, compile-free coding
—
Re: Badge Notification
This is what i am trying to do to set the badge notification. Am I on the right path?
Code: Select all
function iphoneSetNotificationBadgeValue ()
repeat with x = 1 to 5
if image x is not empty then
iphoneSetNotificationBadgeValue to x
end repeat
end if
end iphoneSetNotificationBadgeValue
Re: Badge Notification
Hi Mark,
You were almost there
A few things i noted were-
- You were trying to call the iphoneSetNotificationBadgeValue as a function. For simplicity I have turned this into a handler.
- You are not setting iphoneSetNotificationBadgeValue in your script so you need to remove the "to"
- the end if was in the wrong place (swapped with end repeat)
Kind Regards
Neil Roger
--
RunRev Support Team ~ http://www.runrev.com
LiveCode – Realize fast, compile-free coding
—
You were almost there
A few things i noted were-
- You were trying to call the iphoneSetNotificationBadgeValue as a function. For simplicity I have turned this into a handler.
- You are not setting iphoneSetNotificationBadgeValue in your script so you need to remove the "to"
- the end if was in the wrong place (swapped with end repeat)
Code: Select all
on iphoneSetBadge
repeat with x = 1 to 5
if image x is not empty then
iphoneSetNotificationBadgeValue x
end if
end repeat
end iphoneSetBadge
Neil Roger
--
RunRev Support Team ~ http://www.runrev.com
LiveCode – Realize fast, compile-free coding
—