use intent to start activity

DOCCDOCC USMember ✭✭
edited February 2016 in Xamarin.Android

Trying to start another activity, "DataPage.cs", with an Intent,

var m_activity = Intent("DataPage");
this.StartActivity(m_activity);

This gives an error. What should it be?

Tagged:

Best Answer

  • DOCCDOCC US ✭✭
    edited February 2016 Accepted Answer

    Answer is,

    var m_activity = Intent(this, typeof(DataPage));
    this.StartActivity(m_activity);
    

Answers

  • DOCCDOCC USMember ✭✭
    edited February 2016 Accepted Answer

    Answer is,

    var m_activity = Intent(this, typeof(DataPage));
    this.StartActivity(m_activity);
    
  • ErikaBErikaB MXMember ✭✭

    When I try

    var m_activity = Intent(this, typeof(DataPage));
    this.StartActivity(m_activity);
    

    it gives me an error:

    Java.Lang.ClassNotFoundException: md5d4e5006a67f487437a8012c63ad37986.ActivityName
    

    Do you know what it can be?? Please helpme :(

  • robobororoboboro Member ✭✭
    edited September 24

    @ErikaB said:
    When I try

    var m_activity = Intent(this, typeof(DataPage));
    this.StartActivity(m_activity);
    

    it gives me an error:

    Java.Lang.ClassNotFoundException: md5d4e5006a67f487437a8012c63ad37986.ActivityName
    

    Do you know what it can be?? Please helpme :(

    Does the DataPage class exist in your project?

Sign In or Register to comment.