I can not get to the resources from the broadcast broadcaster

for some reason I cannot get the string that is inside strings.xml. this is my code:

public class SDK_Referrer extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {  
String srt = context.getResources().getString(R.string.master);

does not recognize the string "master". when I check what options I get in R.string ... I get things like R.string.copy, or R.string.cancel, or R.string.ok ... and not the lines that y I have an xml file. Why is this?

+3
source share
1 answer

You may be importing android.R, not one of your own applications;

+4
source

All Articles