9/10/2013

How To Set Default App for Various Categories via Tasker

Sometimes we want to set default application for some certain actions.(Just like building associations) Following figure shows the dialog of setting default app for audio player.


You can use Default App Manager or change the setting manually.(refer here for more information)

Following figures show the UI of Default App Manager.




Recently I came up with an idea about how to set default app for various categories via Tasker.

After looking up information and doing several tests, I can make it through now. Hereinafter I will show you how. Note that you can't set default app in the background silently in Android.

You can callout the dialog of setting default app for various categories after sending specific intent parameters to com.android.internal.app.ResolverActivity. Intents are messages of android applications somehow. You can send intents via the “Send Intent” action directly or “Run Shell” action with specific commands. I suggest you’d better use the “Run Shell” action, because some intents may need some specific limits of authority.(Don’t forget “Run Shell” action have option of using root while “Send Intent” just act as usual) Here we go!

<app.View.Resolver>


Run Shell [ Command:am start -a android.intent.action.VIEW -d "file:///null.apk" -t "application/vnd.android.package-archive" -n "android/com.android.internal.app.ResolverActivity" Timeout (Seconds):0 Use Root:On Store Output In: Store Errors In: Store Result In: ]

<audio.View.Resolver>



Run Shell [ Command:am start -a android.intent.action.VIEW -d "file:///null.mp3" -t "audio/*" -n "android/com.android.internal.app.ResolverActivity" Timeout (Seconds):0 Use Root:On Store Output In: Store Errors In: Store Result In: ]

<audiostream.View.Resolver>



Run Shell [ Command:am start -a android.intent.action.VIEW -d "http:///null.mp3" -t "audio/*" -n "android/com.android.internal.app.ResolverActivity" Timeout (Seconds):0 Use Root:On Store Output In: Store Errors In: Store Result In: ]

<video.View.Resolver>
Run Shell [ Command:am start -a android.intent.action.VIEW -d "file:///null.mp4" -t "video/*" -n "android/com.android.internal.app.ResolverActivity" Timeout (Seconds):0 Use Root:On Store Output In: Store Errors In: Store Result In: ]

<videostream.View.Resolver>
Run Shell [ Command:am start -a android.intent.action.VIEW -d "http:///null.mp4" -t "video/*" -n "android/com.android.internal.app.ResolverActivity" Timeout (Seconds):0 Use Root:On Store Output In: Store Errors In: Store Result In: ]

<image.View.Resolver>
Run Shell [ Command:am start -a android.intent.action.VIEW -d "file:///null.jpg" -t "image/*" -n "android/com.android.internal.app.ResolverActivity" Timeout (Seconds):0 Use Root:On Store Output In: Store Errors In: Store Result In: ]

<image.GetContent.Resolver>
Run Shell [ Command:am start -a android.intent.action.GET_CONTENT -d "file:///null.jpg" -t "image/*" -n "android/com.android.internal.app.ResolverActivity" Timeout (Seconds):0 Use Root:On Store Output In: Store Errors In: Store Result In: ]

<image.Crop.Resolver>
Run Shell [ Command:am start -a com.android.camera.action.CROP -d "file:///null.jpg" -t "image/*" -n "android/com.android.internal.app.ResolverActivity" Timeout (Seconds):0 Use Root:On Store Output In: Store Errors In: Store Result In: ]

<browser.View.Resolver>
Run Shell [ Command:am start -a android.intent.action.VIEW -d "http://null.com" -n "android/com.android.internal.app.ResolverActivity" Timeout (Seconds):0 Use Root:On Store Output In: Store Errors In: Store Result In: ]

<calender.Edit.Resolver>
Run Shell [ Command:am start -a android.intent.action.EDIT -t "vnd.android.cursor.item/event" -n "android/com.android.internal.app.ResolverActivity" Timeout (Seconds):0 Use Root:On Store Output In: Store Errors In: Store Result In: ]

<email.View.Resolver>
Run Shell [ Command:am start -a android.intent.action.VIEW -d "mailto:" -n "android/com.android.internal.app.ResolverActivity" Timeout (Seconds):0 Use Root:On Store Output In: Store Errors In: Store Result In: ]

<epub.View.Resolver>
Run Shell [ Command:am start -a android.intent.action.VIEW -d "file:///null.epub" -t "application/epub+zip" -n "android/com.android.internal.app.ResolverActivity" Timeout (Seconds):0 Use Root:On Store Output In: Store Errors In: Store Result In: ]

<mobi.View.Resolver>
Run Shell [ Command:am start -a android.intent.action.VIEW -d "file:///null.mobi" -t "application/x-mobipocket-ebook" -n "android/com.android.internal.app.ResolverActivity" Timeout (Seconds):0 Use Root:On Store Output In: Store Errors In: Store Result In: ]

<doc.View.Resolver>
Run Shell [ Command:am start -a android.intent.action.VIEW -d "file:///null.doc" -t "application/msword" -n "android/com.android.internal.app.ResolverActivity" Timeout (Seconds):0 Use Root:On Store Output In: Store Errors In: Store Result In: ]

<docx.View.Resolver>
Run Shell [ Command:am start -a android.intent.action.VIEW -d "file:///null.docx" -t "application/vnd.openxmlformats-officedocument.wordprocessingml.document" -n "android/com.android.internal.app.ResolverActivity" Timeout (Seconds):0 Use Root:On Store Output In: Store Errors In: Store Result In: ]

<ppt.View.Resolver>
Run Shell [ Command:am start -a android.intent.action.VIEW -d "file:///null.ppt" -t "application/vnd.ms-powerpoint" -n "android/com.android.internal.app.ResolverActivity" Timeout (Seconds):0 Use Root:On Store Output In: Store Errors In: Store Result In: ]

<pptx.View.Resolver>
Run Shell [ Command:am start -a android.intent.action.VIEW -d "file:///null.pptx" -t "application/vnd.openxmlformats-officedocument.presentationml.presentation" -n "android/com.android.internal.app.ResolverActivity" Timeout (Seconds):0 Use Root:On Store Output In: Store Errors In: Store Result In: ]

<xls.View.Resolver>
Run Shell [ Command:am start -a android.intent.action.VIEW -d "file:///null.xls" -t "application/vnd.ms-excel" -n "android/com.android.internal.app.ResolverActivity" Timeout (Seconds):0 Use Root:On Store Output In: Store Errors In: Store Result In: ]

<xlsx.View.Resolver>
Run Shell [ Command:am start -a android.intent.action.VIEW -d "file:///null.xlsx" -t "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" -n "android/com.android.internal.app.ResolverActivity" Timeout (Seconds):0 Use Root:On Store Output In: Store Errors In: Store Result In: ]

<pdf.View.Resolver>
Run Shell [ Command:am start -a android.intent.action.VIEW -d "file:///null.pdf" -t "application/pdf" -n "android/com.android.internal.app.ResolverActivity" Timeout (Seconds):0 Use Root:On Store Output In: Store Errors In: Store Result In: ]

<txt.View.Resolver>
Run Shell [ Command:am start -a android.intent.action.VIEW -d "file:///null.txt" -t "text/plain" -n "android/com.android.internal.app.ResolverActivity" Timeout (Seconds):0 Use Root:On Store Output In: Store Errors In: Store Result In: ]

<launcher.Main.Resolver>
Send Intent [ Action:android.intent.action.MAIN Cat:Home Mime Type: Data: Extra: Extra: Package:android Class:com.android.internal.app.ResolverActivity Target:Activity ]

You can make a scene to list every one of the “resolver” task above showing as an icon. Every icon is bind to specific task to perform. Then you can set default app for specific categories when the correspondent icon is taped.

Following figure shows a simple UI of my creation.



Note: 
1. AFAIK, you can’t retrieve the default app name for specific categories via Tasker.
2. You can try this tip, if you want to "Control which app is the default for an action (root only)".

19 comments:

  1. I really happy and enjoying to know about How To Set Default App for Various Categories via Tasker with the help of this blog.
    Web Designing Company India | Web Design Company India

    ReplyDelete
  2. Some android applications having various amount of size MB according to the type of mobile devices.It depends upon the version of android.
    Web Design Company | Web Design Companies

    ReplyDelete
  3. I would like to thank for sharing the best information..Its really very interesting article...

    Web Design Services Bangalore | Web Development Services Bangalore

    ReplyDelete
  4. Hi,

    Thanks for sharing a very interesting article about How To Set Default App for Various Categories via Tasker. This is very useful information for online blog review readers. Keep it up such a nice posting like this.

    From,
    Maestro Infotech,
    Web Design Company Bangalore

    ReplyDelete
  5. I actually take care of such information a lot. I'm interested in this specific info for just a while. Appreciate it and also all the best
    Web design company in chennai
    Web development company in chennai
    Mobile app development company in chennai

    ReplyDelete
  6. Site Galleria is a Web development company in Bangalore. It provides other services such as Mobile App Development Services for consumer-facing and corporate environments. We also provide Ecommerce web development services, Digital Marketing and SEO Services. We have a team of experienced SEO professionals who will understand your business and create a strategy to fulfil your commercial objectives. Site Galleria is also recognized as best Digital Marketing company in Bangalore.

    Site Galleria has launched its product called Examin, an online exam software to conduct online examinations, EduInPro - Professional certification training platform, LiveChatSupport - A complete help desk software having FAQ Software, Ticket Management Software, Live Chat box and more.

    Site Galleria also provides Ecommerce web development services across the world. has been delivering custom designed websites, mobile application and is still the leading Website Designing Company in Bangalore. Site Galleria combines technical expertise, proven methodologies, and business domain knowledge of 150+ skilled professionals to deliver high-quality solutions to maintain its reputation as the best Web Development Company in India.

    Services Offered by Site Galleria:
    Web Designing and Development
    iOS App Development
    Android App Development
    SEO Services
    Digital Marketing Services
    PHP Website Development
    Web Hosting and Domain Registration
    CMS and E-commerce Website Development
    Affiliate Marketing Service

    Site Galleria Contact Details:
    #7, 2nd Main, 3rd Phase, JP NAGAR,
    Bangalore-560078
    Email: info@sitegalleria.com
    Phone: 8095942111
    Website: www.sitegalleria.com

    ReplyDelete