I'm working on RIM HttpFilterRegistry part. Can anyone explain on how to embed (protocol & packageManager class) in a native app with an UI entry point.
Requirement:
To Launch native 3rd party app when a url from BB browser is selected.
Can the registration be done at app installation if permitted or by an alternate entry point
A bit confused on how to implement the HttpFilterRegistry class.
There's little help on BB docs though :(.
There's a similar thread on the forum
How to launch an application from the browser in BlackBerry
You don't implement the HttpFilterRegistry class yourself, you use the one that RIM provides. Just call HttpFilterRegistry.registerFilter() like any other API call. What you do have to implement yourself is a java package that includes a class named Protocol. You then pass the package name to registerFilter(), and the browser will then access your Protocol class when the registered domain is invoked.
Related
I have a customer with an Android app which he wants to be built in iOS. The android app has a feature in which the user can annotate documents. To achieve this the Parent app passes control to a third party Document annotation app, say Adobe reader for example where user annotates the documents and once he is done the control as well as the document is passed back to the Parent app. Is there any way i can achieve the same in iOS i.e pass control to a third party app to annotate documents from within my iOS App.
I have read about URL schemes but that requires the third party app to make changes in their code which i dnt think anybody will agree to. So is there any other way?
I researched all sorts of stuff. So finally the answer is NO.This can't be done in iOS without the third party app making changes in their Appdelegate file to handle the passed URL through URL schemes.
I am building a cocoa touch framework to provide users with services like Login with my app. This framework will be used by all third party apps and use service like Login (Yes indeed like Facebook Framework)
Project overview:
An application (Let's call 'Parent App') written using swift, offers service like Login.
A cocoa touch framework written using swift, invokes parent app to use Login service.
Only requirement is when my parent app logout all the third party app (integrated framework) using login service should logout.
Options:
Option 1: How can I trigger notification from parent app to all third party apps that integrated the framework?
Option 2: How can I share data (Login Status) between my parent app to framework, so when the third party app is launched, I can read the data stored in it?
PS: As I cannot specify the Entitlements to framework and third party apps(which will be developed by some other developer), I believe I cannot share keychain / user defaults. And URL schema cannot be used to share the data as it launches the third party apps.
Do you think I have any other options to handle this?
As per iOS 8.3 we dont have any thing to handle this. Unless user experience is compromised by URL Schema method.
May be in future... iOS 9?
How do you import or display an application inside another application?
It is like, it will be a part of the app where you can use it's functionalities. Maybe in full screen or not in full screen. My thoughts are these are web based and is being opened in a UIWebView to use the functionalities.
Extensions? It's more like "piggybacking".
Here's an example:
https://hub.united.com/en-us/news/web/pages/uber-on-the-united-app.aspx
I'll post an answer regrouping my answer and also #Popeye one that seems valid too.
There may be a few ways to do it, each ones of them may act differently.
The other app offers a public SDK/API/WebServices
As an example, I'll take FaceBook API, that allow you to login giving you a UIViewController (that you can customise), and allowing you to ask for some data through their WebServices (like who are the friends, etc.). You're still inside your app.
The other app offers you a private SDK/API/WebServices
Same as the other one, but it more like a parternship. You're still inside your app.
URL Schemes
The other app gives you a few way to interact with it. They check if the app is installed, and launch it with some parameters, or if not, they may redirect it to the app in the Store, their website, etc. More info about URL Schemes from Apple Doc. You have to check their documentaion to know how to interact with it.
I want to share a link from my app using other applications installed on my iPhone such as Gmail, Facebook, DropBox, WhatsApp etc. In android there is a straight way to do so, just fire an intent and it automatically shows the installed apps through which we can share whatever we want. Is there any such way in iPhone ?
Thanks!
On iOS , app is more separated from each other. The only way to pass data from one app to other is using the URL mechanism. As one example, an app register url scheme "open-me://",you invoked openURL with "open-me://my-link" then that app will launched. That app will define the detail of the URL so it could understand the content.Continue with the example we are using, the text you passed could be either "open-me://A?data=my-link" or "open-me://A?message=my-link". So there are no general solution for all apps.Typically third party app will provide a SDK to make these things easy.
If you don't mind using a kind of large third party library, ShareKit is a good choice. It supports quite some apps.
If you want to know more about this topic,for example sharing files between app. You could start from reading the class reference of UIDocumentInteractionController.This UI component will show a list of app installed on your device which support the URL scheme.
I would like to know if I can develop an application in BB OS (4 - 7) with similar functions to Android/iOs where ;
I would be able to register the app to listen for specific URL's.
I can launch the app via URL.
I can parse data from the URL and use in the app.
For instance in Android I can use Intent Filters like this
<intent-filter>
<action android:name="android.intent.action.VIEW"></action>
<category android:name="android.intent.category.DEFAULT"></category>
<category android:name="android.intent.category.BROWSABLE"></category>
<data android:scheme="http"
android:host="myapp.com"
android:pathPrefix="/launchapp/" />
</intent-filter>
to launch the app upon laoding a url such as
i can then parse the two numbers after launchapp/ and use them within the application.
Anyone experienced with BB OS know if this is possible?
I am not aware about documented listeners to intercept opened URLs. But there is GlobalEvent mechanism. Almost every step doing on pre-BB10 OS fires one or more global events. Some of them are documented, some not.
There are documented GUID's listed: http://www.blackberry.com/developers/docs/7.0.0api/index-files/index-7.html (look for G letter, and scroll down for GUID_xxxx constants).
To catch undocumented GUIDs, implement a background application, that uses GlobalEventListener. Then open a page in browser and log all global event guids and objects which come along with guids to eventOccurred call. And you can find out, which global event guids are related to url-open event. It will help to create URL interception mechanism. And this part should be a native application (written on Java).
It is possible to launch application via url, but it should be WebWorks application. Not a native one. Check this link: http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/Launch-BlackBerry-WebWorks-app-via-URL-with-parameters/td-p/1674663
When your webworks application has done its part of work, it can fire GlobalEvent and your native app will wait for it to intercept it and work further.
There are some ways of doing this on BBOS depending on what exactly you want.
Create a browser plugin using the net.rim.device.api.browser.plugin API. Here you create a BrowserContentProvider and attach it to the BB browser for handling a particular mime type. This mime type must be unique to you that is not being handled by the native browser (say x-vnd-whatever/myapplauncher) . When the browser access your url, say http://myapp.com/launchapp/233, serve a file with the number 233 and the registered mime type. The browser will download the file, see its mime type and then pass the file content to your plugin for handling. Your plugin will read the app id - 233 and then do whatever you want with it. BlackBerry App World uses this method to allow developers to launch their app in app world from a url.
Create a HttpFilter. Using this, you can make connections to a given domain pass through your code. Here you will register your filter for your domain myapp.com and whenever someone tries to access any myapp.com, the browser will call your filter to handle the request. Again BlackBerry App World does this for access to http://appworld.blackberry.com domain. [There is a HttpFilterDemo in the samples to help you]
Use the StringPattern API. Almost all native text fields support it. So if there is a text field with text written that matches a particular pattern it will become underlined and clicking on it will show your custom actions in the Menu. [There is a StringPatternDemo in the samples to help you]
If your app is in App World and you just want to launch it, use the URL http://appworld.blackberry.com/webstore/content/xxxx where xxxx is your app's content id.
Moreover, there is no use trying anything with Global Events. Since OS 4.5, the global event broadcast mechanism has been partitioned in such a way that the system events are only delivered to system applications and not to their party apps and vise versa.
Hope this helps.