Home > Mobile >  In Android development, difficulty, the great god give directions
In Android development, difficulty, the great god give directions

Time:12-01

Good android development the great god,

Is self-study Android development, the language is Java, want to try on a page to fill in the content, and then in the main page, is displayed in the MainActivity,
I used to do data transmission, the bundle on the content of the input page,
At the time of with intent, I wrote a
Intent Intent=new Intent (new_experienceActivity. MainAcitivity. Class);
So, want to convey content from the new activity to MainAcitivy, but procedure on running collapse,

I can realize B page input, according to the C page but not achieve the page input B content in the MainActivity, according to the corresponding page program also didn't start to collapse,

Don't know how to change, should seek a great god advice ~

CodePudding user response:

Intent Intent=new Intent (the current page as an example, the target page. The class).

CodePudding user response:

Intent Intent=new Intent (Context, the target page. The class).
What do you want to jump to this is to tell system activity, and then through the intent object put various types of data, the new activity by getIntent accept it

CodePudding user response:

reference 1st floor bigc2001 response:
Intent Intent=new Intent (the current page as an example, the target page. The class).

I use of time, the target page. The class wrote MainActivity. The class, and then run the program, the APP directly to open it, if not directly pass data to the Main

CodePudding user response:

The
reference 2 floor BDMH (ag memghui001) response:
Intent Intent=new Intent (Context, the target page. The class);
What do you want to jump to this is to tell system activity, and then through the intent object put various types of data, the new activity by getIntent accept

If you want, MainActivity to receive data should be how to do intent and bundle

CodePudding user response:

Intent and data format is
 
Intent Intent=new Intent (A, biggest lass);
Intent. PutExtra (" XXX ", "* *");
StartActivity (intent);

There are clear you baidu Intent data transfer tutorial

CodePudding user response:

This I tried, it is the configuration file where there is no good configuration, the authorization of the place

CodePudding user response:

Reference I used the "Android studio summary" to solve problem, gathered together at https://blog.csdn.net/m0_45234510/article/details/105644083

CodePudding user response:

If no activity in the manifest file

CodePudding user response:

The log! The log! The log!