luke
01/30/2020, 12:27 AMService
I'm unable to get a String
from resources, tried in onStartCommand()
onCreate()
and onDestroy()
, does anyone have any ideas?Tim Malseed
01/30/2020, 12:27 AMluke
01/30/2020, 12:28 AMoverride fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int { this.resources.getStringArray(R.array.permissions)
return START_NOT_STICKY
}
R.string.app_name
and that fails too.Tim Malseed
01/30/2020, 12:29 AMluke
01/30/2020, 12:30 AMTim Malseed
01/30/2020, 12:30 AMgetStringArray()
, which returns an Array<String>
luke
01/30/2020, 12:30 AMTim Malseed
01/30/2020, 12:33 AMR.*
importR.string.app_name
, is it importing com.mypackage.R
?android.R
?luke
01/30/2020, 12:35 AMTim Malseed
01/30/2020, 12:36 AMluke
01/30/2020, 12:36 AMTim Malseed
01/30/2020, 12:41 AMcontext.resources.getString(R.string.app_name)
fails in a fresh project, then I would say there’s something wrong with the IDE or gradle.luke
01/30/2020, 1:27 AMJiri Bruchanov
01/30/2020, 11:38 AM