Thx for giving me time to think about the problem a bit longer, so I found
the solution. For all out there how may have the same problem let me post
the answer:

To keep the display of your android device active use the PowerManager as
the following:

public class SomeClass : Activity
{
    Android.OS.PowerManager m_pm;
    Android.OS.PowerManager.WakeLock m_wl;
    ...
    private void SomeMethode()
    {
        m_pm = (PowerManager)this.GetSystemService(Service.PowerService);
        m_wl = m_pm.NewWakeLock(WakeLockFlags.ScreenBright, "tagName");

        m_wl.Acquire();
        // Everything happen between these Methode-Calls happen by active
screen
        m_wl.Release();
    }
}

To use this code your apps needs the permission "WAKE_LOCK"

--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/Keep-Screen-active-tp5709961p5709970.html
Sent from the Mono for Android mailing list archive at Nabble.com.
_______________________________________________
Monodroid mailing list
[email protected]

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

Reply via email to