Requirements: AutoNotification, AutoInput.
STEP 1 - CREATE PROFILE
In Notification Title you should enter the notification tilte of your device Android version. The notification title in this tutorial can be different than this on your device. Enter the exact title text of your notification.
- Connect the phone to PC with USB.
- Create a Tasker event profile with the AutoNotification Intercept condition.
- Tap Action Type and choose Created.
- In Notification Title enter the title of the notification to intercept: USB charging this device.
STEP 2 - CREATE TASK
In Field Text you should enter corresponding text of your device Android version. The "transfer files" text in this tutorial can be different than this on your device. Enter the exact text you have on your USB popup window.
- Create New Task.
- Add Autonotification Actions action.
- Enter %antouchaction in Intercept Action ID.
- Add AutoInput Action.
- Action set to Click, Field Type to Text.
- In Field Text enter the text to click: Transfer files.
- Add Flash action to comunicate the task is executed.
- Disconnect the phone from USB.
STEP 3 - TEST
Once you connect the phone to the computer, USB for file transfer will be activated.
Automatically activate USB file transfer (MTP) connection with the computer
Create profile to enable MTP USB connection of the phone when connected to PC.