@@ -0,0 +1,2449 @@
+package com.growthbeat.link;%0A%0Aimport java.lang.reflect.Method;%0A%0Aimport android.content.BroadcastReceiver;%0Aimport android.content.Context;%0Aimport android.content.Intent;%0Aimport android.content.pm.ApplicationInfo;%0Aimport android.content.pm.PackageManager;%0Aimport android.content.pm.PackageManager.NameNotFoundException;%0Aimport android.util.Log;%0A%0Apublic class InstallReceiver extends BroadcastReceiver %7B%0A%09public static final String LOGGER_DEFAULT_TAG = %22GrowthLink%22;%0A%09@Override%0A%09public void onReceive(Context context, Intent intent) %7B%0A%09%09precessIntent(context,  intent);%0A%09%7D%0A%09%0A%09private void precessIntent(Context context, Intent intent)%0A    %7B%0A        ApplicationInfo applicationinfo;%0A%09%09try %7B%0A%09%09%09applicationinfo = context.getPackageManager().getApplicationInfo(context.getPackageName(), PackageManager.GET_META_DATA);%0A%09%09%09String strPreProcess = applicationinfo.metaData.getString(%22GROWTHLINK_PREPROCESS_RECEIVER%22);%0A%09        processMetadataString(strPreProcess, context, intent);%0A%09        processGLIntent(context, intent);%0A%09        String strPostProcess = applicationinfo.metaData.getString(%22GROWTHLINK_POSTPROCESS_RECEIVER%22);%0A%09        processMetadataString(strPostProcess, context, intent);%0A%09%09%7D catch (NameNotFoundException e) %7B%0A%09%09%09e.printStackTrace();%0A%09%09%09processGLIntent(context, intent);%0A%09%09%7D%0A        return;%0A    %7D%0A%09%0A%09@SuppressWarnings(%7B %22rawtypes%22, %22unchecked%22 %7D)%0A%09private void processMetadataString(String metaDataString, Context context, Intent intent)%7B%0A%09%09if (metaDataString == null %7C%7C metaDataString.length() == 0) return;%0A%09%09String%5B%5D packages = metaDataString.split(%22,%22, 0);%0A%09%09for(String packageName : packages)%7B%0A%09%09%09if (packageName.length() == 0)continue;%0A%09%09%09packageName = packageName.trim();%0A%09%09%09Log.d(%22processMetadataString%22, packageName);%0A%09%09%09try%0A%09        %7B%0A%09            ClassLoader classloader = getClass().getClassLoader();%0A%09            Class receiver = classloader.loadClass(packageName);%0A%09            Object receiverObj = receiver.newInstance();%0A%09            Method method = receiver.getMethod(%22onReceive%22, new Class%5B%5D %7B%0A%09                android.content.Context.class, android.content.Intent.class%0A%09            %7D);%0A%09            method.invoke(receiverObj, new Object%5B%5D %7B%0A%09                context, intent%0A%09            %7D);%0A%09        %7D%0A%09        catch(Exception exception)%0A%09        %7B%0A%09            exception.printStackTrace();%0A%09        %7D%0A%09%09%7D%0A%09%7D%0A%09%0A%09private void processGLIntent(Context context, Intent intent)%7B%0A%09%09Log.d(%22processGLIntent%22, %22done%22);%0A%09%7D%0A%09%0A%7D%0A

create InstallReceiver class