Follow

Switch navigation to background and foreground example

Introduction

This sample shows how to switch Sygic navigation to background and again to foreground.
The sample is presented with the toggle function, which does the switching back and forth, while it uses the global variable bgmode to maintain the state.

C#

    private bool bgmode = false;

    void Toggle()
    {
        if (bgmode)
        {
            SError err;
            CApplicationAPI.BringApplicationToForeground(out err, 0);
        }
        else
        {
            SError err;
            CApplicationAPI.BringApplicationToBackground(out err, 0);
        }
        bgmode = !bgmode;
    }
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments