how to pass data between 2 components of android?



how to pass data between 2 components of android?..

Answer / Lalit Kumar Verma

There are several ways to pass data between Android components such as Activities and Services. One common method is using Intent extras, where you can put data in the form of primitives, Strings, or Parcelable objects and retrieve it on the receiving side. Another approach is using shared preferences or a singleton class for global data storage. For larger amounts of data, you might consider using an SQLite database or remote services like ContentProviders or REST APIs.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Android OS Interview Questions

How to send SMS in android? Explain with example.

0 Answers  


Describe a real time scenario where android can be used

1 Answers  


Explain fragment.

1 Answers  


What is the APK format in Android?

1 Answers   Arigo Infotech,


How to handle an audio stream for call in android?

1 Answers  


What is main/jni/ directory?

1 Answers  


What is a buildtype in gradle?

1 Answers  


What is an anr?

1 Answers  


What is the permission you need to declare in androidmanifes?

1 Answers  


Can android run exe?

1 Answers  


What is @inject in android?

1 Answers  


How to mention an activity in manifest file?

1 Answers  


Categories