I am writing an automation test using python, where an android app records an audio and stores it in a specific directory within the internal storage (sdcard0) of the android device.
I need to check whether the recording (recordingX.mp3) actually exists with the same name within the specific directory or not.. If YES, the latest file should be given a new name.
As part of this, I tried writing code.. But I was not able to locate the exact path for the recorded audio..
This is the tree structure of the actual location..
-> Internal Storage -> Maverick ->recording1.mp3 ->recording2.mp3 . . . . >>> import os >>> print os.path.exists('sdcard/Maverick') False >>> print os.path.exists('sdcard/Maverick/recording0.mp3') False >>> print os.path.exists('sdcard0/Maverick') False >>> print os.path.exists('sdcard0/Maverick/') False
Please help me out in writing the code..
Edited 8 Months Ago by Karthik_4