本文介绍了启动了Xperiaž闹钟的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用code的此块启动默认的闹钟对我的时钟部件攻时。

I'm using this block of code to launch the default Alarm Clock when tapping on my clock widget.

public Intent getAlarmPackage(Context context)
{
    PackageManager packageManager = context.getPackageManager();
    Intent AlarmClockIntent = new Intent(Intent.ACTION_MAIN).addCategory(Intent.CATEGORY_LAUNCHER);

    String clockImpls[][] = {
            { "Standard Alarm", "com.android.alarmclock",
                    "com.android.alarmclock.AlarmClock" },
            { "HTC Alarm ClockDT", "com.htc.android.worldclock",
                    "com.htc.android.worldclock.WorldClockTabControl" },
            { "Standard Alarm ClockDT", "com.android.deskclock",
                    "com.android.deskclock.AlarmClock" },
            { "Froyo Nexus Alarm ClockDT",
                    "com.google.android.deskclock",
                    "com.android.deskclock.DeskClock" },
            { "Moto Blur Alarm ClockDT",
                    "com.motorola.blur.alarmclock",
                    "com.motorola.blur.alarmclock.AlarmClock" },
            { "Samsung Galaxy S", "com.sec.android.app.clockpackage",
                    "com.sec.android.app.clockpackage.ClockPackage" } };

不过,这不是在索尼Xperiaž工作。
有什么建议?

But this is not working with the Sony Xperia Z.Any suggestions?

推荐答案

某些搜索我设法找到相应的活动后:

After some search i managed to find corresponding Activity:

{ "Sony Ericsson Xperia Z", "com.sonyericsson.organizer", "com.sonyericsson.organizer.Organizer_WorldClock" }   

作为替代com.sonyericsson.organizer也包含 - com.sonyericsson.alarm.SetAlarm

As alternative com.sonyericsson.organizer also contains - com.sonyericsson.alarm.SetAlarm

这篇关于启动了Xperiaž闹钟的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-16 12:18