标签:
以下摘自:http://blong.com/Articles/DelphiXE6AndroidActivityResult/ActivityResult.htm
unit ShowBatteryUsageActivity;
interface
procedure ShowBatteryUsage;
implementation
uses
FMX.Helpers.Android, Androidapi.JNI.GraphicsContentViewText, Androidapi.JNI.Toast;
procedure ShowBatteryUsage;
var
Intent: JIntent;
ResolveInfo: JResolveInfo;
begin
Intent := TJIntent.JavaClass.init(TJIntent.JavaClass.ACTION_POWER_USAGE_SUMMARY);
ResolveInfo := SharedActivity.getPackageManager.resolveActivity(Intent, 0);
if ResolveInfo = nil then
Toast(‘Cannot display battery usage‘, ShortToast)
else
SharedActivity.startActivity(Intent);
end;
end.
标签:
原文地址:http://www.cnblogs.com/1-1-/p/4177674.html