Vevo Video

enrico

Active Member
Licensed User
Longtime User
How can I use Vevo to show videos ?
I've tryed using the video link in a webview but I have audio only (doesn't mind if I have Vevo app installed or not).
Do I have to use Intent ? How ?
 

NJDude

Expert
Licensed User
Longtime User
Try this:
B4X:
Dim i As Intent

i.Initialize(i.ACTION_VIEW, "http://www.billboard.com/video/vevo/NL0110500006")
i.SetComponent("com.vevo/.activities.NewWatchActivity")

StartActivity(i)
 
Upvote 0

dxxxyyyzzz

Member
Licensed User
Longtime User
You can check if the application is installed and if not, install it from the market with:

B4X:
Sub is_instaled
 
   Dim pm As PackageManager
   Dim Packages As List
   Packages = pm.GetInstalledPackages
 
   For i = 0 To Packages.size - 1
      Packages.Get(i)
      Log(Packages.Get(i))
         If Packages.Get(i) = "com.northpard.vevo" Then
            Log ("INSTALED")
            Exit
         Else
            If i= Packages.size - 1 Then
               Log ("NOT_INSTALED")
               Dim market As Intent, uri As String
               uri = "market://details?id=com.northpard.vevo"
               market.Initialize(market.ACTION_VIEW, uri)
               StartActivity(market)
            End If
         End If
   Next 
End Sub
 
Upvote 0

NJDude

Expert
Licensed User
Longtime User
How can I detect if Vevo app is installed and tell the user to get it from market if it's not ?

Something like this (you need to reference the Phone library):
B4X:
Dim pm As PackageManager
Dim Check As Intent

Check = pm.GetApplicationIntent("com.vevo")

If Check.IsInitialized = False Then 

   Answer = Msgbox2("You don't have the Vevo app installed." & CRLF & CRLF & "Do you want to install it?", "App Not Installed", "Yes", "", "No", Null)

   If Answer = DialogResponse.POSITIVE Then
      Dim GooglePlay As Intent
      GooglePlay.Initialize(GooglePlay.ACTION_VIEW, "market://details?id=com.vevo")

      StartActivity(GooglePlay)

   End If         

End If
 
Upvote 0

enrico

Active Member
Licensed User
Longtime User
For a few days now I have some problems with Vevo videos loaded from Intent.
Intent works and loads the video, but it stops after few seconds and often causes forced closures of Vevo app.
It seems that the problem happens less on devices with more memory available.
So I'm thinking whether it is possible with Intent to load the video in medium quality instead of high.
Otherwise is it possible to detect device's features (memory and cpu) to disable worse ones to load video ?
 
Last edited:
Upvote 0
Top