本文整理汇总了Java中com.google.android.apps.dashclock.DashClockService类的典型用法代码示例。如果您正苦于以下问题:Java DashClockService类的具体用法?Java DashClockService怎么用?Java DashClockService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DashClockService类属于com.google.android.apps.dashclock包,在下文中一共展示了DashClockService类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: onStop
import com.google.android.apps.dashclock.DashClockService; //导入依赖的package包/类
@Override
protected void onStop() {
super.onStop();
// Update extensions (settings may have changed)
// TODO: update only those extensions whose settings have changed
Intent updateExtensionsIntent = new Intent(this, DashClockService.class);
updateExtensionsIntent.setAction(DashClockService.ACTION_UPDATE_EXTENSIONS);
updateExtensionsIntent.putExtra(DashClockService.EXTRA_UPDATE_REASON,
DashClockExtension.UPDATE_REASON_SETTINGS_CHANGED);
startService(updateExtensionsIntent);
// Update all widgets, including a new one if it was just added
// We can't only update the new one because settings affecting all widgets may have
// been changed.
LOGD(TAG, "Updating all widgets");
Intent widgetUpdateIntent = new Intent(this, DashClockService.class);
widgetUpdateIntent.setAction(DashClockService.ACTION_UPDATE_WIDGETS);
startService(widgetUpdateIntent);
}
开发者ID:mridang,项目名称:dashbar,代码行数:22,代码来源:ConfigurationActivity.java
示例2: showExtensionSettings
import com.google.android.apps.dashclock.DashClockService; //导入依赖的package包/类
public void showExtensionSettings(Context context, ExtensionListing listing){
if (listing.settingsActivity() == null) {
// Nothing to show
return;
}
// Start the proxy activity
Intent i = new Intent(context, ExtensionSettingActivityProxy.class);
i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
i.putExtra(DashClockService.EXTRA_COMPONENT_NAME, listing.componentName().flattenToString());
i.putExtra(ExtensionSettingActivityProxy.EXTRA_SETTINGS_ACTIVITY,
listing.settingsActivity().flattenToString());
startActivity(i);
}
开发者ID:mridang,项目名称:dashbar,代码行数:15,代码来源:ConfigureExtensionsFragment.java
示例3: onReceive
import com.google.android.apps.dashclock.DashClockService; //导入依赖的package包/类
@Override
public void onReceive(Context context, Intent intent) {
// Update weather
// TODO: there should be a way for an extension to request an update through the API
// See issue 292.
context.startService(new Intent(context, DashClockService.class)
.setAction(DashClockService.ACTION_UPDATE_EXTENSIONS)
.putExtra(DashClockService.EXTRA_UPDATE_REASON,
DashClockExtension.UPDATE_REASON_UNKNOWN) // TODO: UPDATE_REASON_RETRY
.putExtra(DashClockService.EXTRA_COMPONENT_NAME,
new ComponentName(context, WeatherExtension.class)
.flattenToShortString()));
}
开发者ID:romannurik,项目名称:dashclock,代码行数:15,代码来源:WeatherRetryReceiver.java
注:本文中的com.google.android.apps.dashclock.DashClockService类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论