0

Everything works fine if I run my .NET MAUI app on Windows machine. But if I deploy on Android VM, below code to initialize WTelegram client is giving error as

Access to the path '/data/user/0/WTelegram.session' is denied.'

_client = new WTelegram.Client(int.Parse(API_ID), API_HASH);

I understand that, this is due to the permission issue in creating session file. I changed the code to below as per some suggestions on forums

string SessionPath = Android.App.Application.Context.GetExternalFilesDir("").AbsolutePath + "/WTelegram.session";
_client = new WTelegram.Client(int.Parse(API_ID), API_HASH, SessionPath);

But it gives error as

'Operation is not supported on this platform.'

Does WTelgram client not support Android? Is there an alternate I can use in my MAUI project targeting Android?

1 Answers1

1

For this subject, I would recommend you go to our Github issues page and check for existing issues (like this one or that one) or open a new issue.

'Operation is not supported on this platform.'

You'll need to give us more detail if you want to help us identify the cause (callstack with filename & line details)

I know WTelegramClient works under Xamarin/Android, but I personally never tested it under MAUI.

Judging by the Github issues I linked above, other people did and had to redirect the default Console logging to elsewhere.

Wizou
  • 1,336
  • 13
  • 24