2013-07-17 66 views
0

我正在使用此代碼塊在我的時鐘小部件上點擊時啓動默認鬧鐘。啓動Xperia Z鬧鐘

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ž工作。 有什麼建議嗎?

+0

任何幫助球員:)? – Leebeedev

回答

2

一些搜索後我設法找到相應的活動:

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

作爲替代com.sonyericsson.organizer還包含 - com.sonyericsson.alarm.SetAlarm

0

Organizer_WorldClock打開世界時鐘。打開報警列表更好地使用組織者

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