This is a migrated thread and some comments may be shown as answers.

Intents/URI Schemes

5 Answers 86 Views
General Discussion
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Richardsonke
Top achievements
Rank 1
Richardsonke asked on 09 Nov 2012, 09:38 PM
Is it possible to fire an Android intent or an external URI scheme (like fb:// or pocketcloud://) to open other applications from inside of an Icenium app?  Thanks.

5 Answers, 1 is accepted

Sort by
0
Ivan K. Ivanov
Telerik team
answered on 13 Nov 2012, 10:20 AM

Hello Keith,


In order to open an external application you need to add the ChildBrowser plugin to Icenium. ChildBrowser will enable you to open an external web page within you Icenium application.

To add ChildBrowser plugin, open Project Properties dialog in Mist -> select Plugins tab -> click Add button -> select Child Browser from the pop up -> click OK. You will notice that a new specifal folder called Plugins has been added to your project tree. If you expand it, you will find the source file of childbrowser plugin. Now you need to add this script file in your project. To do that, open index.html file, find where cordova is included and add Child Browser plugin right bellow it:

<script type="text/javascript" src="cordova.js"></script>
<script type="text/javascript" src="Plugins/Child Browser/childbrowser.js"></script>

Now you are ready to open any web application you like:

window.plugins.childBrowser.showWebPage('http://www.google.com', { showLocationBar: true });

Hope this helps!

Regards,

Ivan K. Ivanov
the Telerik team

Share feedback and vote for features on our Feedback Portal.
Want some Kendo UI online training - head over to Pluralsight.
0
Ivan K. Ivanov
Telerik team
answered on 13 Nov 2012, 03:55 PM
Hi Keith,


Here is some additional info on your question: yes, you can open an external application from inside Icenium if the external application defines a URI schema. For example, if you want to open the Facebook app, you can navigate to it by using an anchor like this:

<a href="fb://profile">Open Facebook</a>

When clicked, this link it will open the Facebook application (if installed) and navigate to the profile page.

Kind regards,
Ivan K. Ivanov
the Telerik team

Share feedback and vote for features on our Feedback Portal.
Want some Kendo UI online training - head over to Pluralsight.
0
Richardsonke
Top achievements
Rank 1
answered on 13 Nov 2012, 09:16 PM
Thanks, I was able to get some links working, but still having problems with others.  Is there any way to open the native Google Maps application (not the website) using a uri?  We were able to Apple Maps to open on an iPhone by using window.location.href.

The ability to do Android Intents would be really helpful in Android because they can do much more than uri and very few apps actually support URIs (since Android focuses on intents).  Any plans on adding a PhoneGap plugin for intents?  Thanks.
0
Ivan K. Ivanov
Telerik team
answered on 14 Nov 2012, 09:26 AM
Hello Keith,

To open Google maps native application you can use the geo:// URI scheme.

I saw that there is already a feature request post for PhoneGap plugin for intends. This post will enable the community to vote for the suggested feature request so we can prioritize it accordingly.

Greetings,
Ivan K. Ivanov
the Telerik team

Share feedback and vote for features on our Feedback Portal.
Want some Kendo UI online training - head over to Pluralsight.
0
Richardsonke
Top achievements
Rank 1
answered on 31 Jan 2013, 04:21 PM
While I was able to make do with URI schemes for a while, the lack of Android intents was holding me back.  In particular, my app will be deployed internally, not via an app store, so upgrading was originally going to be a process of starting a download and making the user select the downloaded file from the notification bar to install.  Also, many apps can't be launched on Android using uri schemes, only intents.

So, I did what all good programmers do, fix it myself! ;-)  I was able to successfully open the apk created by Icenium with apktool, inject the java class required for WebIntent Cordova plugin, repackage and finally re-sign the apk.  I now have fully functional intent support inside of my Icenium app!  This makes it so that I when my app needs an update, I can download the new apk to the cache directory, and then call an intent that starts the upgrade!  This results in a much better user experience.  Hopefully this plug-in can be included in Icenium soon, but in the meantime, I have a batch file to inject the necessary class into the apk whenever I publish.
Tags
General Discussion
Asked by
Richardsonke
Top achievements
Rank 1
Answers by
Ivan K. Ivanov
Telerik team
Richardsonke
Top achievements
Rank 1
Share this question
or