Reputation: 25830
I made android emulator for Nexus 10 using latest ADT(21) and SDK tools.
I know that in Android JellyBean 4.2 there's a new feature called DayDream. I want to implement it in my Nexus10 Emulator I have. but don't know how.
i am getting option Daydream inside Settings -> Display
.
How can i implement my Custom DayDream through Code?
What i have Tried :
I have Check the Link HERE ,but not getting How to start to Implement it.
For me by clicking on DayDream only unlocked the BeanFlinger daydream, not the daydream menu itself. Is there any Possible way to implement new DayDream here?
Can anyone has some guide or way for learning Documentation and Implement Custom DayDream inside Jellybean 4.2?
Thanks in Advance.
Upvotes: 0
Views: 832
Reputation: 76
Im make this... in "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"
/>
And in "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>
Upvotes: 1
Reputation: 9851
Have you read the documentation here on daydreams? It sounds like you are missing a service which exposes the daydream to the system like this one: (taken from linked documentation)
<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>
Upvotes: 2