Stipop Docs | Documentation for SDK and API

Stipop.connect

This method connects Stipop with the activity you want to use. It has to be called after configuration is complete and requested before calling the UI popup method.

Stipop.connect(activity, userId, delegate)

ParameterTypeDescription
activityActivityThis is necessary for Stipop to detect changes to your app's layout and dynamically trigger it according to its lifecycle.
userIdStringUsers can manage downloaded and used stickers according to their user ID.
delegateStipopDelegateInterface which receives the selected sticker or sticker package.
stipopButton(Optional) StipopImageViewWhen used with StipopImageView, the button UI changes depending on whether the Stipop UI is showing or dismissing.
StickerPickerFragment(Optional) StickerPickerFragmentIf you use custom layout picker view, at here, picker view will be shown.
locale(Optional) LocaleDisplayed and recommended stickers vary depending on the Locale you set. The default is Locale.getDefault().
taskCallBack(Optional) ((isSuccess: Boolean) -> Unit)When the connection is finished, the success or failure of the operation is returned as a boolean.
Fragment
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
class MyFirstFragment : Fragment(), StipopDelegate {

  override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
      super.onViewCreated(view, savedInstanceState)

      // If you want to custom your PickerView's position, add StickerPickerFragment. or not, set StickerPickerFragment to null.
      val fragment = supportFragmentManager.findFragmentById(R.id.picker_view_fragment) as StickerPickerFragment
      Stipop.connect(
          activity = requireActivity(),
          userId = "userID",
          delegate = this,
          stipopButton = stipopPickerImageView,
          StickerPickerFragment = fragment,
          locale = Locale.KOREA,
          taskCallBack = { isConnected ->
              when(isConnected){
                  true -> TODO()
                  false -> TODO()
              }
      })
  }
}
We’re here to help. Contact us.