Thursday, December 14, 2017

Friday, December 1, 2017

Arrow CRUD operation using custom object

Please take a look following GitHub link for ArrowDB CRUD operation

- https://gist.github.com/MotiurRahman/86a57d86fde36dcfe6044a402564b834

Hope this helps.

Monday, October 16, 2017

How to open pdf file on Android.

Following example would be helpful for opening pdf file

////////------////////////

var file = Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory, "test.pdf"); 
var outFile = Ti.Filesystem.getFile(Ti.Filesystem.externalStorageDirectory, 'tempFile.pdf'); 
var outPath = outFile.nativePath; 
file.copy(outPath); 

try{ 
Ti.Android.currentActivity.startActivity(Ti.Android.createIntent({ 
action: Ti.Android.ACTION_VIEW, 
type: 'application/pdf', 
data: outPath 
})); 
} catch(e) { 
alert('You must install a PDF reader to view this file'); 



OR


try{ 
var intent = Ti.Android.createIntent({ 
action : Ti.Android.ACTION_VIEW, 
type : "application/pdf", 
data: outPath 
}); 


var open = Ti.Android.createIntentChooser(intent, L('open_intent')); 
Ti.Android.currentActivity.startActivity(open); 
} catch(e) { 
alert('You must install a PDF reader to view this file'); 


file = null; 


Thanks

Friday, October 13, 2017

Sunday, July 30, 2017

CRUD operation for SQLight DataBase

Please take a look following GitHub link for SQLight database

https://gist.github.com/MotiurRahman/5ecc0f775d81defbdecf34192bf057d3

Hope this helps.

Let me know if you have any question.

Wednesday, April 26, 2017

Setup Android SDK to the Appcelerator Studio for Mac

At first, download the Android SDK manually from the bottom of this page
Secondly, create a new folder named "android-sdk" and place downloaded tools folder inside the android-sdk folder
Now place the "android-sdk" folder to the Home directory and show the location to the Axway Appcelerator Studio>>Preferences>>Studio>>Platforms>Android>Android SDK Home
Then click on Install SDKs>> Now select android 6.X.X, 7.X.X,8.X.X and install those packages. 
If you face any issue then try to setup android SDK via the terminal.
  • appc ti config android.sdk  <SDK location>
  • appc ti setup android
  • And restart PC 
Also, take a look android SDK installation guide -
Hope this helps.

Friday, April 14, 2017

Open Music Library and play song using Appcelerator

Clean reinstall Appcelerator Studio to the Mac.

At first, remove the Studio from Applications plus the following for a clean state
  • sudo rm -rf ~/.appcelerator
  • sudo rm -rf ~/.titanium
  • sudo npm uninstall -g titanium
  • sudo npm uninstall -g alloy
  • sudo npm uninstall -g acs
  • sudo npm uninstall -g appcelerator
Check your node version and java version then make it compatible according to the doc link
 Then install CLI manually via the terminal respectively
  • sudo npm install -g appcelerator
  • appc use latest
  • appc setup -l trace
  • sudo npm install -g alloy
Finally, take a fresh copy of Appcelerator Studio and install it in your machine. It will automatically install all dependencies.
  • https://web.appcelerator.com/product/studio
Then open the studio and let me know how it goes.

Thursday, April 13, 2017

Error: return binding.mkdir(pathModule._makeLong(path)

This can be happen if the username included a ~, and I think this breaks some internal code. Setup code can not handle the user's local enviroment path like that and as is obvious from the error message, it tries to create a directory called "c:\users\c:"

So create a fresh new user to you system.

Hope this helps.