Problems with Activity Starter

when I tray to open a PDF file saved on the phone using Activity Starter, the system show that error:

Runtime Error

Attempt to invoke virtual method ‘android.content.pm.ProviderInfo.loadXmlMetaData(android.content.pm.PackageManager,java.lang.String)’ on a null object reference

END APPLICATION

1 Like

Please show the blocks

How to view a pdf document
Taifun

The same blocks works perfectly on app inventor but in kodular show this error:

Android only requries 2 of // after "file:"


Change the file location from “file:////storage/emulated/0/…” to " file:///storage/emulated/0/…"

I used // and doesn’t work. Neither /// or ////

if you take a look at the working example project at App Inventor Code Snippets | Pura Vida Apps you might find out, that there are 3 slashes required

Taifun

1 Like

Which components are you using?

Just Activity Starter see below:

This is the error:

Runtime Error

Attempt to invoke virtual method ‘android.content.res.XmlResourceParser android.content.pm.ProviderInfo.loadXmlMetaData(android.content.pm.PackageManager, java.lang.String)’ on a null object reference
Note: You will not see another error reported for 5 seconds.

And does it work on real apk?
All I see what you try is use it on companion.

Btw.:
The error message tells you that it can not find a object on the path you give.
That’s why it is called “null object”.

2 Likes

Yes, but the 2 slash doesn’t contains the first directory
your example:


@Jhonald_Hernandez:

That works for me in almost every IDE but for any reason doesn’t work on Kodular. I don’t know why…

1 Like

This should be fixed in the next release.

Do you know approximately when would be ready the next release? thanks

In a couple of weeks.

Excellent !!!

Can you confirm if this is fixed @Jhonald_Hernandez?

1 Like

sir it work well on companion but not in exported apk

1 Like

sir this isn’t fixed . I am Still Facing The Problem In Exported Apk but It Works Well In companion Apps

1 Like