Trying to launch an IntentService:
package com.rcsreg.exposmart;
import android.app.IntentService;
import android.util.Log;
import android.content.Intent;
public class Sync extends IntentService{
Integer counter = 0;
public void Sync(){
super("Sync");
}
@Override
protected void onHandleIntent(Intent intent){
while(1 == 1){
Log.e("INTENT!!!!", String.format("COUNT IS %d",
counter++));
try{
Thread.sleep(3000);
} catch (Exception e){
}
}
}
}
Compiler says:
[javac] Compiling 2 source files to /home/toby/android/exposmart/bin/classes
[javac] /home/toby/android/exposmart/src/com/rcsreg/exposmart/Sync.java:6:
cannot find symbol
[javac] symbol : constructor IntentService()
[javac] location: class android.app.IntentService
[javac] public class Sync extends IntentService{
[javac] ^
[javac] /home/toby/android/exposmart/src/com/rcsreg/exposmart/Sync.java:11:
call to super must be first statement in constructor
[javac] super("Sync");
[javac] ^
[javac] 2 errors
Thanks,
Tobiah
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en