title: How to Save Push Notifications of parse by SharedPreferences
body: <p>I am sending push notifications from pasrse.com, i want to save the push notifications such that they can be seen later after the app is closed.</p>
  
  <p>I am able to receive the notifications in a separate activity's textview, but if i go to another acticity the notifications dissappear.</p>
  
  <p>MainActivity.java</p>
  
  <pre><code>public class MainActivity extends ActionBarActivity {
  Button Notify;
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
          Notify = (Button)findViewById(R.id.notify);
  
  
          Notify.setOnClickListener(new OnClickListener() {
  
          @Override
          public void onClick(View v) {
              // TODO Auto-generated method stub
  
              Intent intent = new Intent(MainActivity.this, DisplayPush.class);
              intent.putExtra("com.parse.Data","String text");
                  startActivity(intent);    
  
          }
      });
      }
  </code></pre>
  
  <p>DisplayPush.java</p>
  
  <pre><code>public class DisplayPush extends Activity {
  String jsonData;
      public static final String MyPREFERENCES = "MyPrefs" ;
      public static final String Titletobeput = "title";
      public static final String Messagetobeput = "mess";
  
      SharedPreferences sharedpreferences;
  @Override
  public void onBackPressed(){
     Intent myIntent = new Intent(DisplayPush.this,MainActivity.class);
     startActivity(myIntent);
    //  overridePendingTransition(R.anim.from_middle, R.anim.to_middle);
      finish();
  }
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.notification);
  
      TextView notification_title = (TextView) findViewById(R.id.title);
      TextView notification_message = (TextView) findViewById(R.id.message);
  
  
      ParseAnalytics.trackAppOpened(getIntent());
  
      Intent intent = getIntent();
      Bundle extras = intent.getExtras();
      if(extras !=null)
        if(extras.containsKey("com.parse.Data"))
           jsonData = extras.getString("com.parse.Data");
  
  
      //Bundle extras = intent.getExtras();
      String jsonData = extras.getString("com.parse.Data");
  
      try{
          JSONObject notification = new JSONObject(jsonData);
          String Title = notification.getString("title");
          String Message = notification.getString("alert");
  
  
          notification_message.setText(Message);
          notification_title.setText(Title);
  
          sharedpreferences = getSharedPreferences(MyPREFERENCES, Context.MODE_PRIVATE);
  
  
  
          SharedPreferences.Editor editor = sharedpreferences.edit();
  
          editor.putString(Titletobeput, Title);
          editor.putString(Messagetobeput, Message);
          editor.commit();
      }
      catch(JSONException e){
          Toast.makeText(getApplicationContext(), "Something went wrong with the notification", Toast.LENGTH_SHORT).show();
      }
  
  
  }
  }
  </code></pre>
  
  <p>Notification.xml(whre the notifications are shown)</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="fill_parent"
     android:layout_height="fill_parent" &gt;
  
      &lt;TextView
          android:id="@+id/title"
          android:layout_width="fill_parent"
  
          android:layout_height="wrap_content"
          android:layout_alignParentTop="true"
          android:layout_marginTop="40dp" /&gt;
  
      &lt;TextView
          android:id="@+id/message"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:layout_alignLeft="@+id/textView1"
          android:layout_below="@+id/textView1"
          android:layout_marginLeft="22dp"
          android:layout_marginTop="80dp" /&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>ActivityMain.xml(just a button to show notification button)</p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:paddingBottom="@dimen/activity_vertical_margin"
      android:paddingLeft="@dimen/activity_horizontal_margin"
      android:paddingRight="@dimen/activity_horizontal_margin"
      android:paddingTop="@dimen/activity_vertical_margin"
      tools:context="hasan.parsereceiveandshow.MainActivity" &gt;
  
      &lt;TextView
          android:id="@+id/textView1"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="Press the button to display notifications" /&gt;
  
      &lt;Button
          android:id="@+id/notify"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignLeft="@+id/textView1"
          android:layout_below="@+id/textView1"
          android:layout_marginLeft="44dp"
          android:layout_marginTop="63dp"
          android:text="See Notifications" /&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>Is there any way by which i can display complete notification on the status bar/notification dialog automatically ? As long messages get truncated.</p>