说一下我的看法
1.<category android:name="android.intent.category.HOME" />在清单文件中的receive上加上这句话
2.将你的程序置为/system/app/下
3.安装完成之后首先启动一次应用程序之前也碰到过这种情况,网上都说这是3.0以后的限制,只有系统级别的应用才可以收到开机广播,所以只能把程序放到/system/app下,然后一切ok

解决方案 »

  1.   

    Manifest文件中没有加permission权限吧?
    楼主看我的博客,我这里有记录:
    http://blog.csdn.net/whu_zhangmin/article/details/18654031
      

  2.   

    android4.0.3,将公信卫士装在SD卡中,照样开机自启,崩溃中
    另外,请教u010457784:如何将app装在/System/app/下面?
    请教依然绿茶:如何获得系统权限?
      

  3.   

    app安装在/system/app方法:
    1、要么你是手机厂商,那么eng版本直接adb push到/system/app目录下。
    2、三方应用的话,需要root手机,可以安装一个百度一键root或者360root,root之后,先将apk拷贝到sd
    adb shell
    su
    cp -fr 源apk地址 /system/app获得系统权限:
    厂商就不说了
    上面说的手机root
    要不然除非有手机系统的签名,不然没辙
      

  4.   

    依然绿茶:没有解决!公信卫士和wifi万能钥匙这两个软件在我这台手机上用360手机助手装上,运行一次后,就能开机自启动,按你上述的方法,相信在我的手机上能搞定,可是普通用户这样搞难度就大了,上述两款软件是怎样实现开机自启的?而且公信卫士装在SD卡上也能开机自启!!
      

  5.   

    今天逛论坛看到好多这样的,不知道是太忙没时间上csdn还是神马,就是挺让人不爽的,以后看到id就回答问题了
      

  6.   

    你可以看下这个对你有帮助http://blog.csdn.net/leilu2008/article/details/8933869
      

  7.   

    楼主,你可是用的ndk的方法? 
    http://blog.csdn.net/fangzhibin4712/article/details/38316723
    本人也被困扰了,但是对ndk实在不在行,大家看看这篇文章,如果搞定了,麻烦点播一下,好造福群众,小弟谢过了
      

  8.   

    呵呵 我来告诉你们吧
    有一个解决办法,不一定都适用,反正我的问题解决了。。<category android:name="android.intent.category.HOME" />
    receiver的intent-filter用这个
      

  9.   

    我来结贴吧:
    1.安装应用后,首先要启动一次。
    2.如果签名后,不可以用eclipse安装apk文件,手动安装好后,也要启动一次。
    3.添加以下:
     <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
     <uses-permission android:name="android.permission.RESTART_PACKAGES" />
    4.添加以下:
    <receiver android:name=".BootBroadcastReceiver" >
                <intent-filter>
                    <action android:name="android.intent.action.BOOT_COMPLETED" />                <category android:name="android.intent.category.HOME" />
                </intent-filter>
                <intent-filter>
                    <action android:name="android.intent.action.PACKAGE_ADDED" />
                    <action android:name="android.intent.action.PACKAGE_REMOVED" />
                    <action android:name="android.intent.action.PACKAGE_REPLACED" />                <data android:scheme="package" />
                </intent-filter>
            </receiver>5.代码部分:
    public class BootBroadcastReceiver extends BroadcastReceiver
    {
    @Override
    public void onReceive(Context context, Intent intent)
    {
    //接收广播:系统启动完成后运行程序
    if (intent.getAction().equals(Intent.ACTION_BOOT_COMPLETED))
    {
    Intent ootStartIntent = new Intent(context, Login_Activity.class);
    ootStartIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    context.startActivity(ootStartIntent);
    }
    //接收广播:安装更新后,自动启动自己。      
    if (intent.getAction().equals(Intent.ACTION_PACKAGE_ADDED) || intent.getAction().equals(Intent.ACTION_PACKAGE_REPLACED))
    {
    Intent ootStartIntent = new Intent(context, Login_Activity.class);
    ootStartIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    context.startActivity(ootStartIntent);
    }
    }
    }总结一下,以上功能,开机自动启动,更新后,也会自己启动自己。
      

  10.   

    <intent-filter>
                    <action android:name="android.intent.action.BOOT_COMPLETED"/>
                    <action android:name="android.net.wifi.WIFI_STATE_CHANGED"></action>
                </intent-filter> 我这么写有问题吗,我现在总是接收不到啊,真着急