Android的隐藏的应用程序 [英] Android hidden application

查看:127
本文介绍了Android的隐藏的应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在写一个(合法的)间谍程序。我想使这个程序隐藏在发射(所以没有图标显示)。我试图删除<类机器人:名称=android.intent.category.LAUNCHER/> 从行的Andr​​oidManifest.xml ,但随后的用户不能够在第一次启动模式(配置)的应用程序。谁有什么想法?

I'm writing a (legal) spy program. I want to make this program hidden on the launcher (so that no icon is shown). I tried to remove <category android:name="android.intent.category.LAUNCHER" /> line from AndroidManifest.xml, but then the user can't launch the application in first start mode (configuration). Who have any ideas ?

我该怎么办呢?

推荐答案

您需要让你的应用程序转变为服务。下面是机器人承担创建服务组件:

You need to make your app into a service. Here is Androids take on creating services components:

<一个href="http://developer.android.com/guide/components/services.html">http://developer.android.com/guide/components/services.html

在MobiWare发现这个问题,以及:

Found this as well on MobiWare:

当你要跟踪的手机的使用或收集在用户不知情的一些数据,这可能会帮助你。

When you want to track the usage of the mobile or gather some data without user knowledge,this might help you.

第一步:创建一个没有图标的应用程序。  通常情况下,一个活动被宣布在清单如下:

Step1: Create an application with No icon. Normally,an activity is declared as follows in manifest.

     <activity
        android:label="@string/app_name"
        android:name="org.security.tracker.Tracker-activity" >
        <intent-filter >
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>

删除类别标签,你不会得到应用程序的图标了。 现在,你不再需要的活动。因此删除该段。 但你可能会认为,如何应用程序将运行,没有任何触发或者什么是应用程序的起点。 这是解决方案

Remove the Category TAG ,you wont get app icon anymore. Now,you don't need activity anymore. so remove this segment. BUt you might think,how the app will run without any trigger or what is the starting point of the application. This is the solution.

<!-- Start the Service if applicable on boot -->
    <receiver android:name="org.security.tracker.ServiceStarter" >
        <intent-filter >
            <action android:name="android.intent.action.BOOT_COMPLETED" />
        </intent-filter>
    </receiver>

这会触发写在接收器那里,你可以运行的服务来实现你的想法你的code。

This triggers your code that written in Receiver there by you can run service to implement your thoughts.

 <service android:name="org.security.tracker.serviceCode" />

您需要添加此权限,

 <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />

您code运行时,手机只能重启。

Your code runs when the phone reboots only.

第2步:写你的code

Step 2. Write your code

在重新启动时,recevier会火,但你就可以开始你的服务。

On Reboot,the recevier will fire ,there you can start your service.

class ServiceStarter extends BroadcastReceiver {

@Override
public void onReceive(Context _context, Intent _intent) {

    Intent i = new Intent("com.prac.test.MyPersistingService");
    i.setClass(_context, ServiceCode.class);
    _context.startService(i);
  }

 }

这篇关于Android的隐藏的应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆