I'm new with android stuff..
I'm implementing a app which connect to a Jasper Server, and have to retrieve the reports list/folders/dashboard in repository.
So i did 3 Classes, Main Activity, Connection and Browsing.
1)Connection ( Host, User, Pass).
With method Connect(), which perform the connection and return an int which is the status code as Server Response (200-400-500)..
2) Browsing( Connection C)
Method browse which do connection.connect()..and the other actions that GET XML as response, returns string(the xml) that Will be parsed
3)Then i put in my main Activity, in the AsyncTask ...in the method onCreate, i inizialize connection obj... Forward it throught the task.execute() to the AsyncTask .
In the AsyncTask i inizialize browse obj, and try to retrieve the XML String with browse method.
Now, if i print results of the method , i GET 401 error from server (unauthorizated) but if i try connection.connect() on it self it works perfectly (code 200).
Or how can i do Rest Operationwithout login everytime?
The best would be if some1 knows how to use JasperReport classes for Android!