I'm building a plugin for Flutter and I want to access the Android app resource strings from the plugin.
I'm trying using:
@Override
public void onMethodCall(MethodCall call, Result result) {
switch (call.method) {
case "example":
String value = context.getString(R.string.name);
result.success(value);
break;
default:
result.notImplemented();
break;
}
}
But R.string points to the plugin resources, not the app resources.
Regards
R.stringpointing tostrings.xmlfile?strings.xml.