-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ask for default compications #1
Comments
You have to get the component name for the complication like this:
val dateComponent = ComponentName(
"com.google.android.wearable.app",
"com.google.android.clockwork.home.complications.providers.DayOfMonthProviderService"
)
You can then set the default complication to the correct ID. Keep in mind
that only certain system providers will show up unless the user
explicitly grants your app complication read permissions. The list is here:
https://developer.android.com/reference/android/support/wearable/complications/SystemProviders
Though weather is not a system safe complication provider.
setDefaultComplicationProvider(BOTTOM_RIGHT_COMPLICATION_ID,
dateComponent, ComplicationData.TYPE_RANGED_VALUE)
…On Wed, Oct 2, 2019 at 6:15 AM Nguyễn Quang Vinh ***@***.***> wrote:
First of all, I am very thankful for your wonderful code. However, I have
one problem that how I can set default compications by using calendar or
weather. Wating for your reply and thank you
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1?email_source=notifications&email_token=ADFUR2YVGAP7JHSORUTEVYLQMSNIFA5CNFSM4I4WF272YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HPEAJ5Q>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADFUR2YSXMC2F76MTPFTLM3QMSNIFANCNFSM4I4WF27Q>
.
|
Thanks for your reply so fast but I can not know where I can put your code |
You can put it in onSurfaceChanged.
I have a community for Wear OS developers if you have more questions:
https://www.reddit.com/r/WearOSDev/
…On Wed, Oct 2, 2019 at 7:07 AM Nguyễn Quang Vinh ***@***.***> wrote:
Thanks for your reply so fast but I can not know where I can put your code
setDefaultComplicationProvider(BOTTOM_RIGHT_COMPLICATION_ID,
dateComponent, ComplicationData.TYPE_RANGED_VALUE).
I am newbie in WatchOS. Hope you to help me. Thanks
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1?email_source=notifications&email_token=ADFUR22MM4ZJBUIP2YGWSV3QMSTJHA5CNFSM4I4WF272YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAE3ZIQ#issuecomment-537509026>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADFUR24R2WGAFN7IB6BEQRDQMSTJHANCNFSM4I4WF27Q>
.
|
Thanks very much for helping. Love to see more projects from you. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
First of all, I am very thankful for your wonderful code. However, I have one problem that how I can set default compications by using calendar or weather. Wating for your reply and thank you
The text was updated successfully, but these errors were encountered: