);

return

batteryLevel

Finally, complete the setMethodCallHandler() method added earlier.
You need to handle a single platform method, getBatteryLevel(),
so test for that in the call argument. The implementation of
this platform method calls the Android code written
in the previous step, and returns a response for both
the success and error cases using the result argument.
If an unknown method is called, report that instead.

Remove the following code:

call

result

>

// This method is invoked on the main thread.

// TODO

And replace with the following:

call

result

>

// This method is invoked on the main thread.

if

call

method

equals

"getBatteryLevel"

))

int