I have created 2 project 1 is Lib and 2nd in Test. Lib project needs to save some data and it should be shared preference(no other option). Lib project is a jar so doesn't have any context things in it.
As per my understanding this is related to Context. Accessing SharedPreferences through static methods
So I have created Class which extends Application inside Lib Project. This is singleton class. I declare below in Lib App mainifiest file
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:name="com.test.manager.LibApp" >
</application>
Then I added this complete project as a lib to my actual project(testApp). When I try to run i am getting null pointer exception.