{"action":"created","issue":{"url":"https://api.github.com/repos/firebase/FirebaseUI-Android/issues/91","repository_url":"https://api.github.com/repos/firebase/FirebaseUI-Android","labels_url":"https://api.github.com/repos/firebase/FirebaseUI-Android/issues/91/labels{/name}","comments_url":"https://api.github.com/repos/firebase/FirebaseUI-Android/issues/91/comments","events_url":"https://api.github.com/repos/firebase/FirebaseUI-Android/issues/91/events","html_url":"https://github.com/firebase/FirebaseUI-Android/issues/91","id":138801131,"number":91,"title":"RuntimeException after extending FirebaseLoginBaseActivity","user":{"login":"TienVNguyen","id":14155472,"avatar_url":"https://avatars.githubusercontent.com/u/14155472?v=3","gravatar_id":"","url":"https://api.github.com/users/TienVNguyen","html_url":"https://github.com/TienVNguyen","followers_url":"https://api.github.com/users/TienVNguyen/followers","following_url":"https://api.github.com/users/TienVNguyen/following{/other_user}","gists_url":"https://api.github.com/users/TienVNguyen/gists{/gist_id}","starred_url":"https://api.github.com/users/TienVNguyen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TienVNguyen/subscriptions","organizations_url":"https://api.github.com/users/TienVNguyen/orgs","repos_url":"https://api.github.com/users/TienVNguyen/repos","events_url":"https://api.github.com/users/TienVNguyen/events{/privacy}","received_events_url":"https://api.github.com/users/TienVNguyen/received_events","type":"User","site_admin":false},"labels":[{"id":234429616,"url":"https://api.github.com/repos/firebase/FirebaseUI-Android/labels/duplicate","name":"duplicate","color":"cccccc","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-03-06T15:16:39Z","updated_at":"2017-02-17T12:43:04Z","closed_at":"2016-03-07T15:18:29Z","body":"Hi,\n\nI followed exactly steps in FirebaseUI-Android/codelabs/chat/ to learn Firebase. It compiled successfully but error appeared when I ran app. I think there is a problem with FirebaseLoginBaseActivity. Please help to take a look on this.\n1/ First error is missing or trackable class GoogleAuthProvider in FirebaseLoginDialog.getGoogleAuthProvider\n2/ Second error is a fatal exception (NullPointerException)\n\n[RelatedFiles.zip](https://github.com/firebase/FirebaseUI-Android/files/160381/RelatedFiles.zip)\n\nThanks & Best Regards,\nTien Nguyen\n"},"comment":{"url":"https://api.github.com/repos/firebase/FirebaseUI-Android/issues/comments/280639367","html_url":"https://github.com/firebase/FirebaseUI-Android/issues/91#issuecomment-280639367","issue_url":"https://api.github.com/repos/firebase/FirebaseUI-Android/issues/91","id":280639367,"user":{"login":"mugash4","id":14863639,"avatar_url":"https://avatars.githubusercontent.com/u/14863639?v=3","gravatar_id":"","url":"https://api.github.com/users/mugash4","html_url":"https://github.com/mugash4","followers_url":"https://api.github.com/users/mugash4/followers","following_url":"https://api.github.com/users/mugash4/following{/other_user}","gists_url":"https://api.github.com/users/mugash4/gists{/gist_id}","starred_url":"https://api.github.com/users/mugash4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mugash4/subscriptions","organizations_url":"https://api.github.com/users/mugash4/orgs","repos_url":"https://api.github.com/users/mugash4/repos","events_url":"https://api.github.com/users/mugash4/events{/privacy}","received_events_url":"https://api.github.com/users/mugash4/received_events","type":"User","site_admin":false},"created_at":"2017-02-17T12:43:04Z","updated_at":"2017-02-17T12:43:04Z","body":"I created a firebase recyclerView  in android v 2.2.3 but it does not show it self nor does it show items from firebase database. \r\nsomeone with idea what might be the problem or what i did wrong? here is a snippet of my code\r\n\r\n`import android.content.Context;\r\nimport android.content.Intent;\r\nimport android.support.v7.app.AppCompatActivity;\r\nimport android.os.Bundle;\r\nimport android.support.v7.widget.LinearLayoutManager;\r\nimport android.support.v7.widget.RecyclerView;\r\nimport android.view.Menu;\r\nimport android.view.MenuInflater;\r\nimport android.view.MenuItem;\r\nimport android.view.View;\r\nimport android.widget.ImageView;\r\nimport android.widget.TextView;\r\nimport android.widget.Toast;\r\n\r\nimport com.firebase.ui.database.FirebaseRecyclerAdapter;\r\nimport com.google.firebase.database.DatabaseReference;\r\nimport com.google.firebase.database.FirebaseDatabase;\r\nimport com.firebase.ui.database.*;\r\nimport com.squareup.picasso.Callback;\r\nimport com.squareup.picasso.NetworkPolicy;\r\nimport com.squareup.picasso.Picasso;\r\n\r\npublic class MainActivity extends AppCompatActivity {\r\n    private RecyclerView mBlog_list;\r\n\r\n    private DatabaseReference mDatabase;\r\n\r\n    private LinearLayoutManager  mLinearLayoutManager;\r\n\r\n   private FirebaseRecyclerAdapter<Blog, BlogViewHolder> firebaseRecyclerAdapter;\r\n\r\n    @Override\r\n    protected void onCreate(Bundle savedInstanceState) {\r\n        super.onCreate(savedInstanceState);\r\n        setContentView(R.layout.activity_main);\r\n\r\n        mDatabase = FirebaseDatabase.getInstance().getReference().child(\"Blog\");\r\n\r\n        mLinearLayoutManager = new LinearLayoutManager(this);\r\n        mLinearLayoutManager.setOrientation(LinearLayoutManager.VERTICAL);\r\n\r\n        mBlog_list = (RecyclerView) findViewById(R.id.blog_list);\r\n        mBlog_list.setHasFixedSize(true);\r\n\r\n\r\n\r\n\r\n    }\r\n\r\n    @Override\r\n    public void onStart() {\r\n        super.onStart();\r\n\r\n        //recyclerview adapter , receives data from database and sets it to the view\r\n        firebaseRecyclerAdapter = new FirebaseRecyclerAdapter<Blog, BlogViewHolder>(\r\n\r\n                Blog.class,\r\n                R.layout.blog_row,\r\n                BlogViewHolder.class,\r\n                mDatabase\r\n\r\n        ) {\r\n            @Override\r\n            protected void populateViewHolder(BlogViewHolder viewHolder, Blog model, final int position) {\r\n\r\n                final String post_key = getRef(position).getKey();\r\n\r\n                viewHolder.setTitle(model.getTitle());\r\n                viewHolder.setDesc(model.getDesc());\r\n                viewHolder.setImage(getApplicationContext(), model.getImage());\r\n\r\n\r\n                viewHolder.mView.setOnClickListener(new View.OnClickListener() {\r\n                    @Override\r\n                    public void onClick(View view) {\r\n\r\n                        Toast.makeText(MainActivity.this, post_key, Toast.LENGTH_LONG).show();\r\n\r\n                    }\r\n                });\r\n\r\n            }\r\n        };\r\n        firebaseRecyclerAdapter.registerAdapterDataObserver(new RecyclerView.AdapterDataObserver() {\r\n            @Override\r\n            public void onItemRangeInserted(int positionStart, int itemCount) {\r\n                super.onItemRangeInserted(positionStart, itemCount);\r\n                int friendlyMessageCount = firebaseRecyclerAdapter.getItemCount();\r\n                int lastVisiblePosition =\r\n                        mLinearLayoutManager.findLastCompletelyVisibleItemPosition();\r\n                // If the recycler view is initially being loaded or the\r\n                // user is at the bottom of the list, scroll to the bottom\r\n                // of the list to show the newly added message.\r\n                if (lastVisiblePosition == -1 ||\r\n                        (positionStart >= (friendlyMessageCount - 1) &&\r\n                                lastVisiblePosition == (positionStart - 1))) {\r\n                    mBlog_list.scrollToPosition(positionStart);\r\n                }\r\n            }\r\n        });\r\n\r\n        mBlog_list.setLayoutManager(mLinearLayoutManager);\r\n        mBlog_list.setAdapter(firebaseRecyclerAdapter);\r\n\r\n    }\r\n\r\n    public static class BlogViewHolder extends RecyclerView.ViewHolder {\r\n\r\n        View mView;\r\n\r\n        TextView post_title;\r\n        TextView post_desc;\r\n\r\n        ImageView post_image;\r\n\r\n        public BlogViewHolder(View itemView) {\r\n            super(itemView);\r\n\r\n            mView = itemView;\r\n            post_title = (TextView) mView.findViewById(R.id.Post_title);\r\n            post_desc = (TextView) mView.findViewById(R.id.Post_desc);\r\n            post_image = (ImageView) mView.findViewById(R.id.mPost_image);\r\n\r\n        }\r\n\r\n        public void setTitle(String title) {\r\n\r\n            post_title.setText(title);\r\n\r\n        }\r\n\r\n        public void setDesc(String desc) {\r\n\r\n            post_desc.setText(desc);\r\n\r\n        }\r\n\r\n\r\n        public void setImage(final Context ctx, final String image) {\r\n\r\n            //Picasso.with(ctx).load(image).into(post_image);\r\n            Picasso.with(ctx).load(image).networkPolicy(NetworkPolicy.OFFLINE).into(post_image, new Callback() {\r\n                @Override\r\n                public void onSuccess() {\r\n\r\n                }\r\n\r\n                @Override\r\n                public void onError() {\r\n\r\n                    Picasso.with(ctx).load(image).into(post_image);\r\n\r\n                }\r\n            });\r\n\r\n        }\r\n    }\r\n\r\n    @Override\r\n    protected void onDestroy() {\r\n        super.onDestroy();\r\n        firebaseRecyclerAdapter.cleanup();\r\n    }\r\n\r\n\r\n    public boolean onCreateOptionsMenu(Menu menu) {\r\n        super.onCreateOptionsMenu(menu);\r\n        MenuInflater addBtn = getMenuInflater();\r\n        addBtn.inflate(R.menu.main_menu, menu);\r\n        return true;\r\n    }\r\n\r\n    @Override\r\n    public boolean onOptionsItemSelected(MenuItem item) {\r\n\r\n        if (item.getItemId() == R.id.action_add) {\r\n            startActivity(new Intent(MainActivity.this, PostActivity.class));\r\n        }\r\n        if (item.getItemId() == R.id.action_logout) {\r\n\r\n\r\n        }\r\n\r\n        return super.onOptionsItemSelected(item);\r\n    }\r\n\r\n}`\r\n\r\nhere is the custom class used to read and write objects :\r\n\r\n`public class Blog {\r\n    private String title;\r\n    private String desc;\r\n    private String image;\r\n\r\n    public Blog(){}\r\n\r\n\r\n    public Blog(String title, String desc, String image) {\r\n        this.title = title;\r\n        this.desc = desc;\r\n        this.image = image;\r\n    }\r\n\r\n    public String getTitle() {\r\n        return title;\r\n    }\r\n\r\n    public void setTitle(String title) {\r\n        this.title = title;\r\n    }\r\n\r\n    public String getDesc() {\r\n        return desc;\r\n    }\r\n\r\n    public void setDesc(String desc) {\r\n        this.desc = desc;\r\n    }\r\n\r\n    public String getImage() {\r\n        return image;\r\n    }\r\n\r\n    public void setImage(String image) {\r\n        this.image = image;\r\n    }\r\n}`\r\n\r\nand the xml for recycleView :\r\n\r\n`<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\r\n    xmlns:tools=\"http://schemas.android.com/tools\"\r\n    android:id=\"@+id/activity_main\"\r\n    android:layout_width=\"match_parent\"\r\n    android:layout_height=\"match_parent\"\r\n    tools:context=\"com.weebly.gogreenenvirons.kenyasafariapp.MainActivity\">\r\n\r\n    <android.support.v7.widget.RecyclerView\r\n        android:id=\"@+id/blog_list\"\r\n        android:layout_width=\"match_parent\"\r\n        android:layout_height=\"wrap_content\">\r\n\r\n    </android.support.v7.widget.RecyclerView>\r\n</RelativeLayout>`\r\n\r\nany help is highly appreciated."}}
{"actor":{"display_login":"mugash4"}}