Java Code Examples for com.gizwits.opensource.appkit.ConfigModule.GosCheckDeviceWorkWiFiActivity

The following examples show how to use com.gizwits.opensource.appkit.ConfigModule.GosCheckDeviceWorkWiFiActivity. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: GOpenSource_AppKit_Android_AS   Source File: GosMessageHandler.java    License: MIT License 5 votes vote down vote up
public void send(String ssid, int flog) {
	String ticker, title, text;
	ticker = (String) mcContext.getText(R.string.not_ticker);
	title = (String) mcContext.getText(R.string.not_title);
	text = (String) mcContext.getText(R.string.not_text);
	// 创建一个启动其他Activity的Intent
	Intent intent = new Intent(mcContext,
			GosCheckDeviceWorkWiFiActivity.class);
	intent.putExtra("softssid", ssid);
	PendingIntent pi = PendingIntent.getActivity(mcContext, 0, intent, 0);
	Notification notify = new Notification();
	// 设置通知图标
	notify.icon = R.drawable.ic_launcher;
	// 设置显示在状态栏的通知提示信息
	notify.tickerText = ticker;
	notify.when = System.currentTimeMillis();
	// 设置打开该通知,该通知自动消失
	notify.flags = Notification.FLAG_AUTO_CANCEL;

	// 构造通知内容布局
	RemoteViews rv = new RemoteViews(mcContext.getPackageName(),
			R.layout.view_gos_notification);
	// 设置通知内容的标题
	rv.setTextViewText(R.id.tvContentTitle, title);
	// 设置通知内容
	rv.setTextViewText(R.id.tvContentText, ssid + text);
	// 加载通知页面
	notify.contentView = rv;
	// 设置通知将要启动的Intent
	notify.contentIntent = pi;
	// TODO 发送通知
	// nm.notify(flog, notify);
}
 
Example 2
Source Project: Gizwits-SmartBuld_Android   Source File: GosMessageHandler.java    License: MIT License 5 votes vote down vote up
public void send(String ssid, int flog) {
	String ticker, title, text;
	ticker = (String) mcContext.getText(R.string.not_ticker);
	title = (String) mcContext.getText(R.string.not_title);
	text = (String) mcContext.getText(R.string.not_text);
	// 创建一个启动其他Activity的Intent
	Intent intent = new Intent(mcContext, GosCheckDeviceWorkWiFiActivity.class);
	intent.putExtra("softssid", ssid);
	PendingIntent pi = PendingIntent.getActivity(mcContext, 0, intent, 0);
	Notification notify = new Notification();
	// 设置通知图标
	notify.icon = R.drawable.ic_launcher;
	// 设置显示在状态栏的通知提示信息
	notify.tickerText = ticker;
	notify.when = System.currentTimeMillis();
	// 设置打开该通知,该通知自动消失
	notify.flags = Notification.FLAG_AUTO_CANCEL;

	// 构造通知内容布局
	RemoteViews rv = new RemoteViews(mcContext.getPackageName(), R.layout.view_gos_notification);
	// 设置通知内容的标题
	rv.setTextViewText(R.id.tvContentTitle, title);
	// 设置通知内容
	rv.setTextViewText(R.id.tvContentText, ssid + text);
	// 加载通知页面
	notify.contentView = rv;
	// 设置通知将要启动的Intent
	notify.contentIntent = pi;
	// TODO 发送通知
	// nm.notify(flog, notify);
}
 
Example 3
Source Project: gokit-android   Source File: GosMessageHandler.java    License: MIT License 5 votes vote down vote up
public void send(String ssid, int flog) {
	String ticker, title, text;
	ticker = (String) mcContext.getText(R.string.not_ticker);
	title = (String) mcContext.getText(R.string.not_title);
	text = (String) mcContext.getText(R.string.not_text);
	// 创建一个启动其他Activity的Intent
	Intent intent = new Intent(mcContext,
			GosCheckDeviceWorkWiFiActivity.class);
	intent.putExtra("softssid", ssid);
	PendingIntent pi = PendingIntent.getActivity(mcContext, 0, intent, 0);
	Notification notify = new Notification();
	// 设置通知图标
	notify.icon = R.drawable.ic_launcher;
	// 设置显示在状态栏的通知提示信息
	notify.tickerText = ticker;
	notify.when = System.currentTimeMillis();
	// 设置打开该通知,该通知自动消失
	notify.flags = Notification.FLAG_AUTO_CANCEL;

	// 构造通知内容布局
	RemoteViews rv = new RemoteViews(mcContext.getPackageName(),
			R.layout.view_gos_notification);
	// 设置通知内容的标题
	rv.setTextViewText(R.id.tvContentTitle, title);
	// 设置通知内容
	rv.setTextViewText(R.id.tvContentText, ssid + text);
	// 加载通知页面
	notify.contentView = rv;
	// 设置通知将要启动的Intent
	notify.contentIntent = pi;
	// TODO 发送通知
	// nm.notify(flog, notify);
}