Friday, May 19, 2017

New Google Play App Signing Terms of Service

         Google Play App Signing Terms of Service

Effective as of May 17th 2017

By enrolling Your application (“app”) in Google Play App Signing (GPAS) service, You consent to be bound by these terms, in addition to the existing Google Play Developer Distribution Agreement (“DDA”) and Google Play Developer Program Policies (collectively, the “Agreement”). If there is a conflict between these terms and the Agreement, these terms govern use of Your app in GPAS. Capitalized terms used below, but not defined below, have the meaning ascribed to them under the Agreement.

1. Key Generation and Storage

1.1. GPAS is an optional service that provides a secure means of handling Your app signing key.
1.2. By enrolling Your existing app in GPAS, You agree to give Your existing app’s signing key to Google and to secure or delete Your copy(ies) of the key. For new apps, Google will generate a new app signing key for Your app.
1.3. You will have the ability to download and review any APKs you publish that are signed by Google.

2. Automated App Optimizations

2.1. By enrolling Your app in GPAS, in addition to the license granted in 5.1 of the DDA, You grant Google a license to modify Your app APKs to optimize their performance, security and/or size, for the life of the app. The modifications, and the timing of which, will be made at Google’s sole discretion.
2.2. For the avoidance of doubt, services provided in GPAS are not intended to change the purpose of Your app.

3. Permanent Enrollment

3.1. It will not be possible to retrieve Your app signing key once it is provided to or generated by Google.
3.2. You can unpublish Your app and publish a new app with a new package name, without opting into GPAS, at any time.

4. Optional App Optimizations

4.1. Google may offer You app optimizations, separate from the automated ones referenced in Section 2, that You may choose to apply to Your apps enrolled in GPAS.
4.2. You are not required to accept any of these optional app optimizations.
4.3. If You choose to apply an optional app optimization, You can opt-out of any you choose at any time.

5. Changes to the Agreement

5.1. Google may make changes to these terms at any time by sending You reasonable notice describing the modifications made. Google also will post a notification on the Google Play Console describing the modifications made. They will become effective, and will be deemed accepted by You, (a) immediately for those who opt-in to GPAS after the notification is provided, or (b) for pre-existing GPAS users, on the date specified in the notice. If You do not agree with the modifications to the Terms, You must withdraw from GPAS, subject to Section 3, which will be Your sole and exclusive remedy. You agree that Your failure to withdraw constitutes Your agreement to the modified terms.       

Tuesday, January 31, 2017

Feild Validation in Android

public static boolean isNotNull(String txt){
    return txt!=null && txt.trim().length()>0 ? true: false;
}

public boolean isEmailEmpty(String lusername) {
    boolean status;

    if (Utility.isNotNull(lusername)) {
        status = true;
    } else {
        status = false;

        textt.setText("Email cannot be empty");
        toastt.setView(layoutt);
        toastt.show();


    }
    return status;
}
public boolean isEmailValid(String lusername) {
    boolean status;
    if (Utility.validateEmail(lusername)){
        status = true;
    } else {
        status = false;

        textt.setText("Invalid email address");
        toastt.setView(layoutt);
        toastt.show();


    }
    return status;
}

public boolean isPasswordhaveSixDigits(String pass) {
    boolean status;

    if (pass.length() > 7) {
        status = true;
    } else {
        status = false;

        textt.setText("Invalid Password");
        toastt.setView(layoutt);
        toastt.show();
    }
    return status;
}
public boolean isPasswordEmpty(String pass) {
    boolean status;

    if (Utility.isNotNull(pass)) {
        status = true;
    } else {
        status = false;

        textt.setText("Password cannot be empty");
        toastt.setView(layoutt);
        toastt.show();


    }
    return status;
}

===============================

Call the Service Method...


lusername = txtEmail.getText().toString();
lpassword = txtPassword.getText().toString();

if (isEmailEmpty(lusername) && isEmailValid(lusername) && isPasswordEmpty(lpassword) && isPasswordhaveSixDigits(lpassword)){
                loginUserOnline(lusername, lpassword);
}
else {
    System.out.println("4");
}



Monday, January 30, 2017

How to create release Hash Key for facebook login in android


1. We need to download openssl from Google code (64 bit users must downloadopenssl-0.9.8e X64, not the latest version) 

2. Extract it. 
create a folder- OpenSSL in C:/ and copy the extracted code here. 

3. Then you want to move to keytool location of your PC. Its in your java derectroy , bin folder, Example :    C:\Program Files\Java\jre1.8.0.111\bin
From here load the Command prompt.

Enter this command;
keytool -exportcert -alias androidreleasekey -keystore "C:\Users\user\.android\debug.keystore" | "C:\OpenSSL\bin\openssl" sha1 -binary | "C:\OpenSSL\bin\openssl" base64

But here path must be your PC relative paths......


Now, it will ask for password, put android 

That's all. It will return a key-hash.


Thursday, January 26, 2017

Best Practices for Android App Performance


Lession 1-

How to identify problems in your app's layout performance and improve the UI responsiveness.
  1. Optimizing Layout Hierarchies
  2. Re-using Layouts with <include/>
  3. Delayed Loading of Views
  4. Making ListView Scrolling Smooth













https://developer.android.com/training/best-performance.html

What is Observer pattern in Programming

https://en.wikipedia.org/wiki/Observer_pattern

RxAndroid Tutorial

RxAndroid Tutorial


https://www.raywenderlich.com/141980/rxandroid-tutorial

Use an HTTP library like Volley, Retrofit

Use an HTTP library like Volley, Retrofit for service calling

Calling Async methods in Android with http://reactivex.io/

Calling Async methods in Android with http://reactivex.io/

Hybrid Framework - Configure.IT


http://www.configure.it/platform/appconsole/


As per my experience in this field, I recommend developers as well as beginners to use mobile app development platform like Configure.IT, because it provides automatic coding, app preview facility, direct API connect and a lot more features. These things save a lot more development time and provides fast and well designed app in much less time.

Wednesday, January 25, 2017

How to create a custom toast in android


Decleration---------------------------------
LayoutInflater inflatert;
View layoutt;
TextView textt;
Toast toastt;


Initialization---------------------------------
inflatert = getLayoutInflater();
layoutt = inflatert.inflate(R.layout.custom_toast,
        (ViewGroup) findViewById(R.id.custom_toast_container));
textt = (TextView) layoutt.findViewById(R.id.text);
toastt = new Toast(getApplicationContext());
toastt.setGravity(Gravity.CENTER, 0, -150);
toastt.setDuration(Toast.LENGTH_LONG);
toastt.setView(layoutt);



Implementation---------------------------------
textt.setText("Invalid email address");
toastt.setView(layoutt);
toastt.show();


custome_toast xml file----------------------
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"    android:id="@+id/custom_toast_container"    android:orientation="horizontal"    android:layout_width="fill_parent"    android:layout_height="fill_parent"    android:padding="8dp"    android:background="@color/default__toast_color"    >

    <TextView android:id="@+id/text"        android:layout_width="wrap_content"        android:layout_height="wrap_content"        android:textColor="#FFF"        />
</LinearLayout>

Get Debug SHA key for facebook login in android

PackageInfo infoooo;
try {
    infoooo = getPackageManager().getPackageInfo("com.myapp.android.new", PackageManager.GET_SIGNATURES);
    for (Signature signature : infoooo.signatures) {
        MessageDigest md;
        md = MessageDigest.getInstance("SHA");
        md.update(signature.toByteArray());
        String something = new String(Base64.encode(md.digest(), 0));
        //String something = new String(Base64.encodeBytes(md.digest()));        Log.e("hash key", something);
    }
} catch (PackageManager.NameNotFoundException e1) {
    Log.e("name not found", e1.toString());
} catch (NoSuchAlgorithmException e) {
    Log.e("no such an algorithm", e.toString());
} catch (Exception e) {
    Log.e("exception", e.toString());
}