I am already using a pending intent..So if I use another intent and start that intent it goes to a new activity..I want to avoid that..So without using intents I want to pass data from one activity to another possible?
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
- Android OverlayItem.setMarker(): Change the marker
You can use static Method to get data from one activity to another activity.Below is sample code
First Activity
Second Activity:
Hope it helps you.
How about set up a Global Variable Class and then set it in Activity1 and access it in Activity2 as shown below:
Global variable class file: Global.java
Set the Global variable in file: Activity1.java
Read the Global variable in file: Activity2.java
Beware of memory leaks.
You can try by using Singleton
Then in your 1st activity
and then your 2nd activity
You can try use the global class Application to share the datas you want to send! Just to set the datas before using them!