Ich versuche, eine Aktivität aus einer Zifferblatt in Android Wear auf einem Klick zu beginnen:eine Aktivität von Android Starten Wear Watch
Intent myIntent = new Intent(this, com.jorc.android.wearable.watchface.watchface.MainActivity.class);
getApplicationContext().startActivity(myIntent);
Allerdings bekomme ich diesen Fehler.
Error:(564, 39) error: no suitable constructor found for Intent(DigitalWatchFaceService.Engine,Class<MainActivity>)
constructor Intent.Intent(String,Uri) is not applicable
(argument mismatch; DigitalWatchFaceService.Engine cannot be converted to String)
constructor Intent.Intent(Context,Class<?>) is not applicable
(argument mismatch; DigitalWatchFaceService.Engine cannot be converted to Context)
Meine Frage ist: "Gibt es eine Möglichkeit, eine Aktivität von einem Zifferblatt zu starten"? Watchface verwendet CanvasWatchFaceService.Engine, wodurch CanvasWatchFaceService erweitert wird. , Hier eine anonyme innere Klasse Leinwand klicken Zuhörer