English 中文(简体)
如何通过另一个和roid子发射术语?
原标题:How can you launch Termux through another android app?

I am working on automating the process of launching the dependencies for an android project. One of the dependencies is launching Termux (Installed through F-Droid not Play store as recommended).

I am trying to launch the installed Termux application through another application and add some commands to its ~./bashrc file for the sake of automation. I know that an installed app can be launched trough another android app (more details are here).

I wonder to know if this is possible for Termux as well? I wonder to know if we can use intent concept to launch Termux from an android app as well? If yes what is the Termux package name? I tried using "com.termux" as its packagename in my sample code, but it did not work. In other words, the following line returns null:

Intent launchIntent = getPackageManager().getLaunchIntentForPackage("com.termux");

<>上>

我可以打开另一台安装的器具(我开发并安装在桌旁的纸面上),使用上文所示的“静态”概念(用替代适当的包装名称,而不是用词包名称)。

Note: I have installed the Termux through F-Drioid not google play store.

<>新观测:

  1. I confirmed through Package names application the Termux package name is "com.termux" and its activity class name is also "com.termux.app.termuxActivity"
  2. But seems like the "com.termux" is not accessible through package manager. When i try to pass "com.termux" to the following function it returns false.

任何想法或建议?

public boolean isPackageExisted(String targetPackage){
enter code here
        PackageManager pm=getPackageManager();
        try {
            PackageInfo info=pm.getPackageInfo(targetPackage,PackageManager.GET_META_DATA);
        } catch (PackageManager.NameNotFoundException e) {
            return false;
        }
        return true;
}
最佳回答

http://www.un.org/Depts/DGACM/index_spanish.htm 。 查询Package Visibilitythis article for more info. 否则,您将获得<代码>。 一揽子解决办法 缩略语

<manifest
    <queries>
        <package android:name="com.termux" />
   </queries>
</manifest>

此外,可以通过RUN_COMMANDv0.116/code>, 查询>。

此外,活动名称为:>>com.term.app.TermuxActivity

问题回答

用户0-n com.termux/com.termux.app.TermuxActative





相关问题
Signed executables under Linux

For security reasons, it is desirable to check the integrity of code before execution, avoiding tampered software by an attacker. So, my question is How to sign executable code and run only trusted ...

encoding of file shell script

How can I check the file encoding in a shell script? I need to know if a file is encoded in utf-8 or iso-8859-1. Thanks

How to write a Remote DataModule to run on a linux server?

i would like to know if there are any solution to do this. Does anyone? The big picture: I want to access data over the web, using my delphi thin clients. But i´would like to keep my server/service ...

How can I use exit codes to run shell scripts sequentially?

Since cruise control is full of bugs that have wasted my entire week, I have decided the existing shell scripts I have are simpler and thus better. Here is what I have so far svn update /var/www/...

Good, free, easy-to-use C graphics libraries? [closed]

I was wondering if there were any good free graphics libraries for C that are easy to use? It s for plotting 2d and 3d graphs and then saving to a file. It s on a Linux system and there s no gnuplot ...