public class CountryDetectorService extends ICountryDetector.Stub implements Runnable
ComprehensiveCountryDetector
.Constructor and Description |
---|
CountryDetectorService(Context context) |
Modifier and Type | Method and Description |
---|---|
void |
addCountryListener(ICountryListener listener)
Add the ICountryListener into the listener list.
|
Country |
detectCountry() |
protected void |
dump(FileDescriptor fd,
PrintWriter fout,
String[] args) |
protected void |
notifyReceivers(Country country) |
void |
removeCountryListener(ICountryListener listener)
Remove the ICountryListener from the listener list.
|
void |
run()
When an object implementing interface
Runnable is used
to create a thread, starting the thread causes the object's
run method to be called in that separately executing
thread. |
protected void |
setCountryListener(CountryListener listener) |
public CountryDetectorService(Context context)
public Country detectCountry()
public void addCountryListener(ICountryListener listener) throws RemoteException
RemoteException
public void removeCountryListener(ICountryListener listener) throws RemoteException
RemoteException
protected void notifyReceivers(Country country)
public void run()
Runnable
Runnable
is used
to create a thread, starting the thread causes the object's
run
method to be called in that separately executing
thread.
The general contract of the method run
is that it may
take any action whatsoever.
run
in interface Runnable
Thread.run()
protected void setCountryListener(CountryListener listener)
protected void dump(FileDescriptor fd, PrintWriter fout, String[] args)