¿Es posible compartir strings.xml entre aplicaciones con el mismo sharedUserId?

I know that it is possible to share SharedPreferences (using the following) when the two apps have the same sharedUserId:

Context secondApp = createPackageContext("com.example.secondapp", 0);
SharedPreferences secondAppPreferences = secondApp.getSharedPreferences("name_of_shared_preferences_file", 0);

but is it at all possible to share strings from the "strings.xml" file so that i can get a string-array from the second app's stings.xml??

Yo he tratado:

secondApp.getResources().getStringArray(R.array.name_of_arr); 

but it throws an error (array cannot be resolved or is not a field) on "array" in "R.array.name_of_arr"

preguntado el 27 de agosto de 11 a las 14:08

2 Respuestas

It is possible to share "data" (files, preferences, exposed data) between Android applications, but not built in Resources (i.e. the stuff mapped through R). These Resources are all private per application.

Respondido 28 ago 11, 10:08

This is impossible to share strings or any other data between two different applications.

Respondido 27 ago 11, 19:08

Any other data? but it is possible to share files, preferences, and i think, databases between applications with the same android:sharedUserId - 92Jacko

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.