@@ -0,0 +1,1961 @@
+package com.kaltura.playersdk.widevine;%0A%0Aimport android.app.Activity;%0Aimport android.drm.DrmErrorEvent;%0Aimport android.drm.DrmEvent;%0Aimport android.drm.DrmInfoEvent;%0Aimport android.drm.DrmInfoRequest;%0Aimport android.drm.DrmManagerClient;%0Aimport android.widget.Toast;%0A%0Apublic class WidevineHandler %7B%0A%09%0A%09public static String WIDEVINE_MIME_TYPE = %22video/wvm%22;%0A%09%0A%09public static void acquireRights (final Activity activity, String url, String wvDRMServerKey) %7B%0A%09%09DrmManagerClient mDrmManager = new DrmManagerClient(activity);%0A%09%09DrmInfoRequest drmInfoRequest = new DrmInfoRequest(DrmInfoRequest.TYPE_RIGHTS_ACQUISITION_INFO, WIDEVINE_MIME_TYPE); %0A%09%09drmInfoRequest.put(%22WVAssetURIKey%22, url);%0A%09%09drmInfoRequest.put(%22WVDRMServerKey%22, wvDRMServerKey);%0A%09%09drmInfoRequest.put(%22WVDeviceIDKey%22, %22device1234%22);%0A%09%09drmInfoRequest.put(%22WVPortalKey%22, %22kaltura%22);%0A%0A%09%09mDrmManager.setOnEventListener(new DrmManagerClient.OnEventListener() %7B%0A%09%09%09public void onEvent(DrmManagerClient client, DrmEvent event) %7B%0A%09%09                switch (event.getType()) %7B%0A%09%09                case DrmEvent.TYPE_DRM_INFO_PROCESSED:%0A%09%09%09%09%09%09  //INFO PROCESSED%0A%09%09%09%09%09%09break;%0A%09%09                %7D      %7D      %7D);%0A%0A%09%09mDrmManager.setOnErrorListener(new DrmManagerClient.OnErrorListener() %7B%0A            public void onError(DrmManagerClient client, DrmErrorEvent event) %7B%0A                switch (event.getType()) %7B%0A%09%09%09%09 case DrmErrorEvent.TYPE_RIGHTS_NOT_INSTALLED:%0A%09%09%09%09%09 Toast.makeText(activity , %22We're sorry, you don't have a valid license for this video.%22, Toast.LENGTH_SHORT).show();%0A%09%09%09 %09//RIGHTA NOT INSTALLED%0A%09%09%09%09break;%0A                %7D      %7D      %7D);%0A%0A%09%09mDrmManager.setOnInfoListener(new DrmManagerClient.OnInfoListener() %7B%0A%09%09%09public void onInfo(DrmManagerClient client, DrmInfoEvent event) %7B%0A               if (event.getType() == DrmInfoEvent.TYPE_RIGHTS_INSTALLED) %7B%0A                   //RIGHTS INSTALLED%0A               %7D     %7D      %7D);%0A%09%09%0A%09%09//get license%0A%09%09mDrmManager.acquireRights(drmInfoRequest);%0A%09%7D%0A%7D%0A

add widevine