小编Ana*_*tos的帖子

每天特定时间通知android

我想创建一个应用程序让用户决定每天的时间让他通知通知...

我想知道我应该在上午7:00之前在用户想要的非常时间内触发通知,并让他点击通知并在特定活动中输入应用程序.但是当用户不想再收到任何通知时(点击按钮)我如何取消所有通知......?

我做了类似的东西

Intent intent = new Intent(this, main.class);
Bundle bundle = new Bundle();
bundle.putString("title", "Some Title");\
intent.putExtras(bundle);   
PendingIntent pi = PendingIntent.getActivity(this, 0, intent, 0);
String body = "Tap to see the Activity"; 
String title = "Title of notification"; 
Notification n = new Notification(R.drawable.ic_launcher, body, System.currentTimeMillis());
n.setLatestEventInfo(this, title, body, pi);
n.defaults = Notification.DEFAULT_ALL;
nm.notify(uniqueID, n);
Run Code Online (Sandbox Code Playgroud)

但直到现在还没有运气....

谢谢...

<< >>

我这样做

        String ns = Context.NOTIFICATION_SERVICE;
        NotificationManager mNotificationManager = (NotificationManager) getSystemService(ns);

        int icon = R.drawable.notification_icon;
        CharSequence tickerText = "Ome TickerText"; 
        long when …
Run Code Online (Sandbox Code Playgroud)

android alarmmanager android-notifications

8
推荐指数
1
解决办法
2万
查看次数

从子窗口传递到父窗口

我想问一下,

我有一个叫做的窗口MainWindow和另一个叫做的窗口ImportForm.在MainWindow我打电话

private void generate_Window(int num_chart) 
{ 
    Window ownedWindow = new ImportForm(num_chart); 
    ownedWindow.Owner = this;      
    ownedWindow.Show(); 
}
Run Code Online (Sandbox Code Playgroud)

在子窗口我做了一些东西,我产生了一些变量.像var1,var2,var3.

我希望当子窗口接近返回var1var2,var3MainWindow并调用一个函数让我们说import_chart(var1, var2, var3)..

任何帮助都会得到充分的肯定.谢谢

c# wpf parent-child

5
推荐指数
1
解决办法
6386
查看次数