Friday, 29 April 2016

Android app development using Apache cordova

Install apache cordova in your system.
After that follow the steps.

  1. Create a cordova project.
    cordova create hello com.example.hello HelloWorld
  2. Navigate to hello folder
    cd hello
  3. Add android platform
    cordova platform add android
  4. open www folder and keep your html files and make sure index.html is the main file.
  5. Build the apk file
    cordova build
  6. apk file will be genrated in the following path
    hello/platforms/android/build/outputs/apk/android-debug.apk
  7. Before launching the app in playstore you need to sign the apk by following the steps here

Tuesday, 26 April 2016

Hosting websites in google drive

Hosting a website in google drive is very simple. Follow the steps.

  1. Create a folder in google drive.
  2. Make the folder as public.
  3. After entering the folder if u see in the url u can find an id at last of the url. for ex: In  https://drive.google.com/drive/folders/0BwIHwJQYZrFgR0JUcmlvRjBCaVE   the id is   0BwIHwJQYZrFgR0JUcmlvRjBCaVE. Make a note of it.
  4.  Now upload all your website files into the folder.
  5. Make sure that index.html file is present in the files u uploaded and that was the main file which loads.
  6. Now open a new tab in the browser and type http://googledrive.com/host/<id u noted earlier> for ex: http://googledrive.com/host/0BwIHwJQYZrFgR0JUcmlvRjBCaVE 
  7. After that it will redirect to a new url which was ur website url for ex: https://d5c456f7c2a8a27e7fe67bd661d0f845de161c02.googledrive.com/host/0BwIHwJQYZrFgR0JUcmlvRjBCaVE/
  8. Enjoy hosting.....For any queries please feel free to comment will reply in 24hrs


Sunday, 24 April 2016

Create signed APK file using cordova command line interface

Before launching an app into any playstore we need to sign the apk file so that we can claim our copyrights and no one can copy our app or duplicate. If anyone does we can raise a concern with google and claim our copyrights.

Before that you can change the cordova app icon and keep your own logo by replacing the images in the path <ur prj>\platforms\android\res. There are different folders in the path. You need to replace the images in all the folders with same name either screen.png or icon.png

For the app MakeMeWhite (click to download) we launched in playstore I have created the keyfile with the following command.

keytool -genkey -v -keystore ultimateCreations-crazyColors.keystore -alias ultimateCreationsCrazyColors -keyalg RSA -keysize 2048 -validity 10000

<UltimateCreations> is the name which we registered in playstore and <crazycolors> is the name of package of our game. You can use any names as per ur wish.


After clicking enter key fill the following form:

What is the name of your organization?
  [Unknown]:  ULTIMATE CREATIONS
What is the name of your City or Locality?
  [Unknown]:  CHENNAI
What is the name of your State or Province?
  [Unknown]:  TAMILNADU
What is the two-letter country code for this unit?
  [Unknown]:  IN
Is CN=ULTIMATE CREATIONS, OU=ULTIMATE CREATIONS, O=ULTIMATE CREATIONS, L=CHENNAI, ST=TAMILNADU, C=IN correct?
  [no]:
What is your first and last name?
  [ULTIMATE CREATIONS]:  ULTIMATE CREATIONS
What is the name of your organizational unit?
  [ULTIMATE CREATIONS]:  APPDEV
What is the name of your organization?
  [ULTIMATE CREATIONS]:  ULTIMATE CREATIONS
What is the name of your City or Locality?
  [CHENNAI]:
What is the name of your State or Province?
  [TAMILNADU]:
What is the two-letter country code for this unit?
  [IN]:
Is CN=ULTIMATE CREATIONS, OU=APPDEV, O=ULTIMATE CREATIONS, L=CHENNAI, ST=TAMILNADU, C=IN correct?
  [no]:  y

Generating 2,048 bit RSA key pair and self-signed certificate (SHA256withRSA) with a validity of 10,000 days
        for: CN=ULTIMATE CREATIONS, OU=APPDEV, O=ULTIMATE CREATIONS, L=CHENNAI, ST=TAMILNADU, C=IN
Enter key password for <ultimateCreationsCrazyColors>
        (RETURN if same as keystore password):
Re-enter new password:

[Storing ultimateCreations-crazyColors.keystore]



Now the key file is successfully generated in the path in which u have ran the commands.
Place the key file generated in the path where apk file is generated.
(C:\<ur cordova prj>\platforms\android\build\outputs\apk)


Now run the command to generate release build

D:\projects\Phonegap\Example> cordova build --release android
Now run the command in the path C:\<ur cordova prj>\platforms\android\build\outputs\apk

jarsigner -tsa http://timestamp.digicert.com -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ultimateCreations-crazyColors.keystore android-release-unsigned.apk ultimateCreationsCrazyColors

Finally, we need to run the zip align tool to optimize the APK:

zipalign -v 4 android-release-unsigned.apk CrazyColors.apk



Enjoy...................!

Saturday, 23 April 2016

Installing dotclear (for blogging purpose)

Dotclear is used to create blogs in ur website.

Download dotclear installation file here.

After downloading the zipped file extract to htdocs in xampp folder.