问题标签 [uilocalnotification]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
2 回答
1176 浏览

iphone - UILocalNotification handling when screen is locked

I am developing an iPhone app that delivers alerts at certain times using UILocalNotifications. Pressing the OK button on the alert launches the app so it can perform specific tasks.

So far, everything works beautifully in most cases: if the app is running and the alert fires, it works fine, and if the app is not running (but the phone is on), it works just as well.

However, if the alert fires when the screen is locked, one of two things happens.

  1. alert fires, and I "slide to unlock" immediately, then the app launches as expected.
  2. alert fires, but I wait to "slide to unlock" longer than 20 seconds (the time it takes the screen to lock (dim) again). When I finally unlock the screen, the alert shows, but does NOT launch the app.

I have looked throughout the Apple docs and this site, but cannot find an answer. I hope my explanation makes sense. Any thoughts?

0 投票
4 回答
4525 浏览

iphone - 如何从 UILocalNotification 对象中获取 NEXT 触发日期

我有一个 UILocalNotification 对象,我设置了重复间隔日、周和月。我在访问对象的触发日期时完全没有问题:

但我在获得下一个开火日期时遇到了麻烦。如果我将上面的 notification1 对象打印到控制台,我会得到:

这个对象在某处包含我需要显示下一个火灾日期的值或数据......但我找不到它!有人知道我可以在哪里以编程方式获得它吗?

谢谢

0 投票
1 回答
4436 浏览

ios - 自定义 UILocalNotification 的警报

我必须更改alertView. UILocalNotification我怎样才能做到这一点?

0 投票
2 回答
2888 浏览

iphone - 在新线程上设置本地通知?

我需要知道是否可以创建一个新线程来处理设置本地通知。

我的应用在很大程度上依赖于这些通知,所以我想让应用在手机设置通知的同时工作。

例子:

(现在)

您启动应用程序,应用程序会挂在启动屏幕上以设置本地通知,然后启动。

(我想)

应用程序启动并在设置本地通知时可用。

我也需要一些示例代码:)

(作为记录,每次应用程序出于我自己的原因进入前台时,我都会设置 60 个本地通知......)

谢谢!!

0 投票
1 回答
288 浏览

iphone - 我可以在 iPhone 上访问 SMS 声音吗?

我想知道是否可以让用户从系统声音中为我的应用程序的本地通知选择短信声音?

编辑:

我的意思是所有的短信声音(喇叭,铃铛......等)。

结束编辑

请不要告诉我记录它们:)

谢谢!

0 投票
8 回答
52011 浏览

iphone - 如何将本地通知重复间隔设置为自定义时间间隔?

我正在制作一个需要本地通知的 iPhone 应用程序。

在本地通知中有repeatInterval属性,我们可以将单位重复间隔设置为 mintute、hour、day、week、year 等。

我希望重复间隔应该是 4 小时。

因此,每4 小时会有一次本地通知。

我不希望用户为每个设置单独的通知。

我希望用户能够将 repeatInterval 设置为 4 小时。

我怎么做?

0 投票
1 回答
499 浏览

cocoa-touch - 是否可以重命名 UILocalNotification 的“关闭”按钮?

是否可以重命名 UILocalNotification 的“关闭”按钮?如果不可能使用哪个 API 代替 UILocalNotification?我知道推送服务。但我想在不使用某些远程服务的情况下在本地显示通知。

0 投票
1 回答
4589 浏览

iphone - 在本地通知中播放声音

我在我的应用程序中使用了本地通知,并在正确的时间成功生成了警报..

但是当我尝试使用以下代码播放声音时,它不会播放......

localNot.soundName =@"Ghulam Ali-Chamkte Chaad Ko.mp3";

谁能告诉我原因....声音文件的播放长度会影响吗

0 投票
2 回答
442 浏览

iphone - 我们可以添加超过 2 个按钮来提醒视图 UILocalnotification 对话框吗

我们如何才能在 UILocalNotification AlertView 对话框中添加更多的关闭和查看按钮。

请帮忙!

0 投票
1 回答
345 浏览

iphone - 具有不同 NSDate 的本地通知

在我的应用程序中,我将安排一个任务在特定日期和时间通知用户,例如 12 月 31 日。2010 我有开始时间 9:00 Am 和结束时间 5:00 pm ,在这里我必须在上午 9:00 之前和下午 5:00 之后的 10 分钟或在这两个时间之间的某个时间通知用户,比如下午 2:00所以我要使用 LocalNotifications ...我是对的吗?或者有没有其他方法可以实现这一点。

请帮忙 ..