I’m trying to use DreamFactory from GitHub with Android Studio, but my attempts haven’t been successful so far.
How can I import this library and use it for connecting to dream.factory.cloud ?
The guide is for Eclipse, and not for Android Studio. Also, the sample app does not use Gradle. I don’t know how to fix this, and I would need some pointers.
We have not used Android Studio before, only Eclipse. Once you accomplish this import, please post back with a tutorial so other users can benefit! Same goes with Gradle integration. The community would certainly appreciate your experience.
Hi,
thanks for the Android Studio project, it imports with no errors.
But I’m facing an error with the session after logout. I mean, I get in first time OK, I logout, and then when I login back again, I select either “To-Do List Demo” or “File APIs Demo” and I always get a 401 from the server, with message “There is no valid session for the current request.”.
This repeats until I close the application (sweep from the alt+tab alike list of running apps at android).
Message says there is no valid session, this means when app is getting logged out session is cleared but app/activity is not getting destroyed. Try to Close activity and check session before going to next screen. If session in null then go with login flow again.
Hi,
I found the root cause of the error. At logout there’s a hashmap entry from defaultHeaderMap @ ApiInvoker that needs to be removed. As it is a private var, I had to modify the SDK:
public void removeDefaultHeader(String key) {
defaultHeaderMap.remove(key);
}
In logout method, at BaseActivity, a new line was added:
Also, I replaced all the SharedPreferences clear values from empty to null, because there’s at least one if that wasn’t matching at MainActivity, triggering an additional HTTP request to the DSP:
Hi I am new to this dream factory environment. I had downloaded Sample app which is converted to Android Studio through your link Can you help me how to get connected to the service that I created in dream factory through android app.