For Java & Groovy DSL
Step 1
Create folder libs in your Android project, under your app folder and copy the SparkYou-v1.1.aar to this folder

Step 2
Open your build.gradle , add implementation(files("libs/SparkYou-v1.1.aar")) to dependencies section

Now you can import and use the SparkYouWebView to load SparkYou web app and inject the current user access token.
For example, add a button in your main activity and when user click this button, it will initiate a SparkYouWebView instance
Add a button to the main activity

In
MainActivity.javaImport
SparkYouWebViewandSparkYouWebViewDelegateSince we use delegate for communication between MainActivity and the SparkYouWebView , your MainActivity need to implement the SparkYouWebViewDelegate interface. Modify your MainActivity as below:
Add
openWebsiteButtonClickfunction (which was added toandroid:onClickin the above button code)Implement two functions required by the
SparkYouWebViewDelegateinterface
Last updated