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.

Friday, March 31, 2017

How to open an app from my app?

If you would like to open any app from your app then you can use openURL method. You can check out this doc link and sample code

LiveView file server unavailable error.

To resolve this issue, clean the project and terminate all node instances :

  •  From the menu bar, select Project >Clean.... Make sure your project is selected and click OK.
  •  From a terminal, run "killall node"
  •  Rerun the project.
If the issue persists then disable the LiveView button (small eye icon) from the top menu bar of the Studio.

Hope this helps.

Wednesday, March 1, 2017

Invalid Appcelerator ID and password combination

This can happen if you have an environment variable such as NODE_ENV set to development. To check this run echo $NODE_ENV and if it returns a value then run NODE_ENV= to unset it. 

echo $NODE_ENV 
- NODE_ENV= 

Now try to login 
  • appc logout
  • appc login
Hope this helps.

Tuesday, January 17, 2017

Clean uninstall then reinstall CLI to the windows PC.

At first, uninstall the Studio from the control panel then delete the following folder
 . Appcelerator
 .titanium, 
 .android 
 .eclipse from your root directory "c:\Users\pcName”  then run the following commands


- npm install -g appcelerator
- appc use latest
- appc setup
Hope this helps.

Friday, January 13, 2017

ArrowDB corresponding tag for Key

For development

 <property name="acs-api-key-development" type="string">App key</property>

<property name="acs-oauth-secret-development" type="string">OAuth Secret </property>

    <property name="acs-oauth-key-development" type="string">OAuth Consumer Key</property>

For production use  production name like
<property name="acs-api-key-production" type="string">App key</property>


Hope this helps.