wangnaan 2020-03-27 15:17 采纳率: 0%
浏览 172

怎么样让intent隐式启动第二个程序的时候显示桌面图标?

1、我有一个游戏程序,里面的子游戏启动的时候用的是intent隐式启动,子游戏安装以后
不显示图标,在安装的时候安卓9以后的版本会提示无安卓图标安装风险提示,我现在想让
安装后显示图标,我改过代码以后子游戏就启动不了了,想问问怎么改?
主程序代码如下:

 public void startFish(String s, String s1, int i, String s2, String s3)
    {
        if(i >= 0 && i <= 6) goto _L2; else goto _L1
_L1:
        return;
_L2:
        Intent intent;
        Log.d("OpenFile", "aaaaaaaaaaa1startFish");
        intent = null;
        if(i != 0)
            break; /* Loop/switch isn't completed */
        intent = new Intent("com.xingli.lion_lion");
_L4:
        if(intent != null)
        {
            Bundle bundle = new Bundle();
            bundle.putByteArray("userMessage", aesEnDeCrypt.encrypt((new StringBuilder(String.valueOf(s))).append(" ").append(s1).append(" ").append(HallPackName).append(" ").append(s2).append(" ").append(s3).append(" ").append(System.currentTimeMillis() / 1000L).toString(), mKey));
            intent.putExtras(bundle);
            startActivity(intent);
            finish();
            System.exit(0);
            return;
        }
        if(true) goto _L1; else goto _L3
_L3:
        if(i == 1)
            intent = new Intent("com.xingli.fish_fish");
        else
        if(i == 2)
            intent = new Intent("com.xingli.dantiao.MainActivity");
        else
        if(i == 3)
            intent = new Intent("com.xingli.overfish_fish");
        else
        if(i == 4)
            intent = new Intent("com.xingli.beautyfish_fish");
        else
        if(i == 5)
            intent = new Intent("android.intent.action.queyimen");
        else
        if(i == 6)
            intent = new Intent("com.xingli.joybullaction");
          goto _L4
        if(true) goto _L1; else goto _L5
_L5:
    }

子游戏的代码如下 :、

<?xml version="1.0" encoding="utf-8" standalone="no"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" android:compileSdkVersion="23" android:compileSdkVersionCodename="6.0-2438415" android:installLocation="preferExternal" package="com.xingli.fish" platformBuildVersionCode="23" platformBuildVersionName="6.0-2438415">
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
    <application android:allowBackup="true" android:icon="@drawable/app_icon" android:isGame="true" android:label="@string/app_name" android:theme="@android:style/Theme.NoTitleBar">
        <activity android:configChanges="keyboardHidden|orientation|screenSize" android:label="@string/app_name" android:name="com.xingli.Fish.fishActivity" android:screenOrientation="landscape">
            <intent-filter>
               <action android:name="com.xingli.fish_fish"/>
               <category android:name="android.intent.category.DEFAULT"/>
               </intent-filter>
        </activity>
    </application>
    <uses-feature android:glEsVersion="0x00020000"/>
    <uses-feature android:name="android.hardware.touchscreen" android:required="false"/>
    <uses-feature android:name="android.hardware.touchscreen.multitouch" android:required="false"/>
    <uses-feature android:name="android.hardware.touchscreen.multitouch.distinct" android:required="false"/>
</manifest>

当我把里面改成显示的就启动不起来了。

  • 写回答

1条回答 默认 最新

  • 关注
    评论

报告相同问题?

悬赏问题

  • ¥15 fastreport怎么判断当前页数
  • ¥15 Kylin-Desktop-V10-GFB-Release-JICAI_02- 2207-Build14-ARM64.iso有没有这个版本的系统啊
  • ¥15 能不能通过蓝牙将传感器数据传送到手机上
  • ¥20 100元python和数据科学实验项目
  • ¥15 根据时间在调用出列表
  • ¥15 R 包chipseeker 安装失败
  • ¥15 Veeam Backup & Replication 9.5 还原问题
  • ¥15 vue-print-nb
  • ¥15 winfrom的datagridview下拉框变成了黑色,渲染不成功
  • ¥20 利用ntfy实现短信推送