2016-10-06 4 views
1

初めてインストールするためのAndroidプロジェクトがあります。 私の会社合意ページに関連しています。それはGoogleの合意のページの後に来る。初めてのインストールプロジェクトはどのように起動できますか?

私はそれを行うためにいくつかの技術を試しました。たとえば、システムアプリケーションとして設定します。ただし、バックアップとリセット操作時にはクリーニングされます。

誰かがそれを実行する方法を知っていますか? MainActivity.java上のAndroidManifest.xml

<application 
     android:theme="@android:style/Theme.NoTitleBar" 
     android:allowBackup="true" 
     android:icon="@drawable/launcher" 
     android:label="@string/appname" > 
     <activity 
      android:name="xxxagreement.MainActivity" 
      android:theme="@android:style/Theme.NoTitleBar.Fullscreen" 
      android:label="@string/app_name" 
     android:screenOrientation="portrait" > 
      <intent-filter android:priority="3"> 
       <action android:name="android.intent.action.MAIN" /> 
       <category android:name="android.intent.category.HOME" /> 
       <category android:name="android.intent.category.DEFAULT" /> 
      </intent-filter> 
     </activity> 
    </application> 

protected void onCreate(Bundle savedInstanceState) { 
     super.onCreate(savedInstanceState); 
     setContentView(R.layout.activity_main); 
    } 

@Override 
protected void onResume() { 
    Intent i = new Intent(); 
    i.setAction(AGREEGATE_STARTED); 
    sendBroadcast(i); 
    TextView t = (TextView)findViewById(R.id.textView1); 
    t.setSelected(true); 
    ... 
    super.onResume(); 
    } 

イベントログを印刷:

セッション 'アプリ':エラー起動アクティビティ

答えて

0

アプリケーションは」doesnのランチャー活動を持っています。

<category android:name="android.intent.category.LAUNCHER" /> 
でこれらの線

<category android:name="android.intent.category.HOME" /> 
<category android:name="android.intent.category.DEFAULT" /> 

を交換してください

関連する問題