मैं एक स्थानीय अधिसूचना प्रणाली के साथ एक ऐप को लागू करने की कोशिश कर रहा हूं। सिस्टम को कुछ अनावश्यक सूचनाएं रद्द करनी चाहिए। System.scheduleNotification ठीक काम करता है (यह अधिसूचनाएं बनाता है और वे ठीक काम करते हैं) लेकिन यह nil
(यह एक आईडी वापस करने वाला माना जाता है) देता है। तो मैं अधिसूचना आईडी द्वारा किसी अधिसूचना को रद्द करने में सक्षम नहीं हूं।कोरोना, system.scheduleNotification ठीक से काम नहीं कर रहा है
दरअसल मैं जिस कोड का उपयोग करता हूं वह बहुत ही सरल है। किसी भी मदद के लिए मददगार होगा ...
local nextRefreshTime = 60 -- Not always 60, its just an example
local options = {
alert = "Some text here.",
badge = (native.getProperty("applicationIconBadgeNumber") or 0) + 1,
}
notifications[#notifications+1] = system.scheduleNotification(nextRefreshTime, options)
print(notifications[#notifications]) -- Prints nil !?!
-- Another example (test)
print(system.scheduleNotification(nextRefreshTime, options)) -- Also prints nil !?!
पी.एस: मैं भी utcTime
तर्क के साथ system.scheduleNotification
की कोशिश की।
मैंने डिवाइस पर और एक्सकोड सिम्युलेटर पर भी कोशिश की। मैं इस उदाहरण की कोशिश करूंगा। मुझे लगता है कि यह कोरोना साइट पर है। जवाब के लिए धन्यवाद। –