vecino Well-Known Member Licensed User Longtime User Oct 30, 2014 #1 Hello, How do I tell him to "Android" to be opened the "PDF" files with a particular program/software? Thanks for your help
Hello, How do I tell him to "Android" to be opened the "PDF" files with a particular program/software? Thanks for your help
DonManfred Expert Licensed User Longtime User Oct 30, 2014 #2 Code: Copy Dim i As Intent i.Initialize(i.ACTION_VIEW, "file://" & File.Combine(File.DirRootExternal & "/", "filename.pdf")) i.SetComponent("android/com.android.internal.app.ResolverActivity") i.SetType("application/pdf") StartActivity(i) Android will show all possible apps and the user needs to choose one Upvote 0
Code: Copy Dim i As Intent i.Initialize(i.ACTION_VIEW, "file://" & File.Combine(File.DirRootExternal & "/", "filename.pdf")) i.SetComponent("android/com.android.internal.app.ResolverActivity") i.SetType("application/pdf") StartActivity(i) Android will show all possible apps and the user needs to choose one
vecino Well-Known Member Licensed User Longtime User Oct 30, 2014 #3 Hi, thanks for your help. Then that code, when I open a "PDF", what software will it open with? Upvote 0
DonManfred Expert Licensed User Longtime User Oct 30, 2014 #4 vecino said: Then that code, when I open a "PDF", what software will it open with? Click to expand... If you have installed one or more apps which can be usd to view pdf then android will show you (the user) a list from which he can select the one he want. Upvote 0
vecino said: Then that code, when I open a "PDF", what software will it open with? Click to expand... If you have installed one or more apps which can be usd to view pdf then android will show you (the user) a list from which he can select the one he want.
vecino Well-Known Member Licensed User Longtime User Oct 30, 2014 #5 Thank you, I think that I don't say you well. I have created a pdf viewer and I want that android used my pdf viewer that I have created. How do I say android that it use 'my software', solely? Upvote 0
Thank you, I think that I don't say you well. I have created a pdf viewer and I want that android used my pdf viewer that I have created. How do I say android that it use 'my software', solely?
DonManfred Expert Licensed User Longtime User Oct 30, 2014 #6 I trink that you Need to put intentfilters into manifest... But im Not sure how.. search forum. Im sure you will find something Upvote 0
I trink that you Need to put intentfilters into manifest... But im Not sure how.. search forum. Im sure you will find something
vecino Well-Known Member Licensed User Longtime User Oct 30, 2014 #7 Thank you very much, I still searching Upvote 0
DonManfred Expert Licensed User Longtime User Oct 30, 2014 #8 vecino said: Thank you very much, I still searching Click to expand... See this http://www.b4x.com/android/forum/threads/intent-filters-receiving.28267/ but instead of using <data android:mimeType="image/*" /> Click to expand... you need to use a similar code for pdf´s Probably Code: Copy <data android:mimeType="application/pdf" /> ? I´m NOT SURE... Maybe guru @Erel can confirm this Upvote 0
vecino said: Thank you very much, I still searching Click to expand... See this http://www.b4x.com/android/forum/threads/intent-filters-receiving.28267/ but instead of using <data android:mimeType="image/*" /> Click to expand... you need to use a similar code for pdf´s Probably Code: Copy <data android:mimeType="application/pdf" /> ? I´m NOT SURE... Maybe guru @Erel can confirm this
vecino Well-Known Member Licensed User Longtime User Oct 30, 2014 #9 Thank you very much. I've been watching that link, although it is very difficult for me Upvote 0
vecino Well-Known Member Licensed User Longtime User Oct 31, 2014 #10 DonManfred said: Code: Copy Dim i As Intent i.Initialize(i.ACTION_VIEW, "file://" & File.Combine(File.DirRootExternal & "/", "filename.pdf")) i.SetComponent("android/com.android.internal.app.ResolverActivity") i.SetType("application/pdf") StartActivity(i) Android will show all possible apps and the user needs to choose one Click to expand... This is used to run another application? Thank you Last edited: Oct 31, 2014 Upvote 0
DonManfred said: Code: Copy Dim i As Intent i.Initialize(i.ACTION_VIEW, "file://" & File.Combine(File.DirRootExternal & "/", "filename.pdf")) i.SetComponent("android/com.android.internal.app.ResolverActivity") i.SetType("application/pdf") StartActivity(i) Android will show all possible apps and the user needs to choose one Click to expand... This is used to run another application? Thank you
vecino Well-Known Member Licensed User Longtime User Oct 31, 2014 #11 I've already found. Code: Copy Dim pm As PackageManager Dim In As Intent In.Initialize("","") In=pm.GetApplicationIntent("tutorial.user.com") If In.IsInitialized Then StartActivity(In) End If Upvote 0
I've already found. Code: Copy Dim pm As PackageManager Dim In As Intent In.Initialize("","") In=pm.GetApplicationIntent("tutorial.user.com") If In.IsInitialized Then StartActivity(In) End If