Sto cercando di implementare un app con un sistema di notifica locale. Il sistema dovrebbe cancellare alcune notifiche non necessarie. System.scheduleNotification funziona bene (crea notifiche e funzionano bene) ma restituisce nil
(Dovrebbe restituire un ID). Quindi non sono in grado di cancellare nessuna notifica tramite l'id di notifica.Corona, system.scheduleNotification non funziona correttamente
In realtà il codice che uso è molto semplice. Qualsiasi aiuto sarebbe utile ...
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 !?!
P.S: Ho provato anche con system.scheduleNotification
utcTime
argomento.
ho cercato del dispositivo e anche simulatore xcode. Proverò questo esempio. Presumo che sia sul sito della corona. Grazie per la risposta. –