我使用最新的ADT(21)和SDK工具为Nexus 10制作了android模拟器。
我知道在Android JellyBean 4.2中有一个名为DayDream的新特性。我想在我的Nexus10模拟器中实现它。但不知道怎么做。
我可以选择白日梦在Settings -> Display里面。
如何通过代码实现自定义DayDream?
我尝试过的:
我已经检查了链接这里,但没有了解如何开始实现它。
对我来说,通过点击daydream只解锁了BeanFlinger白日梦,而不是白日梦菜单本身。有没有可能在这里实现新的DayDream?
有谁能在Jellybean4.2中找到学习文档和实现自定义DayDream的指南或方法吗?
提前谢谢。
发布于 2012-11-28 14:04:32
你看过关于白日梦的文档这里吗?听起来,您缺少了一项服务,该服务向系统公开了白日梦:(摘自链接文档)
<service android:name=".MyDream" android:exported="true"
android:icon="@drawable/dream_icon" android:label="@string/dream_label" >
<intent-filter>
<action android:name="android.service.dreams.DreamService" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</service>发布于 2012-12-05 09:43:36
我做这个..。在"dream.xml“
<?xml version="1.0" encoding="utf-8"?>
<dream xmlns:android="http://schemas.android.com/apk/res/android"
android:settingsActivity="com.s0l.equationsdream/com.s0l.equationsdream.EquationsDreamSettingsActivity"
/>在"AndroidManifest.xml“中
<activity
android:name="com.s0l.equationsdream.EquationsDreamSettingsActivity"
android:label="@string/equations_settings"
android:excludeFromRecents="true"
android:icon="@drawable/ic_action_settings"
android:taskAffinity=""
android:theme="@android:style/Theme.Holo"
android:exported="true">
<intent-filter>
<category android:name="android.intent.category.MAIN" />
</intent-filter>
</activity>https://stackoverflow.com/questions/13606288
复制相似问题