Note that there are some explanatory texts on larger screens.

plurals
  1. POSyntax error in Android service
    primarykey
    data
    text
    <p>I use this code for connection to my service, but when I put this line </p> <pre><code>this.bindService(service, conn, flags); </code></pre> <p>I receive error message: <code>syntax error on token "}", { expected after this token ... (1)</code></p> <p>here is all code in my class:</p> <pre><code>package com.flaxa.fixx; import android.app.Activity; import android.content.ComponentName; import android.content.Intent; import android.content.ServiceConnection; import android.os.Bundle; import android.os.IBinder; import android.view.View; public class MainActivity extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } public void butonRunOnlyClickHandler(View target) { Intent activity = new Intent(this, com.flax.trainer.RunOnly.class); startActivity(activity); } public void butonChallengeClickHandler(View target) { } public void butonProgramClickHandler(View target) { } public void butonCalculatorClickHandler(View target) { } ServiceConnection conn = new ServiceConnection() { @Override public void onServiceDisconnected(ComponentName name) { // TODO Auto-generated method stub } @Override public void onServiceConnected(ComponentName name, IBinder service) { // TODO Auto-generated method stub } this.bindService(new Intent("") , conn, Context.BIND_AUTO_CREATE); }; } </code></pre> <p>Can some one help my with bindService function, where I'm wrong??</p> <p>Thanks</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload