Create Shared Preferences in Android Studio & Inject Shared Preferences in any Apk.
ฝัง
- เผยแพร่เมื่อ 15 ต.ค. 2024
- Create SharedPreferences in Android Studio
Inject SharedPreferences in any Apk
Sample App used: cuji cam
play store link: play.google.co...
We can use different approaches to find the SharedPreferences
This is one of them.
We can use Androd Studio or CodeAssist to write an app
We can also create different package and
static method and call it directly
Java Code in video Demonstration:
void injectSp() {
SharedPreferences sp = getSharedPreferences("com.cuji.cam.camera_preferences",MODE_PRIVATE);
SharedPreferences.Editor editor = sp.edit();
editor.putBoolean("is_pay", true);
editor.apply();
}
Credits - Sumanta