1

hi i need cursor value from one activity to another but its display null.

public class TitleActivity extends ListActivity {
/** Called when the activity is first created. */
public Cursor titleCursor = null;
public String blogid;
public String language;
public String titleRowid;
public String rowid;
public int COUNT;
public JSONArray jarray;
protected NotificationManager notify = null;
private int requiredSpace = 0;
private String contentUrl = null;
private String updateTitlesUrl = null;
Cursor ePubDownloadCursor = null;
private Cursor deleteTitleCursor = null;
protected String magid;
protected String pdate;
protected int pos;

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    try {

     initializeAllCursors();

    } catch (Exception e) {
        VSLog.error(this.getClass(),
                "Error in start up activity" + e.getMessage());
    }

}

private void initializeAllCursors() {
    try {

        // Contains download status , content and id
        ePubDownloadCursor = managedQuery(
                BlogProvider.Constants.CONTENT_URI,
                ConstantValues.EPUBDOWNLOAD, null, null,
                BlogProvider.Constants.PDATE + " DESC ");

        // Contains deleted status , content and id
        deleteTitleCursor = managedQuery(
                BlogProvider.Constants.CONTENT_URI,
                ConstantValues.EPUBDOWNLOAD, null, null,
                BlogProvider.Constants.PDATE + " ASC ");
        notify = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
    } catch (Exception e) {
        VSLog.error(this.getClass(),
                "Error cursor inizilization" + e.getMessage());
    }
}

i want deletetitle cursor in my another activity how i get plz help...i want know how i get deleteTitlecursor to my another activity because i need to pass that cursor for my another class. but i need deleteTitle cursor titleactivity also

manikandan
  • 11
  • 3

1 Answers1

2

Maybe you can try pass object from one activity to another activity.You can use intent or static variable
Ref: How to pass an object from one activity to another on Android

Community
  • 1
  • 1
ductran
  • 10,043
  • 19
  • 82
  • 165