diff --git a/OsmAnd/AndroidManifest-free.xml b/OsmAnd/AndroidManifest-free.xml index 4f02a7d75f..0cc15e429d 100644 --- a/OsmAnd/AndroidManifest-free.xml +++ b/OsmAnd/AndroidManifest-free.xml @@ -9,7 +9,7 @@ + android:value="fb2057524931189530"/> + android:value="fb131313131043971"/> + android:value="fb792288460976727"/> - 2057524931189530 - 792288460976727 - 131313131043971 €7,99 OsmAnd Live UA-28342846-2 diff --git a/OsmAnd/src/net/osmand/plus/OsmandApplication.java b/OsmAnd/src/net/osmand/plus/OsmandApplication.java index 987bfb43e3..f1ba71a69a 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandApplication.java +++ b/OsmAnd/src/net/osmand/plus/OsmandApplication.java @@ -888,12 +888,18 @@ public class OsmandApplication extends MultiDexApplication { public void initFBEvents() { try { if (Version.isGooglePlayEnabled(this) && Version.isFreeVersion(this)) { + Class cls = Class.forName("com.facebook.FacebookSdk"); + Method ms = cls.getMethod("sdkInitialize", Context.class); + ms.invoke(null, getApplicationContext()); Class cl = Class.forName("com.facebook.appevents.AppEventsLogger"); Method mm = cl.getMethod("activateApp", Application.class); mm.invoke(null, this); + Method mu = cl.getMethod("getUserID"); + String uid = (String) mu.invoke(null); + LOG.info("FB token: " + uid); } } catch (Exception e) { - e.printStackTrace(); + LOG.error(e.getMessage(), e); } } @@ -909,7 +915,7 @@ public class OsmandApplication extends MultiDexApplication { log.invoke(inst, defaults); } } catch (Exception e) { - e.printStackTrace(); + LOG.error(e.getMessage(), e); } } @@ -925,7 +931,7 @@ public class OsmandApplication extends MultiDexApplication { LOG.info("Fbase token: " + firebaseToken); } } catch (Exception e) { - e.printStackTrace(); + LOG.error(e.getMessage(), e); } }