*side note* from FRep’s website * Dear worrying developers, We provide this protection interface for you, to prevent damage from who break your terms of service, and/or to prevent uninstallation of your app. In case you do not understand why you concluded your app needs these codes, please consult us.
Codes to Protect Activity from FRep
– Add following line in onResume() to send broadcast to stop/hide FRep 2.6 or later
sendBroadcast(new Intent("com.x0.strai.frep.action.PROTECTCLASS"));
Old FRep (2.5 or before) does not support broadcast. Please refer the following method to check installed FRep support broadcast or not.
private boolean isRecentFrep() {
PackageManager packageManager = getPackageManager();
try {
PackageInfo info = packageManager.getPackageInfo("com.x0.strai.frep", PackageManager.GET_META_DATA);
if (info.versionCode >= 24) return true; // PROTECTCLASS broadcast supported
} catch (NameNotFoundException e) {}
return false;
}