jeudi 4 octobre 2018

Testing android transtionActiviy API

Would like to test my TRANSITION_ACTION_RECEIVER that responds to transition api intents sent. Have captured an intent received when the application receives a transition request from still to walking which is the following:

Intent { act=*package name*TRANSITION_ACTION_RECEIVER flg=0x10 (has extras) }

and has bundle contents of:

[com.google.android.location.internal.EXTRA_ACTIVITY_TRANSITION_RESULT=[69, 79, -1, -1, 52, 0, 0, 0, 1, 0, -1, -1, 44, 0, 0, 0, 1, 0, 0, 0, 36, 0, 0, 0, 69, 79, -1, -1, 28, 0, 0, 0, 1, 0, 4, 0, 7, 0, 0, 0, 2, 0, 4, 0, 0, 0, 0, 0, 3, 0, 8, 0, 64, 28, -116, -93, 17, 20, 3, 0]

Is there a way to generate this intent with bundle for use in my testing process? Have most of the processing logic for activity transitions in a seperate module and have tests for that. Would like to expand my test coverage to include the intent receipt.

Thanks in advance.

Aucun commentaire:

Enregistrer un commentaire