I am triying to acess to a shared preferences file wich was created in a different applicaction. I followed some tutorials but not works. This is my case:
App1 (com.example.remoteservice)
SharedPreferences configuracion2;
configuracion2 = getSharedPreferences("telo", Context.MODE_WORLD_READABLE);
Editor editor = configuracion2.edit();
editor.putFloat("x21", Float.parseFloat(x21.getText().toString()));
editor.commit();
App2 (com.example.grafica)
Context con = createPackageContext("com.example.remoteservice", MODE_WORLD_WRITEABLE);
SharedPreferences pref = con.getSharedPreferences(
"telo",MODE_WORLD_READABLE);
ancho = pref.getFloat("x21", 0);
Log.i("smash", "ancho" + String.valueOf(ancho));
And returns 0 because not exists "telo". why??
thanks