[英]More than one Parent Activity - How to?
Helo, 直升机,
I want to have my app to do a config for different clouds. 我想让我的应用程序针对不同的云进行配置。
So I need for every cloud a unique class. 因此,对于每个云,我都需要一个独特的课程。 For example this would call the Google Drive class: 例如,这将调用Google云端硬盘类:
Intent i = new Intent(RecordConfigStep2.this, RecordConfigStep3_GDrive.class);
startActivityForResult(i, 1);
For a configuration with Dropbox I need: 对于使用Dropbox的配置,我需要:
Intent i = new Intent(RecordConfigStep2.this, RecordConfigStep3_Dropbox.class);
startActivityForResult(i, 1);
After the cloud configuration the app should return back to "normal" configuration. 在进行云配置后,该应用应返回到“常规”配置。
So it should behave like this: 因此它的行为应如下所示:
In class A the user can choose the cloud. 在A类中,用户可以选择云。
Then in class B and C the cloud will be configured. 然后在B和C类中将配置云。
And back to class D the user can do additional app configuration. 回到D类,用户可以执行其他应用程序配置。
What do I need to write in the AndroidManifest.xml file? 我需要在AndroidManifest.xml文件中写什么?
You should use Intent
. 您应该使用Intent
。
From Activity A, send type, say ia String value which shows the type of Cloud like "gdrive", "dropbox" etc. 从活动A发送类型,例如ia字符串值,该值显示云的类型,例如“ gdrive”,“ dropbox”等。
In Activity B, get the type String, if it equals "gdrive" > Do GDrive Operation else if it equals "dropbox" > Do Dropbox operation... 在活动B中,如果类型等于“ gdrive”>执行GDrive操作,则获取字符串类型,否则,如果其等于“ dropbox”>执行Dropbox操作,则获取字符串类型...
Similarly, Send your data from B > C > D > E 同样,从B> C> D> E发送数据
More info: https://developer.android.com/reference/android/content/Intent 更多信息: https : //developer.android.com/reference/android/content/Intent
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.