Problems accessing a PDF file that is in the internal NETWORK in my android application
<p>can someone help me ?</p>

<p>I have an android application that locates the file on the network and gets its URL.</p>

<p>This URL is passed as a parameter when calling the Adobe Reader, but it does not open the document.</p>

<p>The URL format is returning "http://192.168.1.1..........ex.pdf"</p>

<p>This is a code:</p>

<p>The variable DOC is a URL.</p>

<pre><code>                    try {
                                Intent intent = new Intent();
                                intent.setPackage("com.adobe.reader");
                                intent.setDataAndType(Uri.parse(doc), "application/pdf");


                                startActivity(intent);


                    } catch (ActivityNotFoundException activityNotFoundException) {
                                activityNotFoundException.printStackTrace();


                                throw activityNotFoundException;
                    } catch (Exception otherException) {
                                otherException.printStackTrace();


                                throw otherException;
                    }
                }


                                    if(selectedDocumentURL.contains(".pdf"))
                                    {
                                              try {
                                                        loadDocInReader(selectedDocumentURL);
                                              } catch (ActivityNotFoundException e) {
                                                        // TODO Auto-generated catch block
                                                        e.printStackTrace();
                                              } catch (Exception e) {
                                                        // TODO Auto-generated catch block
                                                        e.printStackTrace();
                                              }
                                    }else
                                    {
                                    Intent showPic = IntentFactory.createShowPicture(
                                                        WorkOrderDocumentsTable.this, selectedDocumentURL);
                                    startActivity(showPic);
                                    }

                          } else {
                                    showDialog(getResources().getString(R.string.Atte ntion),
                                                        ((Exception) msg.obj).getMessage());
                          }
                          progress.dismiss();
                };
      };
</code></pre>

<p>Thanks !</p>
