I am using PayPal's MECL library in one of my projects and it has been tested and worked as intended on half a dozen devices. However when I tested it on Nexus 7 an NullPointerException is always thrown when the PayPal.fetchDeviceReferenceTokenWithAppID()
method is called:
07-24 23:26:11.466: W/System.err(28266): java.lang.NullPointerException 07-24 23:26:11.466: W/System.err(28266): at libcore.net.UriCodec.encode(UriCodec.java:132) 07-24 23:26:11.466: W/System.err(28266): at java.net.URLEncoder.encode(URLEncoder.java:57) 07-24 23:26:11.466: W/System.err(28266): at com.paypal.android.a.c.g(Unknown Source) 07-24 23:26:11.466: W/System.err(28266): at com.paypal.android.a.c.e(Unknown Source) 07-24 23:26:11.466: W/System.err(28266): at com.paypal.android.a.c.b(Unknown Source) 07-24 23:26:11.466: W/System.err(28266): at com.paypal.android.a.d.run(Unknown Source) 07-24 23:26:11.496: D/TilesManager(28266): Starting TG #0, 0x672a6428 07-24 23:26:11.496: D/TilesManager(28266): new EGLContext from framework: 693dbd88 07-24 23:26:11.496: D/GLWebViewState(28266): Reinit shader 07-24 23:26:11.506: D/GLWebViewState(28266): Reinit transferQueue 07-24 23:26:12.566: D/dalvikvm(28266): GC_CONCURRENT freed 1207K, 10% free 13335K/14688K, paused 3ms+6ms, total 55ms 07-24 23:26:13.136: E/Error(28266): Authentication failed, button not enabled. 07-24 23:26:13.136: W/System.err(28266): java.lang.NullPointerException 07-24 23:26:13.136: W/System.err(28266): at com.paypal.android.a.c.a(Unknown Source) 07-24 23:26:13.136: W/System.err(28266): at com.paypal.android.a.c.e(Unknown Source) 07-24 23:26:13.136: W/System.err(28266): at com.paypal.android.a.c.b(Unknown Source) 07-24 23:26:13.136: W/System.err(28266): at com.paypal.android.a.d.run(Unknown Source)
Note that the exact same APK can run without issues on Galaxy Nexus, S3, and even the Nexus 7 emulator, it only stopped working on Nexus 7. I am at a complete loss at this stage so any help is welcome.