If you don't want to use subscriptions as told in the other answer:
Use SharedPreferences. Save a bool for knowing if the user is premium. Also save a String with the current time when changing the bool because the user enabled premium. On every initialisation of your app check if its already time + 30 days and continue accordingly.
Something like this:
//enabling premium:
long time= System.currentTimeMillis();
String sTime = String.valueOf(time);
SharedPreferences premiumpref = new SharedPreferences();
premiumpref = getActivity().getSharedPreferences("premiumpref", Context.MODE_PRIVATE);
premiumpref.edit().putString("time",strTime).commit();
//next start:
long time= System.currentTimeMillis();
SharedPreferences premiumpref = new SharedPreferences();
premiumpref = getActivity().getSharedPreferences("premiumpref", Context.MODE_PRIVATE);
String startTime = premiumpref.getString("time","0");
Long lStartTime = Long.valueOf(startTime);
if((time-lStartTime) >= (86400000*30)) //thats the number of ms in a day
{
//premium is over
}