サービス クラス VandroidService2 の変数をアクティビティ クラス VandroidServiceClient に渡そうとしています。VandroidService2 にある変数を送信するコードは次のとおりです。
long accel = 8987;
Intent myIntent = new Intent(VandroidService2.this,VandroidServiceClient.class);
myIntent.putExtra("accel1", accel);
VandroidServiceClient で受信するために使用したコードは次のとおりです。
TextView textView = (TextView) findViewById(R.id.textViewName);
Intent mIntent = getIntent();
long lovalue = mIntent.getLongExtra("accel1", 0);
textView.setText(String.valueOf(lovalue));
何らかの理由で、デフォルトの変数 0 が画面に表示されていますか? 私は何を間違っていますか?私を助けるためにさらに情報が必要ですか?