MobileFirst paltform: Using Java in JavaScript adapters - ibm-mobilefirst

I am working on MobileFirst platform for hybrid app development. I am following this tutorial as I want to use my existing java classes for web service call. And It is working fine on Android.
https://developer.ibm.com/mobilefirstplatform/documentation/getting-started-7-0/server-side-development/using-java-adapters/
Does this works across all platforms. I want to run the same in Windows Phone also.Will this adapter be called on Windows Phone. What is the scope of using Java in JavaScript adapters.

Adapters are sever-side entities. The Java code is executed on the Server and so it does not matter from which client-side application you are calling the adapter from, be it Android or Windows Phone or anything else.

Related

Unable to make calls to MobileFirst Platform server in preview

I'm having problems debugging/previewing my app in any browser with the command mfp app preview. I don't see any network related calls in the debugger in Chrome. CORS is enabled. Its an Ionic 2 app (cordova).
Running the app in the emulator or on a real device works perfectly fine with the same code.
I'm using MobileFirst Platform 8.0 hosted on BlueMix.
For app preview in MobileFirst 8.0 use command
mfpdev app preview
MobileFirst applications can access resources using the WLResourceRequest REST API.
I suggest that you will take a tour of the MobileFirst Resource request from JavaScript in MobileFirst Foundation 8.0.
https://mobilefirstplatform.ibmcloud.com/tutorials/en/foundation/8.0/application-development/cordova-apps/
https://mobilefirstplatform.ibmcloud.com/tutorials/en/foundation/8.0/application-development/resource-request/javascript/
https://mobilefirstplatform.ibmcloud.com/tutorials/en/foundation/8.0/bluemix/using-mobile-foundation/

Implement mobilefirst service in ios app

In IBM bluemix, i basically have to use mobileFirst service to host my ios application being implemented in it. I have seen several tutorials and stack overflow search for that but didn't got any satisfactory answer from that. If you can provide any sequential tutorial for that will be very helpful.
Set up your Mobile Foundation service instance, as instructed in the following doc: https://mobilefirstplatform.ibmcloud.com/tutorials/en/foundation/8.0/bluemix/using-mobile-foundation/
Create an iOS application. It can be a native app or a Cordova app with the iOS platform.
Add the MobileFirst SDK to the application by following the instructions per the required platform, here: https://mobilefirstplatform.ibmcloud.com/tutorials/en/foundation/8.0/application-development/sdk/
Register the application in the server. You can do this either via CLI or via a graphical interface. You can see a "quick start" way, here: https://mobilefirstplatform.ibmcloud.com/tutorials/en/foundation/8.0/quick-start/
Basically, to register an app from the command-line, simply navigate to the app root folder and run the command: mfpdev app register.
To ensure the connection between the server and client, you can make a simple call to obtain a token. You can find this code in the Quick Start docs mentioned above.
For iOS, be sure to enable "Keychain Sharing" in Xcode.

Invoke Java Adapter in Desktop Browser Environment MobileFirst

I want to execute a java code in MobileFirst Client App Desktop Environment.
In this link I can invoke Java classes from the adapter but I don't want that method since I need to update the war file in our server if I do this.
https://mobilefirstplatform.ibmcloud.com/tutorials/en/foundation/7.0/server-side-development/using-java-adapters/
I want a way without updating the war file in the server.
I also tried using WLResourceRequest to invoke a Java Adapter but its not applicable in desktop environment.
Is there a way to execute a java code aside from the ones I mentioned above?
In v7.x, the only way to execute Java code is when the class resides in the .war file that gets deployed to the server.
The Desktop environment in v7.1 does not support Java adapters. The only way is to use Java in JavaScript adapters (See: https://mobilefirstplatform.ibmcloud.com/tutorials/en/foundation/7.1/server-side-development/javascript-adapters/using-java-adapters/) but this, too, requires the Java code to reside in the war file.
In v8.0, however, there is no more war file deployment and Java adapters support the web platform (which means both mobile web and desktop browser). Consider upgrading.

MobileFirst JavaAdapter on Bluemix

Recently, I have registered on IBM Bluemix. I've created a Mobile Foundation Service which also creates a Container.
I started a new MobileFirst Project on Eclipse and deployed a JavaAdapter. The adapter works fine in my machine, and the endpoint url is http://localhost:10080/{My project name}/adapters/{My adapter name}.
I went to the mfpconsole of the Mobile Foundation Service (where the url is like {my custom name}.bluemix.net/mfpconsole and uploaded the same adapter.
My question is: What is the endpoint url where I can find my adapter?
I see in this documentation:(https://www.ibm.com/support/knowledgecenter/SSHSCD_7.1.0/com.ibm.worklight.dev.doc/devref/c_adapters_endpoint.html) that there's a "Context," but I don't know where to find this "Context" name. I received the message "Context Root not found."
Thanks in advance!
You can go into your adapter in the console and view the swagger docs (View Swagger Docs).
In addition to what Dora wrote, please note that you're using Mobile Foundation service, which is based on MobileFirst Foundation 8.0, but creating Java adapters in MobileFirst Foundation 7.1
You may be able to deploy these adapters, but you will quickly find out that things have changed dramatically.
I suggest that you will follow the v8.0 documentation, including how to create adapters for v8.0: https://mobilefirstplatform.ibmcloud.com/tutorials/en/foundation/8.0/adapters/

Windows Phone development

I want to develop a softphone application for Mobile Phone platform (Mobile phones using Windows Mobile 7.1 or Higher) that is independent from the PBX, so that it can works with Asterisk, Askozia , 3CX, and any other kind of VoIP PBX, without the need to put other software inside and/or PBX. I know that this kind of applications exists, since I used it on other platforms, like 3CX client or BRIA client, both for iOS. I have all Microsoft tools and sdk needed to build that kind of applications, correctly configured and working. I already built other apps for Mobile Phone platform.
I had found a free trial version of Ozeki VoIP SIP SDK and I downloaded the latest version of the library from http://voip-sip-sdk.com/p_21-download-ozeki-voip-sip-sdk-voip.html and installed it. While I was easily able to build the sample softphone projects, I didn't understand how to build a softphone for mobile phones. Since I saw that softphone related class are in VoIPSDK.dll, I also tried to add reference to VoIPSDK.dll in Windows Phone Project, but Visual Studio gives an error complaining about "unsupported library".
So, what I need to now, since this is our main purpose, is it possible with this library to build a softphone for mobile platforms? In case, may I have a sample or the instruction on how to use Ozeki SDK library on these platforms? Maybe, I should create another application (the mediagateway) that should sit between the pbx and the mobile phone app. Have you got any experience with this library and mobile applications?