Hi

Hi ,
I have a problem with YoutubePlayer API
Follow you, I import .jar file and use JNI .pas in my project
But I have a error ;
<<<A YouTubePlayerView can only be created with an Activity which extends YouTubeBaseActivity as its context.>>>>

In my Code:
<<
try
FView:= TJYouTubePlayerView.JavaClass.init(TAndroidHelper.Context);
FView.initialize( StringToJString(DEVELOPER_KEY), FOnInitializedListener);

except on E: Exception do
log.d('EE/ '+E.Message);
end;
>>
I want to ask you, how can I set << YouTubeBaseActivity as its context >>

Thanks All,

Comments

  1. You cannot. As the error states, the activity has to descend from YouTubeBaseActivity, which is likely to be impossible in a Delphi Android application, because they all descend from FMXNativeActivity. It might be possible with TurboCocoa for Android

    ReplyDelete

Post a Comment