const-string v0, "auto_start"
const/4 v1, 0x0
invoke-virtual {p1, v0, v1}, Landroid/content/Context;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;
move-result-object v1
iput-object v1, p0, Lcom/ftsol/iptv/view/activity/BootStartupActivity;->a:Landroid/content/SharedPreferences;
const/4 v2, 0x1 <---change this from 0x1 to 0x0
const-string v3, "auto_start_on_bootup"
const-string v4, "" <--- If there's no value for "auto_start_on_bootup" the line below sets the value to be this empty string
invoke-interface {v2, v3, v4}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object v2
iget-object v3, p0, Lcom/ftsol/iptv/view/activity/GeneralSettingsActivity;->w:Landroid/content/SharedPreferences;
const-string v5, "PuraKura Play"
invoke-interface {v3, v0, v5}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
const-string v3, "checked" <--- The line below this checks SharedPreferences for this string
invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_0 <--- if the value for "auto_start_on_bootup" = "checked"
iget-object v2, p0, Lcom/ftsol/iptv/view/activity/GeneralSettingsActivity;->autoStart:Landroid/widget/CheckBox; <--- get the autoStart checkbox object
const/4 v3, 0x1 <--- use value of 1 (on)
invoke-virtual {v2, v3}, Landroid/widget/CheckBox;->setChecked(Z)V <--- set the check as 1 (on)
:cond_0
const-string v3, "auto_start_on_bootup"
const-string v4, ""
invoke-interface {v2, v3, v4}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object v2
iget-object v3, p0, Lcom/ftsol/iptv/view/activity/GeneralSettingsActivity;->w:Landroid/content/SharedPreferences;
const-string v5, "PuraKura Play"
invoke-interface {v3, v0, v5}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
const-string v3, "checked" <--- delete this line
invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z <--- delete this line
move-result v2 <--- delete this line
if-eqz v2, :cond_0 <--- delete this line
iget-object v2, p0, Lcom/ftsol/iptv/view/activity/GeneralSettingsActivity;->autoStart:Landroid/widget/CheckBox;
const/4 v3, 0x1 <---change this from 0x1 to 0x0
invoke-virtual {v2, v3}, Landroid/widget/CheckBox;->setChecked(Z)V
:cond_0 <--- delete this line
const-string v3, "auto_start_on_bootup"
const-string v4, "checked" <--- set default value to be "checked"
invoke-interface {v2, v3, v4}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object v2
iget-object v3, p0, Lcom/ftsol/iptv/view/activity/GeneralSettingsActivity;->w:Landroid/content/SharedPreferences;
const-string v5, "PuraKura Play"
invoke-interface {v3, v0, v5}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
const-string v3, "checked"
invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_0
iget-object v2, p0, Lcom/ftsol/iptv/view/activity/GeneralSettingsActivity;->autoStart:Landroid/widget/CheckBox;
const/4 v3, 0x1 <--- change this from 0x1 to 0x0
invoke-virtual {v2, v3}, Landroid/widget/CheckBox;->setChecked(Z)V
:cond_0
I'd be interested in having a nosey at that myself too mateGood read, somewhere to start.
I have my APK done with Smarters V3 and got them to set the defaults of what I wanted, maybe I need to compair the two files and see what the differences are, maybe that way we might figure it out.
Thanks
Yeah, it being smali makes it a nightmare to read for us mere mortals lolThis is a bit further down the rabit hole i thought i may go with this
but was thinking about it and if you change those settings say to auto start to off the values have to be stored somewhere in a dynamic array i would have thought ?
it would make moe sense if they were stored on a panel like XCIPTV is but of course its not , if it was a program running on a PC it would probably be stored in user data , but just dont know enough about APK's
Was this in loginactivity?So I spotted this and will see what happens
View attachment 6264
Also I found this and seems 0x0 is off 0x1 is on
I'll compile and see if anything changes
View attachment 6265
Nice, getting somewhere. I'm out of the house at the minute. Out of curiosity, try setting that to anything. Like "NOTCHECKED" see if you get the same result. I'm sure "checked" is just the string that was defined earlier in the code I posted earlier. Not even sure if "unchecked" is defined anywhere else.
another nice smarters layout and a solid theme you've got going in there g-manthere is a save button at the bottom of the screen
Or do you mean how to set the preloaded settings ?
Thinking about it now that would probably be what you mean?