In the Activity that represents the final view of your application, i.e. the one that you want the user to see the Toast popup message, add this override code:
private double _backPressTime = 0;
public override void OnBackPressed()
double t = new TimeSpan(DateTime.Now.Ticks).TotalMilliseconds;
if (t - _backPressTime > 2000) // i.e. 2000 milliseconds
_backPressTime = t;
Toast.MakeText(this, "Press back again to exit", ToastLength.Short)
base.OnBackPressed(); // now we can quit
I recently googled “what does Android Power Saving Mode do ?”. There didn’t seem to be many clear answers, in fact the question could mean a few things. So for clarity I mean, what effect does Power Saving Mode have on the applications & services on my device.
It turns out that the Power Saving Mode is in fact a device feature and not part of Android, so I looked a bit closer at my A5 and found the answer.
Simply swipe down on the device to reveal the notification bar, then find press and hold on the Power Saving Mode Quick Connect button.
You will be presented with the Power Saving Mode page. Selecting Restrict Performance will give you even more details and options to tweak the setting as you wish. Very cool.
Restricting Background Data is quite extreme and would probably mean I would not get notifications for things like my email, until I check my phone. So I have that option switched off.
The Android Emulator can be rotated by pressing Ctrl+F12 when the emulator has focus.
I found this useful while developing a game that only runs in Landscape mode. By default the emulator starts in Portrait which makes things interesting if you want to test a Landscape base game or app!