android - Get app's storage path without context -


i have background service activates broadcastreceiver class when receives content. want save app's path in external dir, returned calling context.getexternalfilesdir() (/sdcard/android/data/com.example.app/). however, since happens in background, have no context , cannot path. absolutely not wish hard code path , want data deleted when app uninstalled. other way in can complete path?

service context http://developer.android.com/reference/android/app/service.html can use.

this.getexternalfilesdir() 

on service.


Popular posts from this blog