简体   繁体   English

从控制台启动Android应用程序

[英]Android application launching from console

Is it possible to make a console Android app using the Android API? 是否可以使用Android API制作控制台Android应用程序? This application must be hidden in the package manager. 此应用程序必须隐藏在包管理器中。 Can you give me examples? 能给我例子吗? In C++/Java. 在C ++ / Java中。

Do you mean you want a console in Android so that you can type in java commands? 您是否要在Android中使用控制台,以便您可以键入Java命令? If so, then no is the answer. 如果是这样,那么答案是否定的。 Android does not have the option to use reflection. Android无法选择使用反射。 And reflection is needed to create a virtual machine where you can execute commands. 并且需要反射来创建可以执行命令的虚拟机。

The NDK is a toolset that allows you to implement parts of your app using native-code languages such as C and C++. NDK是一个工具集,可让您使用本机代码语言(例如C和C ++)实现应用程序的各个部分。 For certain types of apps, this can be helpful so you can reuse existing code libraries written in these languages, but most apps do not need the Android NDK. 对于某些类型的应用程序,这可能会有所帮助,因此您可以重用以这些语言编写的现有代码库,但是大多数应用程序不需要Android NDK。

http://developer.android.com/tools/sdk/ndk/index.html http://developer.android.com/tools/sdk/ndk/index.html

I think this is what you're looking for, but as the description says, make sure it's what you really need. 我认为这是您要寻找的,但是正如描述中所述,请确保这是您真正需要的。

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

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