Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intune plugin can't be applied to androidTest only module. #149

Open
shubhamgarg1 opened this issue Jan 21, 2023 · 1 comment
Open

Intune plugin can't be applied to androidTest only module. #149

shubhamgarg1 opened this issue Jan 21, 2023 · 1 comment
Labels
Backlog Issue is in the backlog to be worked at an indeterminate future time. Bug

Comments

@shubhamgarg1
Copy link

Describe the bug:
We are not able to apply intune plugin for MAMification on android test only modules. (Modules with plugin id 'com.android.test')
So, if we need to call a method on an activity like onNewIntent, we are unable to do that and get an error. like this:
java.lang.IllegalAccessError: Method 'void com.microsoft.intune.mam.client.app.MAMActivity.onNewIntent(android.content.Intent)' is inaccessible to class

To Reproduce

  1. Clone this repository https://github.com/shubhamgarg1/IntuneCodeCoverageNotWorking/tree/feature/intune_plugin_test_only_module
  2. Run the Example Instrumented test.
  3. Check the above error.

Expected behavior:
We should be able to call methods like those on activity so as to test them.

Screenshots and logs:
java.lang.IllegalAccessError: Method 'void com.microsoft.intune.mam.client.app.MAMActivity.onNewIntent(android.content.Intent)' is inaccessible to class

Intune App SDK for Android (please complete the following information):
-What version of the Intune SDK are you using? Are you using the latest version? Yes
-What platform is your app based in (Java, Xamarin based, Cordova, etc)? Java
-For errors during build, does the app build without Intune SDK integration? No
-For errors post build, does the app launch without being Intune SDK integrated? No
-Who is the customer? Adobe
-Do you see a trend with it only being reproduced on a specific device? No

Is there a way to run Mamification on Test only modules?
You can read more about Android Test Only modules here: https://proandroiddev.com/effective-testing-with-android-test-only-modules-3164ed9b20a0

@Archit-Pikle Archit-Pikle added Bug Backlog Issue is in the backlog to be worked at an indeterminate future time. labels Mar 1, 2023
@Archit-Pikle
Copy link

Hi Shubham,
This is a known issue and is tracked internally by #17339673.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backlog Issue is in the backlog to be worked at an indeterminate future time. Bug
Projects
None yet
Development

No branches or pull requests

2 participants