zoukankan      html  css  js  c++  java
  • Android APP安装后不在桌面显示图标的应用场景

    一般情况下是由于特殊情况下,需要隐藏app的启动入口,即在launcher界面不需要显示该入口,会由其他app跳转至。怎么设置如下代码:

     <activity
                android:name=".act.LoadingAct"
                android:screenOrientation="portrait">
                <intent-filter>
                    <action android:name="android.intent.action.MAIN" />
                   <!-- <category android:name="android.intent.category.LAUNCHER" />-->
                </intent-filter>
                <intent-filter>
                <action android:name="com.companyname.others" />
                <category android:name="android.intent.category.DEFAULT" />
                </intent-filter>
            </activity>

     如果出现这个小红叉,没关系的,主要是AS对AndroidManifest.xml进行了校验。直接运行即可,然后你可以在手机的设置里面找到应用管理,就可以找到你的app了。

    启动该app的代码如下:

     Intent intent = new Intent();
     intent.setAction("com.companyname.others");
     intent.putExtra("userId", "xxx");
     startActivity(intent);

      

  • 相关阅读:
    网址
    oracle一些笔记
    GLOBAL_NAMES参数研究
    创建 dblink
    解析grant connect, resource to user语句
    授权
    Bootstrap(转)
    C#操作XML小结(转)
    使用backbone.js、zepto.js和trigger.io开发HTML5 App
    SQLSERVER存储过程基本语法
  • 原文地址:https://www.cnblogs.com/royi123/p/5284928.html
Copyright © 2011-2022 走看看