Interface and Cloud Messaging in Android

Interface :

  1. In android interface is very useful concept with the interface we are able to access List of items in Recycler view adapter in simple word we can easily access multiple users like whatsapp we are able to send the message multiple users.

  2. we are able to implement onClickListenr and onLongClick Listener into the same user with onclick listener we are able to go to the user location or another activity

  3. with the on long Click listener we are able to perform another activity into the same account.

  4. user is able to go to the location of his friend if he is lost

  5. Able to communicate multiple users at same time.

Cloud Messaging :

i. With the help of Retrofit api we are able to friend request to the another user

ii. We are able to communicate with the users with this api and user is able to send to communicate with another user easily and able to send details over messaging platform.

Code Interface :

public interface ItemClickListener {
    void onClick(View view,int position);
    void onItemLongClick(View view,int position);


public class MyAdapter extends RecyclerView.ViewHolder implements  View.OnClickListener, View.OnLongClickListener {

public TextView textEmail;

ItemClickListener itemClickListener;

    public void setItemClickListener(ItemClickListener itemClickListener) {
        this.itemClickListener = itemClickListener;

    public MyAdapter(@NonNull View itemView) {



    public void onClick(View v) {


    public boolean onLongClick(View v) {
        itemClickListener.onItemLongClick(v, getAdapterPosition());
        return true;

} inside OnbindActivity

holder.setItemClickListener(new ItemClickListener() {
    public void onClick(View view, int position) {
            Toast.makeText(Online.this, "Lets Go", Toast.LENGTH_SHORT).show();
            Intent map=new Intent(Online.this,MapsActivity.class);


    public void onItemLongClick(View view, int position) {



Codersarts has become one of the most trusted platforms to help students, professional developers who are looking for coding help, and wanna hire programming developers.

Are you looking for Android Programming Assignment Help? Codersarts android experts offer the best quality android app development. Get Android Programming Assignment Help at an affordable price from the best professional tutors Assignment Help. Order now at get 15% off.

Contact Us

Tel: (+91) 0120  4118730  

Time :   10 : 00  AM -  08 : 00 PM IST 

Registered address: G-69, Sector 63, 

 Noida - 201301, India

We Provide Services Across The different countries

USA    Australia   Canada   UK    UAE    Singapore   New Zealand    Malasia   India   Ireland   Germany

CodersArts is a Product by Sofstack Technology Solutions Pvt. Ltd.

  • CodersArts | Linkedin
  • Instagram