Я создал приложение .NET MAUI. Мне нужно перечислить все профили на моем устройстве Zebra. Как я могу это сделать?
Я пробовал это, но не получил никаких результатов; инструкция if всегда ложна.
public void zebraprofile_list()
{
string EXTRA_GET_PROFILES_LIST = "com.symbol.datawedge.api.RESULT_GET_PROFILES_LIST";
string ACTION_DATAWEDGE_FROM_6_2 = "com.symbol.datawedge.api.ACTION";
string EXTRA_CREATE_PROFILE = "com.symbol.datawedge.api.CREATE_PROFILE";
var profiles = new List();
global::Android.Content.Intent dwIntent = new global::Android.Content.Intent();
dwIntent.SetAction("com.symbol.datawedge.api.ACTION");
dwIntent.PutExtra("com.symbol.datawedge.api.GET_PROFILES", false);
SendDataWedgeIntentWithExtra(ACTION_DATAWEDGE_FROM_6_2, EXTRA_GET_PROFILES_LIST, "");
if (dwIntent.HasExtra("com.symbol.datawedge.api.RESULT_GET_PROFILES_LIST"))
{
Console.WriteLine("Tem extra");
}
}
private void SendDataWedgeIntentWithExtra(String action, String extraKey, String extraValue)
{
global::Android.Content.Intent dwIntent = new global::Android.Content.Intent();
dwIntent.SetAction(action);
dwIntent.PutExtra(extraKey, extraValue);
_context.SendBroadcast(dwIntent);
}
Подробнее здесь: https://stackoverflow.com/questions/791 ... g-net-maui