如何与锁屏布局交互以在其中显示文本,例如这个应用程序: [英] How can I interact with the Lockscreen layout to display text into it, like this app:

查看:14
本文介绍了如何与锁屏布局交互以在其中显示文本,例如这个应用程序:的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚发现了这个应用程序:https://market.android.com/details?id=de.j4velin.lockscreenCalendar

I just discovered this application : https://market.android.com/details?id=de.j4velin.lockscreenCalendar

现在好像可以在锁屏里面写闹钟的地方写一些文字了.

It seem that is now possible to write some text inside the lockscreen in the place where the alarm is usually written.

我想在这个地方显示自定义文本,但完全不知道如何实现.

I would like to display custom text on this place, but have totally no idea on how to achieve that.

这家伙成功地在这个地方写了日历事件.

This guy succeed to write calendar events at this place.

非常感谢任何可以帮助我的线索//片段.

Thank a lot for any clue//snippet that would help me.

推荐答案

这非常容易实现,而且文档记录非常糟糕.您只需在系统设置中设置报警字符串,如下:

This is astonishingly easy to achieve and astonishingly badly documented. All you need to do is set the alarm string in the system settings, as follows:

    String message = "This is a test";
    Settings.System.putString(context.getContentResolver(),
            Settings.System.NEXT_ALARM_FORMATTED, message);

这篇关于如何与锁屏布局交互以在其中显示文本,例如这个应用程序:的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆