Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can an android app resource be shared with another app?

Is it possible to share a particular app's resource, like a bitmap image/icon placed under res folder with another app? This was asked in an interview, and I had no clue. Is there a concrete reason why such sharing can not happen, or if it is possible, how?

like image 850
Vinod Akkepalli Avatar asked Dec 31 '25 23:12

Vinod Akkepalli


2 Answers

Depends on what is the meaning of "sharing".

App-2 cannot access resources of App-1 directly.

However, if App-1 provides an Intent which can return an image from its resources as intent extra data, then, it can be considered to be "shared" (as now App-2 can invoke that intent to access the resource).

like image 198
Wand Maker Avatar answered Jan 02 '26 12:01

Wand Maker


No. Not at all. But when you want create 2 applications based on this same resources you can use android library project

like image 36
mariopce Avatar answered Jan 02 '26 12:01

mariopce