Question:
Use aspose-slides to save pptx file to images, it work well at normal App, but when I set android:sharedUserId="android.uid.system"
to Declare App as a system App, the problem appear.
Code 1:
<manifest
...
android:sharedUserId="android.uid.system"
...>
Code 2:
val assetManager: AssetManager = context.getAssets()
val inputStream = assetManager.open("office/03MathSubject.pptx")
val presentation = Presentation(inputStream)
callback?.onParseStart()
totalCount = presentation.slides.size()
for (slideIndex in 0..totalCount) {
val bitmap = presentation.slides.get_Item(slideIndex).getThumbnail(1f, 1f)
callback ?.onParseProgress(slideIndex, totalCount, bitmap)
Product: com.aspose:aspose-slides:23.7:android.via.java
Trace:
Caused by: java.lang.NullPointerException: Attempt to read from field ‘com.aspose.slides.ms.backend.System.Drawing.a0 com.aspose.slides.ms.backend.System.Drawing.GraphicsEnv.dx’ on a null object reference
at com.aspose.slides.ms.backend.System.Drawing.GraphicsEnv.a0(Unknown Source:4)
at com.aspose.slides.ms.backend.System.Drawing.a0.qa(Unknown Source:0)
at com.aspose.slides.internal.g1.km.(Unknown Source:3)
at com.aspose.slides.internal.g1.km.(Unknown Source:12)
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:453)
at java.lang.Class.forName(Class.java:378)
at com.aspose.slides.internal.zk.dx.dp(Unknown Source:183)
at com.aspose.slides.ms.System.a0.md(Unknown Source:24)
at com.aspose.slides.ms.System.a0.qa(Unknown Source:96)
at com.aspose.slides.ms.System.a0.qa(Unknown Source:22)
at com.aspose.slides.ms.System.a0.qa(Unknown Source:6)
at com.aspose.slides.jyr.(Unknown Source:7)
at com.aspose.slides.GroupShape.(Unknown Source:50)
at com.aspose.slides.BaseSlide.(Unknown Source:63)
at com.aspose.slides.MasterSlide.(Unknown Source:0)
at com.aspose.slides.MasterSlideCollection.qa(Unknown Source:2)
at com.aspose.slides.zyn.qa(Unknown Source:139)
at com.aspose.slides.hb4.md(Unknown Source:11)
at com.aspose.slides.hb4.qa(Unknown Source:76)
at com.aspose.slides.Presentation.dp(Unknown Source:57)
at com.aspose.slides.Presentation.qa(Unknown Source:69)
at com.aspose.slides.Presentation.(Unknown Source:15)
at com.aspose.slides.Presentation.(Unknown Source:5)
at com.aspose.slides.Presentation.(Unknown Source:4)