Search code examples
androidibm-mobilefirst

Change IP address to run MobileFirst Android app on real device


I want to run a MobileFirst hybrid Android application my real device (Samsung Galaxy S5 KitKat 4.4.2)

My phone and PC are connected on the same network.

How can I change the IP address?? I can't find worklightServerRootURL in the file application-descriptor.xml attached below.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Licensed Materials - Property of IBM
         5725-I43 (C) Copyright IBM Corp. 2006, 2013. All Rights Reserved.
         US Government Users Restricted Rights - Use, duplication or
         disclosure restricted by GSA ADP Schedule Contract with IBM Corp. --><!-- Attribute "id" must be identical to application folder name --><application xmlns="http://www.worklight.com/application-descriptor" id="MoodApp" platformVersion="6.3.0.00.20150214-1702">
<displayName>MoodApp</displayName>
<description>MoodApp</description>
<author>
    <name>application's author</name>
    <email>application author's e-mail</email>
    <homepage>http://mycompany.com</homepage>
    <copyright>Copyright My Company</copyright>
</author>
<mainFile>index.html</mainFile>
<features/>
<thumbnailImage>common/images/thumbnail.png</thumbnailImage>
<android version="1.0">
    <worklightSettings include="false"/>
    <security>
        <encryptWebResources enabled="false"/>
        <testWebResourcesChecksum enabled="false" ignoreFileExtensions="png, jpg, jpeg, gif, mp4, mp3"/>
        <publicSigningKey/>
        <packageName/>
    </security>
</android>


Solution

  • To change the IP address of the MobileFirst server for your Android app follow these steps.

    • Right Click application folder inside the apps folder: Right Click > Build Settings and Deploy Target...
    • Check Build the application to work with a different MobileFirst server box
    • Enter your machine IP address, port number (10080), context (usually project name) http://YOUR_MACHINE_IP:10080/YOUR_PROJECT_NAME
    • Rebuild the application