Using phonegap app as alternative entry point for existing blackberry app? - blackberry

I have an existing blackberry app that has 2 modules. A background service and a screen that comes up when a call is made. At the moment there is no icon on the home screen.
I want to create a phonegap app and make it the app that opens when the icon is pressed on the home screen. So the installation package would consist of 3 modules. A background service, a single screen and a phonegap app.
is this possible?
thanks for your help!

Yes it is.
When you specify an alternative entry point you may also specify an icon and an application argument. The application argument will allow you to distinguish which of your modules is being launched and the icon will be placed in your phones download folder.
If you are using eclipse these options are both listed to the right of where you specified your entry point.
Assuming the entry point argument name you choose is "phonegap" your main might look something like this:
public static void main(String[] args)
{
if( args.length > 0 && args[ 0 ].equals( "phonegap" ) )
{

Related

Appcelerator - How to add Universal Links support in iOS9 App

I want to allow my users to open our app (if installed, otherwise redirect to App Store App page), whenever user clicks web url of our website.
I found that Universal Links is a way to go for the said requirements from iOS-9 onward. I also know the points to be covered on Web server and Apple Developer portal.
The only question is How do I enable Associated Domains in Appcelerator Titanium app?
Thanks in advance for any clue or help.
We have working universal links for both ios + android on our production apps with this process (based off of AppC Handoff Sample App:
1) Add associated domains on Apple Dev Center to the app -> This will generate a new provisioning profile which you will want to use to build in Titanium.
2) You need to explicitly edit your Entitlments.plist file, usually this is auto generated by Ti. To get a copy of this file do the following:
a) Build app for device
b) Navigate to project\build\iphone
c) Find the generated Entitlments.plist file
3) Copy this file over to your project's root folder and add the following under the "dict" node:
<key>com.apple.developer.associated­domains</key>
<array>
<string>applinks:www.example.com</string>
</array>
This should create the necessary data to bind app to the correct website for linking.
4) Now to actually capture the deeplinking click + url you need to listen to the following event: Ti.App.iOS.continueactivity
ex:
Ti.App.iOS.addEventListener('continueactivity', function(e){
//Since this event can be fired from multiple cases
//we need to check if it was a deeplink that fired it
if(e.activityType === "NSUserActivityTypeBrowsingWeb"){
//Since it WAS from a deeplink, the event response contains some
//other useful data (see the docs link)
var deepLinkURL = e.webpageURL;
//From here you can navigate the app to a relevant page etc...
}
};
Sadly, this functionality was broken in sdk 5.X, it was fixed here: TIMOB-20220 (a one liner) but it won't be included in an official .GA sdk until 5.4.0 from what I hear (which is scheduled for release in June).
If you have further questions the Ti Slack group chat is a great place to ask as well (a whole bunch of active users).

Launching a different ios app, within an app

I'm writing a basic application using xcode 5.1. One of the features I'm interested in trying to do is to launch another app or move to other part of iphone, INSIDE the app already running.
Eg. I have an app with 3 menu options, 1 and 2 do certain tasks as part of this parent app, menu option 3 launches another app that's installed on the phone. I'm not sure if this is possible?
No you can not do that. Besides the documented URL handlers, there's no way to communicate with/launch another app.
This is part of the sandbox principle of apple:
https://developer.apple.com/library/ios/documentation/iphone/conceptual/iphoneosprogrammingguide/TheiOSEnvironment/TheiOSEnvironment.html
What you can do is launch another app by using custom URL-Schemes
http://mobile.tutsplus.com/tutorials/iphone/ios-sdk-working-with-url-schemes/

simulate driving a route in device -iOS

I have a location based app that provides information for a driving trip in real time. I would like to test that app in device. How can I mock an entire trip without actually driving. I see a solution exists for Android through mock location apps, is there anything similar for iPhone as well? I would appreciate any pointer. Thanks for your help.
Yeah you can create a GPX file and load it in XCode.
When you start debugging an app in xcode on the bottom where the debugging logging is there is the breakpoint |> and || and there you will see a location icon (see image, black icon all the way to the right). Click that and it will give you option to add GPX file. Generate a GPX file of the route you want and when you load it the phone / simulator will automatically go through those points

Locate an iOS app or folder

I would like to write an app that would let a user locate an app or folder.
For example a user would like to find: Widget
The app would return:
The Widget app is located on screen 4 < in the Thingamagigs folder >
or
The Widget folder is located on screen 4
What commands would I need?
This is not possible in iOS 5, there is no public API that would give you access to this information.
I don't think that functionality is available in the iOS SDK, App's are pretty much sandboxed and unable to do very much at all with information about other apps.
(Also, why not just use the search feature of iOS?)

Deleting an Application from 8830

We have developed an application for 8830 Device and its working fine.
The problem that we are facing now is that, we are unable to delete the application from the device.
We selected the application, pressed the menu button, but dont find any delete option.
We went to the applications list, through advanced options, but surprisingly we dont see our application in that that applications list(By Deploying the same application in higher devices such as 9630 and 9550,9800) we see a delete option, by pressing menu and also see our application in the options->application list.
We went to modules, and identified the modules of the application, but there also we were not able to find the delete option in it.
We also tried using the blackberry desktop software too, but in vain, we dont find our application in that list too
** The current device we are using is not configured with any BES(We are registered with the BIS) And moreover, we are able to delete the yahoo messenger, gtalk, twitter from the mobile except our application(It just behaves like some shortcut).
Do we need to add some extra lines of code in any class so that it gets identified as an application.Kindly help on this.
Thanks in advance,
Dheeraj Jami
Usually when an application installed via BB Desktop Manager + .alx file or wirelessly (Browser + jad file) the application is listed in the applications list and can be deleted by end-user without any problems.
But if the application installed via javaloader or cod file created automatically via RIM SDK then the application won't be listed in the application list.
The working way to delete unwanted cod file(s) is using javaloader.exe that comes with JDE distribution package.
Connect your device to the desktop computer via usb-cable and type the command in command line, when you are in folder where javaloader.exe located:
javaloader -usb erase -f unwantedfile.cod
and press Enter
Do we need to add some extra lines of code in any class so that it gets identified as an application.
No, you don't. From my experience it just happens sometimes with BlackBerries. In this case the only way to get rid of it is to pull the battery out of the device. This action resets the device to its factory state (all apps installed by user will be lost).

Resources