Android SharedPreferences not working -
i tring solve problem strange
i have app working great in of testing devices, after factory reset on nexus 5, when try int
sharedpreferences code
level_maximo_alcanzado = sp.getint(sp_nivel_juego_maximo, 1);
it give me string (but in nexus 5, in other devices give me int in nexus 5 causing exception java.lang.string cannot cast java.lang.integer
)
if value of string code
string prueba = sp.getstring(sp_nivel_juego_maximo, "1");
i value of 5t+sntivfha=
i dont have idea why pass in nexus 5 after factory reset
if can give tip follow awesome, lost @ point
code - ( ctx context object)
public static sharedpreferences sp; public static sharedpreferences.editor editor; if(sp == null) sp = ctx.getsharedpreferences(sp_name, context.mode_private); if(editor == null) editor = sp.edit(); editor.putint(sp_dinero, dinero); editor.commit();
additional info
i tryed unistall app , reboot device
i used obscuredsharedpreferences class encrypt them , in class give me pad block corrupted exception, swap sharedpreferences same error
i made factory reset due issue phonne said full when 5gb used
so maybe memory issue on device?
i made reset ( wipe cache , wipe data, , factory reset bootloader) , working again
i think memory got corrupted , failing.
Comments
Post a Comment