PageSourceSearch

https://docs.banuba.com/ve-pe-sdk/assets/js/f36468b5.46f16048.js

js banuba.com collected 2026-09-24 08:55:55 UTC 5,640 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkmy_website=self.webpackChunkmy_website||[]).push([[6661],{6413:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>d,contentTitle:()=>s,default:()=>h,frontMatter:()=>a,metadata:()=>t,toc:()=>l});const t=JSON.parse('{"id":"android/launching-pe","title":"Launching Photo Editor on Android","description":"Guide to launching Photo Editor SDK.","source":"@site/docs/android/launching-pe.md","sourceDirName":"android","slug":"/android/launching-pe","permalink":"/ve-pe-sdk/docs/android/launching-pe","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"sidebar_label":"Launching Photo Editor"},"sidebar":"androidSidebar","previous":{"title":"Installation","permalink":"/ve-pe-sdk/docs/android/installation-pe"}}');var o=i(4848),r=i(8453);const a={sidebar_label:"Launching Photo Editor"},s="Launching Photo Editor on Android",d={},l=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Initialize SDK",id:"initialize-sdk",level:2},{value:"Start editor",id:"start-editor",level:2},{value:"Disable publishing image to Gallery",id:"disable-publishing-image-to-gallery",level:2}];function c(e){const n={a:"a",admonition:"admonition",br:"br",code:"code",h1:"h1",h2:"h2",header:"header",p:"p",pre:"pre",strong:"strong",...(0,r.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.header,{children:(0,o.jsx)(n.h1,{id:"launching-photo-editor-on-android",children:"Launching Photo Editor on Android"})}),"\n",(0,o.jsx)(n.p,{children:"Guide to launching Photo Editor SDK."}),"\n",(0,o.jsx)(n.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,o.jsxs)(n.p,{children:["\u2757"," The license token ",(0,o.jsx)(n.strong,{children:"IS REQUIRED"})," to use Photo Editor SDK in your app.",(0,o.jsx)(n.br,{}),"\n","Please check ",(0,o.jsx)(n.a,{href:"/ve-pe-sdk/docs/android/requirements-pe#license-token",children:"Requirements"})," out guide if the license token is not set."]}),"\n",(0,o.jsx)(n.h2,{id:"initialize-sdk",children:"Initialize SDK"}),"\n",(0,o.jsxs)(n.p,{children:["Create an instance of ",(0,o.jsx)(n.code,{children:"BanubaPhotoEditor"}),"  by using the license token"]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-kotlin",children:"val photoEditorSDK = BanubaPhotoEditor.initialize(LICENSE_TOKEN)\n"})}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.code,{children:"photoEditorSDK"})," is ",(0,o.jsx)(n.code,{children:"null"})," when the license token is incorrect i.e. empty, truncated.\nIf ",(0,o.jsx)(n.code,{children:"photoEditorSDK"})," is not ",(0,o.jsx)(n.code,{children:"null"})," you can proceed and start video editor."]}),"\n",(0,o.jsxs)(n.p,{children:["Next, we strongly recommend ",(0,o.jsx)(n.a,{href:"https://github.com/Banuba/ve-sdk-android-integration-sample/blob/main/app/src/main/java/com/banuba/example/integrationapp/MainActivity.kt#L110",children:"checking"})," your license state before staring video editor"]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-kotlin",children:"photoEditorSDK.getLicenseState { isValid ->\n   if (isValid) {\n      // \u2705 License is active, all good\n      // Start Photo Editor SDK\n   } else {\n      // \u274c Use of Photo Editor is restricted. License is revoked or expired.\n   }\n}\n"})}),"\n",(0,o.jsx)(n.admonition,{type:"danger",children:(0,o.jsx)(n.p,{children:"Photo editing content unavailable screen will appear if the user starts Photo Editor SDK with revoked or expired license."})}),"\n",(0,o.jsx)("p",{align:"center",children:(0,o.jsx)("img",{src:i(2075).A,width:"25%",height:"auto",alt:"pe expired"})}),"\n",(0,o.jsx)(n.h2,{id:"start-editor",children:"Start editor"}),"\n",(0,o.jsx)(n.p,{children:"Import classes"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-kotlin",children:"import com.banuba.sdk.pe.BanubaPhotoEditor\nimport com.banuba.sdk.pe.PhotoCreationActivity\nimport com.banuba.sdk.pe.PhotoExportResultContract\n"})}),"\n",(0,o.jsxs)(n.p,{children:["Start Photo Editor SDK and handle exported results.",(0,o.jsx)(n.br,{}),"\n",(0,o.jsx)(n.a,{href:"https://github.com/Banuba/ve-sdk-android-integration-sample/blob/main/app/src/main/java/com/banuba/example/integrationapp/MainActivity.kt#L79",children:"See example"}),"."]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-kotlin",children:'\nval photoEditorExportResult =\n    registerForActivityResult(PhotoExportResultContract()) { uri ->\n        // Handle exported image result\n        Log.d(TAG, "Image exported $uri")\n    }
1\n\n// Start Photo Editor SDK\nphotoEditorExportResult.launch(PhotoCreationActivity.startFromGallery(this))\n'})}),"\n",(0,o.jsx)(n.h2,{id:"disable-publishing-image-to-gallery",children:"Disable publishing image to Gallery"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-kotlin",children:"startPhotoEditor(PhotoCreationActivity.startFromGallery(\nthis@MainActivity,\nconfig = PhotoEditorConfig.Builder(context = this).saveToGallery(false).build()\n))\n"})})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(c,{...e})}):c(e)}},2075:(e,n,i)=>{i.d(n,{A:()=>t});const t=i.p+"assets/images/pe_expired-259dd59cc9f79c5fc0f5c4b2bdf1d9a4.jpeg"},8453:(e,n,i)=>{i.d(n,{R:()=>a,x:()=>s});var t=i(6540);const o={},r=t.createContext(o);function a(e){const n=t.useContext(r);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function s(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:a(e.components),t.createElement(r.Provider,{value:n},e.children)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.