当我尝试从PHP发送推送通知时,我得到未经授权的错误401。为什么?

时间:2016-01-11 10:01:47

标签: php android push-notification google-cloud-messaging

以下是我正在使用的代码。

@Override
public void onBindViewHolder(final ViewHolderBoxOffice holder, int position)
{
    holder.topContainer.setVisibility(View.INVISIBLE);
    holder.bottomContainer.setVisibility(View.INVISIBLE);

    String poster = "some image url";

    holder.mThumbnail.setImageUrl(poster, volleySingleton.getImageLoader());

    /* Listener for listening to image loading*/
    holder.mThumbnail.addOnLayoutChangeListener(new OnLayoutChangeListener()
    {
        @Override
        public void onLayoutChange(View view, int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7,
                int arg8)
        {
            if(holder.mThumbnail.getDrawable()!=null)
            {
                holder.topContainer.setVisibility(View.VISIBLE);
                holder.bottomContainer.setVisibility(View.VISIBLE);
            }
            else
            {
                holder.topContainer.setVisibility(View.INVISIBLE);
                holder.bottomContainer.setVisibility(View.INVISIBLE);
            }
        }
    });
}

0 个答案:

没有答案