简体   繁体   English

从主应用程序向android库应用程序提供输入

[英]give inputs to android library app from main app

我已经创建了android库项目和主项目。我将库项目连接到主项目。它工作正常。但是我想从主项目中向库项目提供一些输入。在android中可以吗?

Bundle extras=getIntent().getExtras();
    if(extras!=null)
    {
        int initailDelay=extras.getInt("initialDelay");
    }

Try this code for retrieving value 尝试使用此代码获取价值

库是应用程序的一部分,您可以像普通代码一样使用它。

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

相关问题 Android:从主应用程序启动库活动 - Android: Launching Library Activity from Main App 使用来自主应用程序的活动在 android 库中调用 onRequestPermissionsResult - calling onRequestPermissionsResult inside of android library with activity from main app Android:如何从库回调到主应用程序项目? - Android: How to callback from a library to the main app project? 从Android库模块在主应用程序中启动活动 - Launch an activity in main app from an Android Library Module 如何在Android的显示和主要活动中为应用指定单独的名称 - How to give separate name to app at display and main activity in android 如何将Aldiko Android应用程序的库背景赋予android中的Grid View? - How to give the library background as Aldiko Android App to Grid View in android? Android库-是否需要在库和主应用程序中添加编译库? - Android library - Need to add compile lib in both the library and main app? 将应用A中的库插入Android中的应用B中 - inserting library from app A into app B in android 在 Android 项目查询中引用库模块中的主要应用程序资源 - Referencing main app resources in library module(s) in Android project inquiry Android如何模块(库)调用主应用程序功能? - Android how to module (Library) to call main app function?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM