Forum Xamarin.Android
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

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 USMember ✭✭
    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 2019

    @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.