前提
ホームアプリを作成しています。テストの為再起動した所、ランチャーが起動し作成したアプリは起動しませんでした(設定アプリで確認した所ホームアプリの設定はいいえになっていました)。
パーミッションが効いていないのでしょうか?または別の原因でホームアプリから外れてしまったのでしょうか。
ご教示頂けると幸いです。
実現したいこと
・再起動してもホームアプリとして起動するようにする
発生している問題・エラーメッセージ
デバックしてみた所アプリは落ちませんでした。
該当のソースコード
<application android:icon="@drawable/icon" android:label="@string/app_name"> <activity android:name=".MainActivity" android:launchMode="singleTask" android:label="@string/app_name" android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.HOME" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter>
mainActivity
1 public void onCreate(Bundle savedInstanceState) { 2 super.onCreate(savedInstanceState); 3 4 setContentView(R.layout.main); 5 6 TruckService.setServerAddress(getString(R.string.server_ip)); 7 8 commStatus = (TextView)findViewById(R.id.commStatus); 9 berth = (TextView)findViewById(R.id.berth); 10 message = (TextView)findViewById(R.id.message); 11 button1 = (Button)findViewById(R.id.button1); 12 linearLayout2 = (LinearLayout)findViewById(R.id.linearLayout2); 13 freeMessage = (TextView)findViewById(R.id.freeMessage); 14 button2 = (Button)findViewById(R.id.button2); 15 button2.setOnClickListener(new View.OnClickListener() { 16 public void onClick(View v) { confirmFreeMessage(); } 17 }); 18 imageView = (ImageView)findViewById(R.id.imageView); //Shirakawa.added.2012.09.14 19 imageView.setVisibility(View.INVISIBLE); //Shirakawa.added.2012.09.14 20 batteryImage = (ImageView)findViewById(R.id.battely_image); 21 batteryText = (TextView)findViewById(R.id.battely_text); 22 wifiImage = (ImageView)findViewById(R.id.wifi_image); 23 wifiText = (TextView)findViewById(R.id.wifi_text); 24 timeText = (TextView)findViewById(R.id.time_text); 25 26 /*メニューキー廃止対策*/ 27 batteryImage.setOnClickListener(new View.OnClickListener() { 28 @Override 29 public void onClick(View v) { 30 // TODO 自動生成されたメソッド・スタブ 31 openOptionsMenu(); 32 } 33 }); 34 35 preparePeriodCycler(); 36 37略 38 39 private void preparePeriodCycler() { 40 refreshCycler = getRefreshCycler(); 41 leadAlarmCycler = getLeadAlarmCycler(); 42 messageAlarmCycler = getMessageAlarmCycler(); 43 indicatorCycler = getIndicatorCycler(); 44 statusBarCycler = getStatusBarCycler(); 45 } 46
試したこと
アプリが落ちるからではないかと考えデバックしましたがアプリは落ちませんでした。
補足情報(FW/ツールのバージョンなど)
android10
回答1件
あなたの回答
tips
プレビュー