Problems with Activity Starter

(Jhonald Hernández) #1

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 ‘,java.lang.String)’ on a null object reference


How to open PDF files in own app
Kodular Draco :dragon:
Help Runtime Error while installing the update of app
(Pavitra Golchha) #2

Please show the blocks


How to view a pdf document

(Jhonald Hernández) #4

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

(Robert Crum) #5

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

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

(Jhonald Hernández) #6

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


1 Like
(Pavitra Golchha) #8

Which components are you using?

(Jhonald Hernández) #9

Just Activity Starter see below:

This is the error:

Runtime Error

Attempt to invoke virtual method ‘android.content.res.XmlResourceParser, 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.

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”.

(Robert Crum) #11

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


(Jhonald Hernández) #12

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

1 Like
assigned Conor #13

This should be fixed in the next release.

(Jhonald Hernández) #15

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


In a couple of weeks.

(Jhonald Hernández) #17

Excellent !!!


Can you confirm if this is fixed @Jhonald_Hernandez?

1 Like
(Cive Esp) #19

sir it work well on companion but not in exported apk

1 Like
(Cive Esp) #20

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

1 Like