Android SDK Integration

To integrate Android SDK with SolidOpinion follow the steps below:

Step 1. Download the SolidOpinion SDK for your app.

Step 2. Open the project structure by right-clicking on your project and select the "Open Module Settings" option or go to "File" > "Project Structure…"

Step 3. Click the "+" button at the top left to add a new module.

Step 4. Select "Import .JAR or .AAR Package" and click the "Next" button.



Step 5. Find your file using the ellipsis button ("...") beside the "File name" field.
The Studio will automatically create a subproject name. Then click the "Finish" button

Step 6. Gradle will sync, which may take a few minutes
Add the new module as a dependency to your app. In the "Project Structure..." window a new module will appear representing the SDK. Keep the app module selected and click on the Dependencies panel

Step 7. Click the "+" button at the bottom of the dependencies screen and choose the "Module dependency" from the list
Note: The dependencies screen is quite large, that’s why this button might be difficult to notice



Step 8. Click the “Ok” button in the popup window.



Step 9. Add the SolidOpinion SDK widget to the layout using the code below:

     <com.solidopinion.android.sdk.views.SolidOpinionView
     xmlns:solid="http://schemas.android.com/apk/res-auto"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
     solid:sitename=" "
     solid:threadUrl=""
     android:id="@+id/Comments"
     android:layout_alignParentBottom="true" />

Then enter your site name and thread URL. 

Step 10. Add permissions to AndroidManifest.xml

   <uses-permission android:name="android.permission.INTERNET" />
   <uses-permission        android:name="android.permission.ACCESS_NETWORK_STATE" />
 <uses-permission  android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
 <uses-permission    android:name="android.permission.ACCESS_WIFI_STATE" />

Step 10. Cradle will sync again. Click the "Ok" button to complete the integration.

Follow this link to download the pdf version of the manual

Follow this link to watch a video manual about Android SDK Integration

Find the SolidOpinion Android SDK integration sample here.



Happy commenting!
SolidOpinion

Feedback and Knowledge Base