Facebook v4 and OneSignal plugins in Android Studio

Hi team,

Today I have been working on migrating my project to the new Android Studio integration. Using 2016.2886.

I feel I am almost there, only miss a few steps in plugins inclusion.

Facebook V4 and One Signal plugins involved modifying project.properties , adding :

android.library.reference.2=${CoronaEnterpriseDir}/Plugins/sdk-facebook/android/4.5.0/facebook
android.library.reference.3=path/to/Library/Android/sdk/extras/google/google_play_services/libproject/google-play-services_lib

I guess now these modifications need to be made in build.gradle. Could you please post them.

Thank you, best regards,

I’ll see if I can get an answer for you.

Rob

Hi david-pro,

For integrating Facebook-v4, you can copy the all of the .jar files in the plugin binaries package to your project’s libs directory. You should also copy the contents of the /resources/res directory into your project’s /res directory.

An engineer from OneSignal may be able to comment better on their preferences, but in general, you can integrate Google Play Services into your project by following Google’s instructions here.

Thank you for the feedback !

Surely there’s a way wtih Gradle to merge the res folder from the sdk-facebook directory with my app?  Adding facebook is really common and manually managing those resources seems pretty cumbersome.  I’m not that good with Gradle yet, but I guess I’ll have to dig in a figure that out.  Does anyone else here have any suggestions or assistance?

Please see my other post in this forum for the step-by-step instructions.

https://forums.coronalabs.com/topic/63669-how-to-use-facebook-v4-with-android-studio/

I’ll see if I can get an answer for you.

Rob

Hi david-pro,

For integrating Facebook-v4, you can copy the all of the .jar files in the plugin binaries package to your project’s libs directory. You should also copy the contents of the /resources/res directory into your project’s /res directory.

An engineer from OneSignal may be able to comment better on their preferences, but in general, you can integrate Google Play Services into your project by following Google’s instructions here.

Thank you for the feedback !

Surely there’s a way wtih Gradle to merge the res folder from the sdk-facebook directory with my app?  Adding facebook is really common and manually managing those resources seems pretty cumbersome.  I’m not that good with Gradle yet, but I guess I’ll have to dig in a figure that out.  Does anyone else here have any suggestions or assistance?

Please see my other post in this forum for the step-by-step instructions.

https://forums.coronalabs.com/topic/63669-how-to-use-facebook-v4-with-android-studio/