I'm posting this as an informative guide for using Foscam IP cameras, specifically the FI9821 models with the IP Camera Viewer app. The IP Camera Viewer app will not take a RTSP:// URL. You must enter a browser URL command to activate the MJPEG stream on the camera before you can view it on the app.
Open a browser and fill in your IP, port, and user/password where I have Xs marked.
http://X.X.X.X:XX/cgi-bin/CGIProxy.fcgi?cmd=setSubStreamFormat&format=1&usr=XXXX&pwd=XXXX
You should see a text output that says something along the lines of result 0. This means it was successful and the camera has started MJPEG on the sub stream.
In the same browser you should be able to view the stream by entering the following line.
http://X.X.X.X:XX/cgi-bin/CGIStream.cgi?cmd=GetMJStream&usr=XXXX&pwd=XXXX
In IP Camera Viewer app you must have the correct IP, port and user/pass entered correctly. For the stream URL you must enter the below line. Be careful to use the correct hyphen (-) and not (~) because they look very similar on the Roku keyboard.
/cgi-bin/CGIStream.cgi?cmd=GetMJStream&usr={0}&pwd={1}
The {0} and {1} do not need to be changed. This instructs the program to use the username and password you already entered in the fields above.
This was successful for my Foscam FI9821W. Hopefully this helps someone, cheers.