question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bug: cannot use NFC ReadCard application when io.appium.settings running on Android Phone

See original GitHub issue

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

I’m testing NFC card. using C# language. when killed package " io.appium.settings", NFC ReadCard test item can read info NFC card. but when io.appium.settings running on Phone, cannot read. if io.appium.settings has supported. how to enable NFC for Android Test Item?

Expected Behavior

Read value of NFC card.

Minimal Reproducible Example

                AppiumOptions options = new AppiumOptions();
                options.AddAdditionalCapability(MobileCapabilityType.DeviceName, "Android");
                options.AddAdditionalCapability(MobileCapabilityType.PlatformName, "Android");

                options.AddAdditionalCapability(MobileCapabilityType.Orientation, "PORTRAIT");
                options.AddAdditionalCapability("appium:appPackage", "com.google.android.dialer");
                options.AddAdditionalCapability("appium:appActivity", "com.google.android.dialer.extensions.GoogleDialtactsActivity");
                //noReset=false->remove app end test
                options.AddAdditionalCapability(MobileCapabilityType.Orientation, "PORTRAIT");
                options.AddAdditionalCapability("appium:noReset", true);
                options.AddAdditionalCapability("appium:getMatchedImageResult", true);
                //options.AddAdditionalCapability("appium:autoGrantPermissions", true);

                //options.AddAdditionalCapability(MobileCapabilityType.NEW_COMMAND_TIMEOUT, Constants.TIMEOUT);
                options.AddAdditionalCapability(MobileCapabilityType.NewCommandTimeout, TimeSpan.FromDays(3).TotalSeconds);
                //options.AddAdditionalCapability(MobileCapabilityType.NewCommandTimeout, TimeSpan.FromMinutes(2).TotalSeconds);

                Uri url = new Uri(_windowsApplicationDriverUrl);

                _driver = new AndroidDriver<AndroidElement>(url, options);
                _driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(5000);

Environment

  • Operating system: win 10
  • If running via appium CLI…
    • Appium CLI version (output of appium --version): 1.22.3
    • Node.js version (output of node --version): v18.12.1
    • npm version (output of npm --version): 8.19.2
    • Last appium version which did not exhibit the problem:
  • If running Appium Desktop, its version:
  • Appium driver(s) and their version(s): Appium.WebDriver 4.3.2
  • Appium plugin(s) and their version(s):
  • Platform and version under test:
  • Real device or emulator/simulator:

Link to Appium Logs

No response

Futher Information

No response

Issue Analytics

  • State:open
  • Created 9 months ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
KazuCocoacommented, Dec 23, 2022

I’m not so familiar with NFC related implementation in Android, but I wonder if it gets restricted when the device has a background process which has some of https://github.com/appium/io.appium.settings/blob/master/app/src/main/AndroidManifest.xml#L6-L29 permissions, or something

I found https://stackoverflow.com/questions/57202157/android-nfc-read-fails-after-fullscreen-launcher-app-comes-from-background

So… I wonder if without https://github.com/appium/io.appium.settings/blob/6214c0a74510c3ad5b4bdf0740bb56724622d8e6/app/src/main/java/io/appium/settings/Unlock.java#L28-L29 one can work. Could you try out without these flags?

1reaction
KazuCocoacommented, Dec 25, 2022

You also could try out Appium 2 and UIA2 driver 2.12.1

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting - Appium
Troubleshooting Appium; General; If you're running Appium.app ... If you get a message saying the app can't be updated, re-download it from appium.io....
Read more >
Can't run tests unless I restart io.appium.settings - Issues/Bugs
So I have this problem where I can not start my app, unless I kill io.appium.settings in adb. How it woks is: The...
Read more >
Unable to find package: io.appium.settings - Issues/Bugs
i see ''package=io.appium.settings'' but i have this message ... and i can't uninstall it ... adb uninstall io.appium.uiautomator2.server.test
Read more >
Appium Settings app is not running after 5000ms" - Issues/Bugs
getting this error while running the working script on the phone previously it was working fine for the same phone but now after...
Read more >
Appium 1.9.1 issues setting location on Android Device
I 'm using fake gps app to mock the location. Once I set the fake location in device using fake gps app, I...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found