Friday, 27 April 2018

Generate OTP - TimeBasedOneTimePasswordGenerator (like Google Authentication)


Generate OTP - TimeBasedOneTimePasswordGenerator (like Google Authentication)



code for generate OTP:-
------------------------------------------------------------------------------------------------------

String currentOTP;

public void genereateOTP(String key) {

    try {

        byte[] secret1 = new Base32().decode(key);

        //Key key = new SecretKeySpec(secret1,0,secret1.length, "DES");
        SecretKey key = new SecretKeySpec(secret1, 0, secret1.length, "AES");

        TimeBasedOneTimePasswordGenerator totp = new TimeBasedOneTimePasswordGenerator();
        Date now = new Date();
        Date later = new Date(now.getTime() + TimeUnit.SECONDS.toMillis(timeslice));

        System.out.format("Current password: %06d\n", totp.generateOneTimePassword(key, now));
        System.out.format("Future password:  %06d\n", totp.generateOneTimePassword(key, later));

       int generatedOTP = totp.generateOneTimePassword(key, now);

        currentOTP = String.format("%06d", generatedOTP);

    } catch (Exception e) {
        e.printStackTrace();
    }

}





Download Classes Here:-
https://drive.google.com/open?id=13Bw7F2ZaOv0y-IkSgqfD9N_FGfRKECaZ

Thursday, 19 April 2018

Chat Heads Demo, chat heads lik FB.

Chat Head Demos like FB.
User can access from whole device. we can access from any windows.


Donwload Demo from Here:-
https://drive.google.com/open?id=1Her67AbMUoXwAgKBXJ0JY36DIn9qlACj

Manage Universal layouts for Mobile device and Teblets also Portrait and Landscape.


Layouts for Mobile Devices and Teblet Devices
Layouts for Portrait and Landscape screens

Download demo from here:-
https://drive.google.com/open?id=1scBkC1A9u-K9umcuQBrjZj_To0vACk-8

Tuesday, 17 April 2018

Tab layout with fragment stack



Tab layout with fragment stack.

- Manage stack tab wise.


Download demo from here:-
https://drive.google.com/open?id=1dLEbCxukHz_CJaNqt01NBO7xEBFfGIbR

Run/install/debug Android applications over Wi-Fi ?

Open Teminal/cmd --------------- Below steps is for Android 10 or lower Step 1 - Connect the device via USB and make sure debugging is work...