Using Stockfish in c# android (xamarin) app I looked at this question

Implement a chess app for Android with Stockfish

but it doesn't seem to be answering what I want to ask. Maybe part of my question is topic for stack overflow forum, but anyway, I try it here first. 

I'm doing android app in c# with xamarin and would like to use Stockfish for analysis and play functions. I already have c++ class working with PC version of engine (uci) and I would like to reuse some of the code like uci parsing. What steps should I do to run Stockfish in my c# app? Also I would like to ask if there are some conditions under which stockfish can/can't be used in android chess app.
Reusing C++ classes in C# is annoying but straightforward. You'll need to know managed C++.


  https://stackoverflow.com/questions/855756/difference-between-native-and-managed-code


gives you what managed C++ is. It is a C++ technology invented by Microsoft, and it works as a layer between C# and unmanaged C++.

There is no reason why you can't do it in C#. You may want two background threads. The first one sends UCI commands to the engine, while the second thread asynchronously wait for engine results.

EDIT

Steps you should follow:


Read what managed C++ is and why you would need it
Make sure you can compile your unmanaged C++ code (regular C++). How to do it depends on your environment
Make sure your can also compile managed C++ code.
Make sure your C# code can call into managed C++
Make sure your managed C++ code can call into unmanaged C++
Now, you should be able to pass a PGN string from C# to your unmanaged C++ UCI parsing code


There is no reason why you can't use the Stockfish engine in Android.