androideventsscringo

Scringo Android configure menu button


I am trying to add a button in the menu of Scringo. I wrote this code:

Scringo.setAppId(myId);
scringo = new Scringo(main.this);
scringo.init();
scringo.setEventHandler(new ScringoEventHandler() {
    @Override
    public void onPostItemClicked(String actionId) {
    }

    @Override
    public void onMenuItemClicked(String menuId) {
        Log.i("go","go in Logout");
        if (menuId != null && menuId.equals("salir")) {
            Toast.makeText(main.this, "Logout", Toast.LENGTH_LONG).show();
            Scringo.logout();
        }
    }
});

Log not showing so do not enter the event. Everything else works fine so the only problem is the event.

I hope you can help me.


Solution

  • The onMenuItemClicked method is called only when Scringo is on the sidebar and not called from openMenu or such