Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Contributor
Posts: 15
Registered: ‎10-24-2011
My Device: playbook
My Carrier: none

Re: launching other apps

I tried with  navigator_invoke("sys.calculator.gYABgJidBvuZ89m_1j4PV2712.A://",&error);   still not able to launch the app, the call returned -1 value, no description written into error  buffer passed as second argument...

 

 

regards

Arun 

New Contributor
Posts: 6
Registered: ‎10-25-2011
My Device: tablet
My Carrier: trcell

Re: launching other apps

I also need to run 3rd party apps with given parameters (such as playing a specific media file on the video player app).

Best,
Nurhat
Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: launching other apps

It would be really nice if RIM did this by MIME types instead of specific applications. Provide a preference to allow the user to choose what application to use for a specific file type (video, audio, calculator, browsing, email, xmpp, tts, mapping, etc.). Provide an open protocol in what can be passed to the service, etc. Without it, you get a lot of developers duplicating functionality and not allowing the consumer to choose which service they want to use.
BlackBerry Development Advisor
Posts: 417
Registered: ‎10-27-2010
My Device: PlayBook

Re: launching other apps

I can help you with parameter for music app

 

Music

  • music://albums - Launch the Music application and display the "Albums" screen.
  • music://albums/album?id=album_id- Launch the Music application and display the tracklist associated with the specified album_id (which maps to the audio_metadata.album_id field of mmlibrary).
    • ie: music://albums/album?id=3 launches the screen with album_id=3
  • music://albums/album?id=album_id&play=fid- Launch the Music application and display the tracklist associated with the specified album_id (which maps to the audio_metadata.album_id field of mmlibrary) and begin playback at the specified file id (which maps to audio_metadata.fid field of mmlibrary). If this file ID does not correspond to a track in the album, nothing is played.
    • ie: music://albums/album?id=3&play=10 launches the screen with album_id=3 and plays the track with fid=10
  • music://artists - Launch the Music application and display the "Artists" screen.
  • music://artists/artist?id=artist_id- Launch the albums list track browser screen for the specified artist associated with the artist_id (which maps to the audio_metadata.artist_id field of mmlibrary).
    • ie: music://artists/artist?id=3 launches the screen with artist_id=3
  • music://artists/artist?id=artist_id&play=fid- Launch the albums list track browser screen for the specified artist associated with the artist_id (which maps to the audio_metadata.artist_id field of mmlibrary) and begin playback at the specified file id (which maps to audio_metadata.fid field of mmlibrary). If this file ID does not correspond to a track in the artist's albums, nothing is played.
    • ie: music://artists/artist?id=3&play=10 launches the screen with artist_id=3 and fid=10
  • music://genres - Launch the Music application and display the "Genres" screen.
  • music://genres/genre?id=genre_id- Launch the Music application and display the genre tracklist associated with the specified genre_id (which maps to the audio_metadata.genre_id field of mmlibrary).
    • ie: music://genres/genre?id=3 launches the screen with genre_id=3
  • music://genres/genre?id=genre_id&play=fid- Launch the Music application and display the genre tracklist associated with the specified genre_id (which maps to the audio_metadata.genre_id field of mmlibrary) and begin playback at the specified file id (which maps to audio_metadata.fid field of mmlibrary). If this file ID does not correspond to a track in the genre, nothing is played.
    • ie: music://genres/genre?id=3&play=10 launches the screen with genre_id=3 and fid=10
  • music://playlists/playlist?id=playlist_id- Launch the Music application and display the playlist associated with the specified playlist_id (which maps to the playlist_entries.plid field of mmlibrary).
    • ie: music://playlists/playlist?id=3 launches the screen with plid=3
  • music://playlists/playlist?id=playlist_id&play=fid- Launch the Music application and display the playlist associated with the specified playlist_id (which maps to the playlist_entries.plid field of mmlibrary) and begin playback at the specified file id (which maps to audio_metadata.fid field of mmlibrary). If this file ID does not correspond to a track in the genre, nothing is played.
    • ie: music://playlists/playlist?id=3&play=10 launches the screen with plid=3 and fid=10
  • music://songs - Launch the Music application and display the "All Songs" screen.
  • music://songs?play=fid- Launch the Music application to display the "All Songs" screen and begin playback at the specified file_id (which maps to audio_metadata.fid field of mmlibrary).
    • ie: music://songs?play=10 launches the screen and plays the track with fid=10
  • url- URL to the file on the file-system to play. This will only play the specific file and then stop playback.
    • ie: /accounts/1000/shared/music/sampleMp3.mp3 - Launch the Music application in the main screen and begin playing the file located at the specified path.

Note: If the Music application is already open, and another application invokes it with any of the above arguments, the application will still switch to the requested screen and begin the requested operation.

 

Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: launching other apps

[ Edited ]

It would be nice if there was a repository for this (e.g. http://docs.blackberry.com/en/developers) for all PB app categories (music, appworld, etc.) for all the apps and how to register an app that might fall in the same category to take similar arguments (email, im, calculator, contacts, calendar, etc.).

BlackBerry Development Advisor
Posts: 417
Registered: ‎10-27-2010
My Device: PlayBook

Re: launching other apps

I send bug to docs few days ago, hopefully they can update online docs soon.

There is no way to register your own url and launching app by id seems to not work :smileysad:

Developer
Posts: 110
Registered: ‎10-22-2011
My Device: PlayBook, Bold 9650, Dev Alpha A
My Carrier: Sprint

Re: launching other apps

elena,

Even though it doesn't seem to work as desired (right now), have the use cases presented thus far been adequate to show that it'd be desirable functionality to be able to launch an app from another?

I just want to know if we need to be thinking of different legitimate uses. (I have a couple of other things that come to mind, but the apps are nowhere near usable yet, so I've not worried about crossing the bridge over yonder yet.)


Is there a helpful or useful post in this thread? Click the thumbs up on it so that other people can find it more easily!
Like this post too! :smileyvery-happy:
BlackBerry Development Advisor
Posts: 417
Registered: ‎10-27-2010
My Device: PlayBook

Re: launching other apps

Ability to launch one app from another definetely desired functionality and I am really surprized it is not supported now for non-defaults apps, I'll keep digging.

Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: launching other apps

Having an app open a specific app by app-id is desirable, but having an app open a "category" of an app would make the platform more desirable and plug and play like. Categories would be things like email, im, contact, calendar, calculator, filemgr, photo, camera, video, newsrdr, help, ebook, twitter, facebook, music, etc. Each category would have an open "interface" to that app (a url), that ISV could implement apps based on that interface. Then have a preference panel to allow the end user choose which app they want to use for a particular service (apps would need to register each category the app supports).

The platform can be very powerful if apps can act as services to other apps.
BlackBerry Development Advisor
Posts: 417
Registered: ‎10-27-2010
My Device: PlayBook

Re: launching other apps

Yes I am fighting for these features now - ability to register url by 3rd party app, and ability to register mime-type/file extension by 3rdparty app. So app can be launched by url or file type.