简体   繁体   English

如何使用 Jetpack Compose 创建“方案”?

[英]How to create "schemes" with jetpack compose?

In my Android Studio app projects I registered all activities, services, receivers etc. in the manifest .在我的 Android Studio 应用程序项目 中,我在清单中注册了所有活动、服务、接收器等 I also could define schemes like:我还可以定义如下方案:

myApp://MyMapActivity/x_and_y_coordinates

to open my app with this certain designated Activity and prefilles map area for instance.例如,使用这个特定的指定活动打开我的应用程序并预填充 map 区域。 So I could either start this Activity from other apps or I could create notifications to start these Activities accordingly.因此,我可以从其他应用程序启动此 Activity,也可以创建通知以相应地启动这些 Activity。

Now, I am creating an Android app with jetpack compose, I have one single Activity in which I compose all "views".. How would I be able to go to the map view immediately via jetpack compose?现在,我正在使用 jetpack compose 创建一个 Android 应用程序,我有一个 Activity,我在其中编写了所有“视图”。我如何通过 jetpack compose 立即将 go 转换为 map 视图?

You will have to configure you Activity to receive all intents and use the data provided in it to direct your compose tree to show the view you want.您将必须配置 Activity 以接收所有意图并使用其中提供的数据来指导您的撰写树显示您想要的视图。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM