Tuesday, November 3, 2015

Change Azure mobile service Cordova library for windows 10 wns


I encountered this problem: https://github.com/Azure/azure-mobile-services-cordova/issues/8#issuecomment-151245833 , that I could not use the existing azure mobile service js library for wns registration to build cordova app on windows 10!

So I co-asked, and decided to follow the dev's suggestion to add my own function.  So I modified the mobileServices.Web-1.2.8.js directly, to get wns toast registration to work. The js file is shared here:https://onedrive.live.com/prev?cid=4c9ccfe08b0ea8f6&id=4C9CCFE08B0EA8F6%2147340&v=TextFileEditor .

There are few tricks to get cordova app build and work for windows 10!  
1. It can not be Any CPU!
2. You need to customize your own appxmanifest files in res/native/windows directory, by copying and modifying the corresponding files from the bld directory.
3. You've to build release version in order for the registration process to get the correct App information, so that the registration process can be successful.

Feel free to ask me if you need some help. 

Good luck!

Saturday, October 24, 2015

Change Visual Studio Cordova CLI from 4.3.0 to 5.3.3

I finally decided to change my VS2015's cordova project CLI from  4.3.0 to 5.3.3, so that I can try to play with windows 10.0 build.  But I didn't expect that Cordova CLI changed so much from 4 to 5, that I met a few issues and have to spend hours to solve them.

1. I've to install Android SDK's google repository in order to get it to build
2. I've to add a build.json as specified in http://stackoverflow.com/questions/31791215/visual-studio-2015-cordova-not-signing-apk, so that the release build can be signed.

Also, I've to switch the expired push plugin to phonegap-plugin-push, which I've to change code...

And the funny things about win10 build, the debug build doesn't carry out the push notification.  Only release build can successfully register with azure mobile service!

Thursday, October 22, 2015

Why I left Microsoft and joined Bodhi Meditation

I've read quite a few blogs before about why people left Microsoft, it's mostly because they were attracted with opportunities with better pay or better opportunities to make more money.  And finally it's my turn to leave Microsoft early 2015, but not for money, but for compassion,

I decided to volunteer/work for Bodhi Meditation from now on, to make more people knowing it and to make more people going into it to be more happy and healthy.  I've learned so much from it since 2008, and have finally made the decision to be part of it, to contribute, and pursue the spiritual part of the life.

There are tons of stories why you can be healthier in it.  There are so many miracles that I've used to be surprised.  Read yourself, and experience it yourself.  It's a life time opportunity.

Bodhi Meditation's official website: puti.org.  YouTube: https://www.youtube.com/user/putihome


We have meditation centers in many countries and cities.  We welcome everyone from every religion. Be there and enjoy it!

Wish every one the best!








Monday, July 21, 2014

Cordova on android is case sensitive for file/directory names!

I was playing on VS cordova development, and everything working on the Ripple plugin with chrome.  But deploy the app to the android has some wierd errors.

One of the HTML page doesn't load, claiming something like "Application Error
network error. (file:///android_asset/www/tutorial.html)".  It take me a long time to figure out what the problem is.  The file I'm referencing has a capital letter, where inside HTML, I'm referecing it as lowercase. This will pass the ripple emulator, but will fail on Android.  And I've to make sure I change both VS file name and the file name on the file system to make them match.

Similarily, the directory names, and all other referencing css/js file names are case sensitive.

I wish that VS editor understands it, and can some how warn me..