I've not understood any way to report errors on Android. I use Cxxdroid which comes packaged with SDL2. I could use the terminal and compile the program using clang++; that way I'd have debug text output, but the libraries and includes are hidden away. I don't have access to that information.
SDL_ShowSimpleMessageBox is one way, but not the only way? I've had some success but not every use case.
I thought try-catch would work, so I tried this:
try
{
while (!game.isQuit)
{
game.checkInput();
}
}
catch(std::exception &e)
{
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "title", SDL_GetError(), 0);
}
game.quit();
return 0;
}
It's incomplete but you get the idea.
I'll tell you the error which crashed my program...
for(int i = 0; vec.size(); ++i)
The compiler didn't flag it. This crashed because I forgot the test case. My question is how can I log debug text output while using my Android phone?