Skip to content

Horizon733/creative-kit-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Snap Creative kit Sample

An android app that demonstrates Snapchat's creative kit integration with Jetpack compose

💻 Requirements


🧬 Sample

Project Sample
Android app that demonstrates use of Snapkit's Creative kit with new Jetpack Compose and latest Android Studio version.

What it does?

• Share Image on SnapChat
• Share Image with Sticker on SnapChat
• Open Lens on SnapChat
• Jetpack compose UI
• Light theme
• Lifecycle and Stateful
• No XML

Creative kit sample demo

Instructions

<string name="snapchat_client_id">Your client id</string>
  • Make sure to change project name in AndroidManifest.xml
<application ...>
...
  <meta-data
      android:name="com.snapchat.kit.sdk.clientId"
      android:value="@string/snapchat_client_id" />
  <provider
      android:authorities="${applicationId}.fileprovider"
      android:name="androidx.core.content.FileProvider"
      android:exported="false"
      android:grantUriPermissions="true">
      <meta-data
          android:name="android.support.FILE_PROVIDER_PATHS"
          android:resource="@xml/file_paths"
          />
  </provider>
...
</application>
  • Create xml directory in res
  • Create file_paths.xml file in xml directory.
  • Add following code snippet for using it as cache directory for storing images
<?xml version="1.0" encoding="utf-8"?>
<paths xmlns:android="http://schemas.android.com/apk/res/android">
    <cache-path name="tmp" path="/" />
</paths>
  • Add your own lens uuid from my lenses
    • procedure for capturing lens uuid
      • Click here to login to check out your lenses
      • Now, as shown in below image, click on chain icon to copy link for your lens
      • Paste the same link in new tab you will be able to find uuid as below image shows
  • As you found your uuid, go inside MainActivity.kt find function getLens() and add your uuid
fun getLens(){
...
  val snapLensContent = SnapLensContent.createSnapLensContent(
          "your lens uuid",
          launchData
      )
...
  • These are the only steps to do.

Please give this repo a Star, if this helps you!

About

An android app that demonstrates Snapchat's Creative kit integration with Jetpack compose

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages