Dart Flutter Tutorial

By // No comments:
1. Install the plugin
2. Search plugin flutter

3. Start a new flutter project

4.Select the flutter Application 

5.Select the SDK Path



                                                                                                                                 




Retrofit Tutorial in Android

By // No comments:
1. What is Retrofit?

Retrofit is a REST Client library Helper library used in android and java to create an HTTP  request
and also process the HTTP  response from a REST API.


2. Create an Interface Class.

   public interface endpointservice {
         
      // GET AND SET two method use to depend on you.
     // put the endpoint file name in GET("") . that means the last name of the base URL

     @GET("users.php")

    // first my module convert the list then get the value by listresponse()

     Call<List<mymodule> listresponse(@Field("User_name"),String name)

}

3. Create the Instance Class.

 public class myretrofitInstance{
     public final String BASE_URL = "https://example.com/fruit";

Retrofit retrofit = new Retrofit.Builder().baseUrl(BASE_URL )
.addConverterFactory(GsonConverterFactory.create()).build();



}

4. Now Final MainActivity class

// service is initialization in this class

// first initialization instance class.
// second store creates service in the service variable.
// then call the method which is created in service class and pass the parameter.
// now the last process call the enqueue method which is inside two methods 1. onResponse 2. onFailure
// MainActivity

public myretrofitInstance adbs;
 endpointservice  andpoint = adbs.create(endpointservice .class);


Call<mymodule> call  =  andpoint.listresponse("API_KEY");

call.enqueue(new Callback<mymodule>(){

@Override
public void onResponse(Call<mymodule> call,Response<mymodule> response)
{
List<mymodule> mymodule = response.body.getResult();
recyclerview.setAdapter(new MyAdapter(mymodule,R.layout.list_item_movie,getApplicationContext()));

}

@Override
public void onFailure(Call<mymodule> call, Throwable throwable)
{
Log.e(TAG, throwable.tostring());
}

});


5. dependencies


compile fileTree(dir: ‘libs’, include: [‘*.jar’])
testCompile ‘junit:junit:4.12’
compile ‘com.android.support:appcompat-v7:23.3.0’
// retrofit, gson
compile ‘com.squareup.picasso:picasso:2.5.2’
compile ‘com.squareup.retrofit2:retrofit:2.1.0’
compile ‘com.squareup.retrofit2:converter-gson:2.1.0’
compile ‘com.android.support:recyclerview-v7:25.0.0’



Navigation Drawer

By // No comments:
This is the sidebar . and also called the Navigation Drawer. two buttons are created first is false and second is true then different data display in the navigation bar
















// first  two onclick listeners create than called the two method different parameters

// two methods initialization



https://github.com/popnitesh/Navigationbar

Firebase Initialization and Login with email id

By // No comments:
You can use Firebase Authentication to let your users authenticate with Firebase using their email addresses and passwords and to manage your app's password-based accounts.


1. First Initialization in build Gradle file 

2. Next Step 

Click Download google-services.json to obtain your Firebase Android config file (google-services.json).

3. Next Step Create MainActivity java file and initialization firebase authentication in Oncreate() and Onstart()


4. How will log in by Email id with Firebase 

what is a push notification ?

By // No comments:
Definition :

A Notification is a message that pops up on a user's device. Notifications can be triggered locally by an application, or the can be sent/pushed from a server to the user.


  • How to push notification work?

          1. An app implements push notification and the users confirm that he wishes to receive these notification 👉 swipe for an explaining diagram

     2. the user receives a device token, which is generated for example by the Firebase Cloud Messaging server. the device token works as the address that the push notification will be sent to.
  
        3. the server where the backend of the app is running on sends a push notification request to the firebase Cloud Messaging (FCM) server

      4. The FCM then sends the push notification to the user's device

        on the Firebase websites, you can find information on how to implement push notifications I wanted to share some code as well, but I couldn't make it work yet Maybe I can share some at another time :)


Reference :

AutoComplete TextView

By // No comments:
AutoComplete TextView Demo 

AutoComplete TextView Demo also see the GitHub available

    First Create a xml layout in which <AutoCompleteTextview> apply


Second Create a java file in which use java code


Powered by Blogger.