android - facebook login in my app gives nullpointer exception. I do not have the facebook app installed in my phone -


facebook login in app gives nullpointer exception. not have facebook app installed in phone. exception below.

  "java.lang.runtimeexception: failure delivering result resultinfo{who=null, request=64206, result=-1, data=intent { (has extras) }} activity {com.example.foodiepipe.foodiepipe/com.example.foodiepipe.foodiepipe.mainactivity}: java.lang.nullpointerexception\n\tat android.app.activitythread.deliverresults(activitythread.java:3500)\ 

how check if facebook app installed on phone , allow login?

the error facing maybe due other issue. however, if want check if facebook application installed or not use method given below:

public static boolean isfacebookappinstalled(context p_context) throws throwable     {         intent m_shareintent;         packagemanager m_packagemanager;         list<resolveinfo> m_activitylist;         boolean m_isappinstall = false;         try         {             m_shareintent = new intent(android.content.intent.action_send);             m_shareintent.settype("text/plain");             m_packagemanager = p_context.getapplicationcontext().getpackagemanager();             m_activitylist = m_packagemanager.queryintentactivities(m_shareintent, 0);             (final resolveinfo m_app : m_activitylist)             {                 if ((m_app.activityinfo.name).contains("com.facebook.katana"))                 {                     m_isappinstall = true;                     break;                 }             }         }         catch (throwable m_e)         {             customloghandler.printerrorlog(m_e);             throw new throwable(m_e);         }                 {             m_packagemanager = null;             m_activitylist = null;         }         return m_isappinstall;     } 

Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -