You can load the propertiy file using your android context like this :
context.getAssets().open("app.properties");
For example in a Fragment :
try{
Properties properties = new Properties();
properties.load(this.getActivity().getAssets().open("app.properties"));
}catch(Exception e){
e.printStackTrace();
}
As you seem to need this in a class where the context is not accessible you can create your own application class with a static access to the context and then use this context everywhere.
Create your application class :
public class MyApp extends Application {
private static MyApp instance;
public static MyApp getInstance() {
return instance;
}
public static Context getContext(){
return instance.getApplicationContext()
}
@Override
public void onCreate() {
instance = this;
super.onCreate();
}
}
Add your new created application into the manifest :
<application
android:name="com.example.yourapp.MyApp"
...
Once this done you can load your properties in your XMLParser :
try{
Properties properties = new Properties();
properties.load(MyApp.getContext().getAssets().open("app.properties"));
}catch(Exception e){
e.printStackTrace();
}