标签: notifications

如何使通知无法取消/不可删除的android

我有一个在后台工作的球员.我有通知.

问题:当我打开状态栏并按下清除按钮时,我丢失了通知.有可能解决这个问题吗?

notifications android

0
推荐指数
1
解决办法
996
查看次数

NSNotification(或类似)用于检测iOS上蓝牙连接的变化?

当我的iOS应用程序打开时,它会显示本地蓝牙设备列表,然后单击一个.如果蓝牙已关闭,则会出现一个系统警报,要求您打开它(使用按钮转到"设置",另一个按钮单击"确定"); 如果您打开设置,它不会再次扫描,您必须

如何在蓝牙打开时注册一种运行方法的通知?

我看到了一些关于"BluetoothAvailabilityChangedNotification"的内容,但是当打开/关闭蓝牙时似乎没有调用它.

这是我试过的代码:

[[NSNotificationCenter defaultCenter]
 addObserver:self
 selector:@selector(bluetoothAvailabilityChanged:)
 name:@"BluetoothAvailabilityChangedNotification"
 object:nil];
Run Code Online (Sandbox Code Playgroud)

...

-(void) bluetoothAvailabilityChanged: (NSNotification*) notification {
NSLog(@"Bluetooth changed %@",notification.description);
}
Run Code Online (Sandbox Code Playgroud)

iphone notifications bluetooth objective-c ios

0
推荐指数
1
解决办法
1824
查看次数

如何在Chrome扩展程序中插入通知操作按钮?

嗨,我需要开发一个通知,其中2个按钮执行不同的操作.一个按钮是'MARK',另一个是'IGNORE'.当我点击MARK按钮时,它必须导航到一个网站.当我点击IGNORE时,通知框应该是隐形的,不应再显示了.我该怎么做?这是我的background.js

  var oldChromeVersion = !chrome.runtime;

  function getGmailUrl() {
    return "http://calpinemate.com/";
    }
       function isGmailUrl(url) {

       return url.indexOf(getGmailUrl()) == 0;
      }

    chrome.browserAction.onClicked.addListener(function(tab) {

     chrome.tabs.query({
    url: "http://calpinemate.com/*",
    currentWindow: true
    }, function(tabs) {
    if (tabs.length > 0) {
        var tab = tabs[0];
        console.log("Found (at least one) Gmail tab: " + tab.url);
        console.log("Focusing and refreshing count...");
        chrome.tabs.update(tab.id, { active: true });
         updateIcon();
    } else {
        console.log("Could not find Gmail tab. Creating one...");
        chrome.tabs.create({ url: getGmailUrl() });
         updateIcon();
    }
     });
     });
   function onInit() {
      console.log('onInit');
      updateIcon(); …
Run Code Online (Sandbox Code Playgroud)

javascript notifications google-chrome-extension

0
推荐指数
1
解决办法
8471
查看次数

如何在Delphi中从托盘显示气球提示/通知

我的程序中有一个线程,用于检查每分钟是否有新内容,如果有的话,它应该显示托盘中的通知,例如带有提示文本的气球提示。例如:“您收到了汤姆的新消息!”

我使用TTrayIcon组件

请帮助,谢谢:)

delphi notifications trayicon

0
推荐指数
1
解决办法
6238
查看次数

社交网站如何处理通知

我正在实施一个小型社交网站,我正在尝试实施通知.

通知具有以下要求

  • 所有用户都会在他们关注的用户做某些事件时收到通知(更改个人资料图片,如帖子,创建帖子,发表评论等等...
  • 通知的状态为已读或未读(如facebook和stackoverflow).当用户的一组通知未读时,就像Facebook一样,用户将继续在其导航栏上看到阅读通知图标

以下是我想用MySQL实现它的方法:

通知表:type_of_event,event_id,message Notification_read表:user_id,notification_id,read

  • 每当用户执行触发通知发送给其所有关注者的事件时,该通知都存储在Notification表中
  • Notification_read表格将填写新创建的通知,其中包含新通知的ID和应接收通知的每个用户的ID(通知创建者的关注者)
  • 每当用户收到通知并读取通知时,通知都将标记为 read

这个解决方案对我来说似乎效率很低,因为每次发生通知时,通知都会notification_read多次写入表中(取决于用户拥有多少关注者)

有人能告诉我是否有更好的解决方案来解决这个问题

notifications facebook ruby-on-rails social-networking

0
推荐指数
1
解决办法
876
查看次数

CountDownTimer结束时的通知

我正在尝试通知告诉我,我CountDownTimer已经结束了,但我遇到了一些麻烦.目前我已经建立了一个测试通知(我认为)但我不知道如何呼吁通知工作.这就是我现在所拥有的:

public void onFinish() {
      NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(TestTimer.this);
      mBuilder.setContentTitle("Notification Alert, Click Me!");
      mBuilder.setContentText("Hi, This is Android Notification Detail!");
     TextView timer=(TextView)findViewById(R.id.mTextField);
    timer.setText("Seconds remaining: 0 ")
Run Code Online (Sandbox Code Playgroud)

一旦timer = 0就调用它,我想知道是否可以在它发出通知时调用它.

在此先感谢您的帮助,如果您需要更多代码,请随时提出.

notifications android

0
推荐指数
1
解决办法
761
查看次数

单击通知android启动活动

我点击通知时开始活动有问题...

public class MyNotification extends BroadcastReceiver {

@Override
public void onReceive(Context context, Intent intent) {
    // Toast.makeText(context, "notification", 25).show();

    NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(
            context).setSmallIcon(R.drawable.ic_launcher)
            .setContentTitle("Test Notification")
            .setContentText("This is test notification ");
    Intent myIntent = new Intent(context, MainActivity.class);
    PendingIntent intent2 = PendingIntent.getBroadcast(context, 1,
            myIntent, PendingIntent.FLAG_UPDATE_CURRENT);
    notificationBuilder.setContentIntent(intent2);
    NotificationManager mNotificationManager = (NotificationManager) context
            .getSystemService(Context.NOTIFICATION_SERVICE);

    mNotificationManager.notify(1, notificationBuilder.build());
}

}
Run Code Online (Sandbox Code Playgroud)

怎么了 ???

notifications android android-intent start-activity

0
推荐指数
1
解决办法
9069
查看次数

GCM推送通知服务DELPHI XE6的问题

我正在delphi xe6上开发一个GCM Push通知.我使用此帖子中的代码/sf/ask/1502626611/(使用AndroidManifest.xml中的标准组件)为我自己的应用程序和即使应用程序未运行,我也设法使用该服务接收通知.

但是当我收到通知时我遇到了问题,那就是我无法捕获onclick事件,因此我的应用程序打开(很棒),但它不会执行欲望操作.

这是我的AndroidManifest.xml

<receiver android:name="com.embarcadero.gcm.notifications.GCMNotification" android:exported="true">
    <intent-filter>
        <action android:name="com.google.android.c2dm.intent.RECEIVE" />
        <category android:name="%package%" />
    </intent-filter>
</receiver>
<service android:name="com.embarcadero.gcm.notifications.GCMIntentService">
</service>
Run Code Online (Sandbox Code Playgroud)

如果我使用帖子中的代码,我可以检测用户何时点击通知,但我不知道如何使用标准组件.

问候

delphi notifications firemonkey google-cloud-messaging delphi-xe6

0
推荐指数
1
解决办法
4106
查看次数

如何使NSUserNotification超时?

我正在使用这种方法:

NSUserNotification *notification = [[NSUserNotification alloc] init];
            notification.title = @"Title";
            notification.informativeText = @"body";
            notification.soundName = NSUserNotificationDefaultSoundName;

            [[NSUserNotificationCenter defaultUserNotificationCenter] deliverNotification:notification];
Run Code Online (Sandbox Code Playgroud)

如何让它在3秒后超时?

xcode cocoa notifications timeout objective-c

0
推荐指数
1
解决办法
454
查看次数

强制ios app再次请求权限

我需要我的应用再次请求通知权限.我试图重新安装该应用程序.我还尝试按照以下帖子重置隐私设置(设置>常规>重置>重置位置和隐私):iOS日历访问权限对话框,强制它出现?.我这样做之后尝试重新安装.我所做的一切都没有任何区别.看来这在iOS8中可能已经发生了变化.有没有办法强制iOS8中的权限请求?

permissions notifications push-notification ios

0
推荐指数
1
解决办法
2062
查看次数