title: Access android context in ndk application
body: <p>Is there any way in which I can pass/get an object of android context in my ndk appliation. I want to use <code>SharedPreferences</code> in my ndk application via jni interface. To get an instance of <code>SharedPreferences</code> object, I need to call <code>getSharedPreferences()</code> on <code>Context</code> object. But I do not have access to the context object.</p>
  
  <p>OR </p>
  
  <p>How can I read and write an xml file from NDK ?</p>
  
  <p>Any pointers will be appreciated.</p>