logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

SDL_ShowAndroidToast - Shows an Android toast notification.

Availability

       This function is available since SDL 3.2.0.

Simple Directmedia Layer                           SDL 3.2.20                            SDL_ShowAndroidToast(3)

Description

       Toasts are a sort of lightweight notification that are unique to Android.

       https://developer.android.com/guide/topics/ui/notifiers/toasts

       Shows toast in UI thread.

       For the gravity parameter, choose a value from here, or -1 if you don't have a preference:

       https://developer.android.com/reference/android/view/Gravity

Function Parameters

message
              text message to be shown.

       duration
              0=short, 1=long.

       gravity
              where the notification should appear on the screen.

       xoffset
              set this parameter only when gravity >=0.

       yoffset
              set this parameter only when gravity >=0.

Name

       SDL_ShowAndroidToast - Shows an Android toast notification.

Return Value

       for more information.

Synopsis

#include<SDL3/SDL_system.h>boolSDL_ShowAndroidToast(constchar*message,intduration,intgravity,intxoffset,intyoffset);

Thread Safety

       It is safe to call this function from any thread.

See Also