IBM Bluemix MobileFirst Services Starter for Cordova Tutorial 教學

Create an account on https://new-console.ng.bluemix.net/
Search the template: MobileFirst Services Starter, and create it.
螢幕快照 2016-06-04 11.22.21

After that, download the source code from https://github.com/ibm-bluemix-mobile-services/bms-samples-cordova-helloworld

Before installing Cordova, you will require node.js which is downloaded from https://nodejs.org/en/

If you do not have Cordova installed, then type

npm install -g cordova

Update Cordova

sudo npm update -g cordova

Go to the directory of source code, add cordova platform

cordova platform add android
cordova platform add ios

Install the IBM Bluemix plugin
cordova plugin add ibm-mfp-core

Go to /project-dir/www/js/index.js, paste your route & GUID
route: https://your-proj-name/mybluemix.net
GUID: can be found in the first line of Cloud Foundry’s log in the panel

route: ""
GUID: ""

Open xcodeproj in /project-dir/platform/ios/
If it prompts to update latest swift version, cancel it.
Go to build settings tab and edit Objective-C Bridging Header
/your-proj/plugins/ibm-mfp-core/src/ios/Bridging-Header.h
Find Runpath search Path, and add
@executable_path/Frameworks

Build Cordova
cordova build
Then run
cordova run android

Run iOS platform on Xcode
yayconnected


Cloud Foundry

Install CF CLI from https://github.com/cloudfoundry/cli/releases

Install Bluemix CLI from http://clis.ng.bluemix.net/ui/home.html

If this error occurs

panic: Config error: open config.json: permission denied

type

sudo chmod -R 777 ~/.cf

If this error occurs

panic: no supported languages found []string{“zh_TW.UTF-8”}

go to ~/.cf/config.json

set “Local” : “zh-Hant”

Download your project source code

螢幕快照 2016-06-04 12.11.58

go to /proj-dir , type

bluemix login -a https://api.ng.bluemix.net

push your project

cf your-project-name

Now you are ready to build your own project.

How to use Google Map in Android Emulator

Using Google Map, it requires Google Play Service, Google Play Store and Google Map The emulator I chose is Genymotion which claims it’s the fastest emulator for android. Indeed, it is fast. url : https://www.genymotion.com/ create an account, and you can download the free version. After installing Genymotion, we need to flash G-APPS To download GAPPS- 20130813 –>> Here  (For Android 5.0 you may download here, For Android 4.4.4, using this link)

For more version of GAPPS : http://www.teamandroid.com/gapps/

Drag the zip file into your emulator Then restart it, Now you will be able to use Google Map in emulator The emulator setting I used is Nexus 6, Android 5.0.0 device-2015-01-08-002331

Android Wireless Debug & Sync Monitor

Wireless Debug :

1. root your device

2. download wifi adb on device
https://play.google.com/store/apps/details?id=com.ttxapps.wifiadb&feature=search_result

3. use cmd to direct into /android-sdk/platform-tools/

4. use

 adb connect YOUR_DEVICE_IP

5. Done

Sync monitor :

1. download android screen monitor
https://code.google.com/p/android-screen-monitor/

2. unzip asm.jar into /android-sdk/platform-tools/

3. run asm.jar and select your device.

4. done

Switchr APP review

Swichr is an application for only Android.
Top 5 in XDA 2013 APPs.
There are two editions. One is free edition, and the other is
I have installed the app.
Now let’s take a look.

20140408-151551.jpg
I have bought the Pro edition.

20140408-151529.jpg
In the beginning, there are three styles of which you need to choose one.
Flow

20140408-151533.jpg

20140408-161014.jpg
In the second picture, you can see there are two button for home and back.
You will need root access to use the Back button.
In addition, you can swipe down to close the app.
Slide

20140408-161031.jpg

20140408-161027.jpg
Swipe from left to right, it will then show as the upper picture.
To show the sidebar, you will need to slide it back.
I find out that it is dummy to find what app you want fast.
If you have the same feelings as mine, check the setting for “show only sidebar”. Then it will be similar as window phone 8.
I am currently using this style.
There are still three button at the bottom of slide bar.

20140408-161018.jpg
Arc

20140408-161022.jpg
Arc style is not so handy. In my opinion, it is hard to make your finger reach the arc of apps, since it is too wide.
Moreover, the close all app button is overlay with home button.

In conclusion, this app makes my phone resurrect since my home button almost malfunctions. Much easier to change between apps.
This app has many customizations to make your own desire.
Don’t be hesitate to try it for free.