I have a class inside which there is another class that extends AsyncTask. As,
public class Dashboard extends Activity {
-------------
--------------
--------------
public class getUnreadMessageCount extends AsyncTask {
protected JSONObject doInBackground(){
*********some database stuff************
}
protected void onPostExecute(JSONObject json) {
count = Integer.parseInt(json.getString("messsage_count"));
// Set Text to the textview
messageCount.setText(count);
}
}
}
Now I am using GCMIntentService Class for notification. How can I call and execute the getUnreadMessageCount
in the following
private void sendNotification(String content_id, int type, String msg) {
}
I tried as
private void sendNotification(String content_id, int type, String msg) {
Dashboard dashboard = new Dashboard;
dashboard.Dashboard dashboard----
}
But it does not work. How could I solve this problem.
No comments:
Post a Comment