I have currently two versions of my app, has a paid and a free but I want this When installing donation package remove Dan Priority .. any thoughts?
It is being investigated by the established code donation app
public boolean isDonate () {try {PackageInfo Info = context.getPackageManager (). GetPackageInfo ("com.example.test.donate", PackageManager.GET_META_DATA); Log D. (Tag, "Pro App is installed:" + info.applicationInfo.name); Context.getPackageManager () Return checkSignatures ("com.example.test", "com.example.test.donate") == PackageManager.SIGNATURE_MATCH } Hold (NameNotFoundException e) {return false; }}
want to remove this preference
XML code:
Java code:
@Override public void OnCreate (Bundle savedInstanceState) {super.onCreate (savedInstanceState); AddPreferencesFromResource (R.xml.preferences); IconPreferenceScreen pro = (IconPreferenceScreen) FindPresence ("goto_pro"); Resource res = getResources (); Dribbble icon = res.getDrawable (R.drawable.playstore); Pro.setIcon (icon); getPreferenceManager () .findPreference ( "goto_pro") .setOnPreferenceClickListener (New OnPreferenceClickListener () {@Override public boolean onPreferenceClick (like seeds) {Intent intent = new Intent (Intent.ACTION_VIEW); intent.setData (Uri.parse ( "market: //details?id=com.example.test ")); Start date (intent); back to true;}});
Keep this in onCreate your preferred activity:
< Code> priority mPref = getPreferenceScreen (). FindPreference ("goto_pro"); . GetPreferenceScreen () removePreference (mPref);
Comments
Post a Comment