OsmAnd/BatteryLifeLog/src/com/anvisics/battery/BatteryStatusReceiver.java
Victor Shcherb 2b43c07373 initial import
git-svn-id: https://osmand.googlecode.com/svn/trunk@3 e29c36b1-1cfa-d876-8d93-3434fc2bb7b8
2010-04-26 15:20:50 +00:00

22 lines
600 B
Java

package com.anvisics.battery;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
public class BatteryStatusReceiver extends BroadcastReceiver {
private final BatteryLogService service;
public BatteryStatusReceiver(BatteryLogService service){
this.service = service;
}
@Override
public void onReceive(Context context, Intent intent) {
service.receiveMessage(intent.getIntExtra("voltage", -1), intent.getIntExtra("level", -1),
intent.getIntExtra("plugged", -1), intent.getIntExtra("status", -1));
}
}