Ivan's Blog

Lets learn new things!

Localization: Convert English Number to Bangla Number

To support localization in an application, We need to store all primary text translations into files or database. Every popular framework or platform like Android, J2EE, PHP frameworks and CMS support multi-language localization. Most of these are based of simple configuration. Most common approaches used by these platform or frameworks are: XML based localization string files and Database driven: tag based data structure.

Accessing all images using MediaStore: An android provider

As an android developer, we need to access devices images for various purpose. To access images, android sdk provide a build in content provider, called MediaStore. Here I will demonstrate how we can use MediaStore to access not only all photos but also map them into their corresponding albums.   1st off all we will need external storage read permission. … Read More

Prepare RESTful Web Services using Laravel: The PHP Framework

I prepare this document to remember these steps. Hope it will help others too. Step 1: Install laravel Laravel documentation is very resource full. To install laravel please follow the bellow link: https://laravel.com/docs/5.4 1st have to fulfill all prerequisite! Without these, laravel will not run properly. Step 2: Make Database schema using migration. Now 1st design your application database schema. … Read More

Wowza outgoing security Secure Token and PHP, Android client

Configure outgoing security using Wowza Streaming Engine Manager There is a very good documentation in Wowza forum to enable security token for Wowza steaming server. Here is link to follow: http://www.wowza.com/forums/content.php?578-How-to-configure-security-using-Wowza-Streaming-Engine-Manager Now the outgoing stream is secured. If any one knows the secret token, then only generate the authenticate URL for steaming. Here are some code example to do this. … Read More

An approach to create custom randomized, secured keyboard for Android

Recently Me and my team received a request to prepare a custom random keyboard for Android. This keyboard will be an Android library, which will be incorporate as a part of a secured application. To prepare this kind of library, we found an approach to build a custom keyboard in Android. An engineer from Netherlands published a brief article creating … Read More

How to install PHP composer : OS Windows 7

Composer install into windows 7: Download Composer software from this link: https://getcomposer.org/Composer-Setup.exe Have to modify PATH environment value, such as adding “C:\wamp\bin\php\php5.5.12” at the end of PATH. Do not need to restart computer, just reopen command line again Run these commands: Change to a directory on your PATH and run the install snippet to download composer.phar: php -r “readfile(‘https://getcomposer.org/installer’);” | … Read More

Android: Use HttpURLConnection instead of deprecated Apache module: HttpClient/HttpResponse

As Android deprecated Apache module like HttpClient, HttpResponse, we can use HttpURLConnection. Here is some code sample: try { URL url = new URL(onlineUrl);//use a proper url instead of onlineUrl HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.setRequestProperty(“User-Agent”, “”); connection.setRequestMethod(“GET”);//we can use POST instead of GET method also. connection.setDoInput(true); connection.connect(); InputStream inputStream = connection.getInputStream(); if (inputStream != null) { BufferedReader bufferedReader = … Read More

Install Teletalk 3G modem in Ubuntu 12.04

Go to this folder Linux/PCL_BGTLK run command in terminal: sudo apt-get install libqt3-mt sudo apt-get install libxplc0.3.13 sudo apt-get install wvdial sudo ./install.sh

[SQL] Information schema

MySQL: How to rename a database 1. For InnoDB, create the new empty database, then rename each table in turn into the new database: [code language=”sql”]RENAME TABLE old_db.table TO new_db.table;[/code] This also work fine in MyISAM 2. Create the destination database before running the script generated from the command. [code language=”sql”]SELECT concat(‘RENAME TABLE $source.’,table_name, ‘ TO $destination.’,table_name, ‘;’) FROM information_schema.TABLES … Read More

[NFC]NFC TAG data reading

NFC TAG data reading: There are different type of data can be stored in NFC tag. Data can be: TNF = TNF_WELL_KNOWN AND RECORD = RTD_TEXT/RTD_URI TNF = TNF_ABSOLUTE_URI TNF = TNF_MIME_MEDIA TNF = TNF_EXTERNAL_TYPE Here is android code example where shows how to read the data from tag. [sourcecode language=”java”] public void test(Intent intent){ ¬†¬† ¬†Parcelable[] data = intent.getParcelableArrayExtra(NfcAdapter.EXTRA_NDEF_MESSAGES); … Read More