You can use Intent Filters as below in Manifiest.java file for launch and Activity. For this Intent Filters are used in Manifiest.java class in android studio. Generally we create a Splash activity which launches when the app starts. To launch an Activity when the app starts, Intent Filter is used. Here I am receiving the value into a string as above. Put the name of the key that you create in the first argument of the putExtra() method while calling the other class. String name = intent.getStringExtra("key_name") To get values from intent into another class, the getIntent() and getStringExtra () method is used. Create context if you not have in adapter class. Note : Use context.startActivity() in adapter class to call an intent. Intent intent = new Intent(this, SecondClass.class)
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |