GitHub PullRequestReviewCommentEvent at 2014-04-24 22:19:02
Repository: megasoft-14
Actor: heba-aamer
Payload: {"comment":{"url":"https://api.github.com/repos/ndomar/megasoft-14/pulls/comments/11975611","id":11975611,"diff_hunk":"@@ -0,0 +1,95 @@\n+package com.megasoft.entangle;\n+\n+import java.util.concurrent.ExecutionException;\n+\n+import org.json.JSONException;\n+import org.json.JSONObject;\n+\n+import com.megasoft.requests.GetRequest;\n+import com.megasoft.requests.PutRequest;\n+\n+import android.app.Activity;\n+import android.content.Intent;\n+import android.graphics.Color;\n+import android.graphics.Typeface;\n+import android.os.Bundle;\n+import android.view.View;\n+import android.widget.TextView;\n+\n+\n+public class Notification extends Activity {\n+\n+\tpublic void onCreate(Bundle savedInstanceState) {\n+\t\tsuper.onCreate(savedInstanceState);\n+\t\tsetContentView(R.layout.notification);\n+\t\t\n+\t\tTextView text = (TextView) findViewById(R.id.textView1);\n+\t\ttext.setText(\"This is a notification....\");\n+\t\t\n+\t\t//Check if the notification new or seen.\n+\t\t\n+\t\tcheckStatus(text);\n+\t\t\t\t\n+\t\ttext.setOnClickListener(new View.OnClickListener() {\n+\t\t\t\n+\t\t\t@Override\n+\t\t\tpublic void onClick(View v) {\n+\t\t\t\t// TODO Auto-generated method stub\n+\t\t\t\tIntent i = new Intent(Notification.this , MainActivity.class);\n+\t\t\t\tstartActivity(i);\n+\t\t\t\t\n+\t\t\t\t//set the notification as seen in the backend\n+\t\t\t\t\n+\t\t\t\tsetSeen();\n+\t\t\t}\n+\t\t});\n+\t\t\t\t\n+\t}\n+\t/**\n+\t * This method is used to set the notification status as seen\n+\t * @author Mohamed Ayman\n+\t */\n+\t\n+\tpublic void setSeen() {\n+\t\t\n+\t\tJSONObject json = new JSONObject();\n+\n+\t\tPutRequest putRequest = new PutRequest(\"http://entangle2.apiary.io/notification/1/set-seen\");\n+\t\tputRequest.addHeader(\"sessionID\", \"testest\");","path":"Entangle/entangle-android/src/com/megasoft/entangle/Notification.java","position":58,"original_position":58,"commit_id":"730f7ee94db4986e6e9821692e8c4e195987399b","original_commit_id":"730f7ee94db4986e6e9821692e8c4e195987399b","user":{"login":"heba-aamer","id":6736779,"avatar_url":"https://avatars.githubusercontent.com/u/6736779?","gravatar_id":"78c5027d3a66c0a8ca96f6e110e379a0","url":"https://api.github.com/users/heba-aamer","html_url":"https://github.com/heba-aamer","followers_url":"https://api.github.com/users/heba-aamer/followers","following_url":"https://api.github.com/users/heba-aamer/following{/other_user}","gists_url":"https://api.github.com/users/heba-aamer/gists{/gist_id}","starred_url":"https://api.github.com/users/heba-aamer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/heba-aamer/subscriptions","organizations_url":"https://api.github.com/users/heba-aamer/orgs","repos_url":"https://api.github.com/users/heba-aamer/repos","events_url":"https://api.github.com/users/heba-aamer/events{/privacy}","received_events_url":"https://api.github.com/users/heba-aamer/received_events","type":"User","site_admin":false},"body":"please use the variable that corresponds to sessionId instead of \"testest\", you could get it from the sharedPreferences.","created_at":"2014-04-24T22:19:02Z","updated_at":"2014-04-24T22:19:02Z","html_url":"https://github.com/ndomar/megasoft-14/pull/251#discussion_r11975611","pull_request_url":"https://api.github.com/repos/ndomar/megasoft-14/pulls/251","_links":{"self":{"href":"https://api.github.com/repos/ndomar/megasoft-14/pulls/comments/11975611"},"html":{"href":"https://github.com/ndomar/megasoft-14/pull/251#discussion_r11975611"},"pull_request":{"href":"https://api.github.com/repos/ndomar/megasoft-14/pulls/251"}}}}