Coder Social home page Coder Social logo

android-sdk's People

Contributors

connorfoody avatar fehguy avatar nirm3l avatar specialjyo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

android-sdk's Issues

Problems after migrating to gradle

Hi,
After I managed to overcome the previous issue of not able to add the src folder, now I face a similar issue. The issue is this.
After I export the project from eclipse, this is to migrate to gradle from ant (as the current project is in Github), I am having hard time getting the src folder to be imported to the project even though I sucessfully managed to import in to android studio and utilizing gradle now.

Sorry newbie question

Tried importing the project in to eclipse.
But I think it is not importing the .java files from the src folder. Please assist on how to.
It would be a great help for everyone if you could just upload the Android Studio version as it is the official IDE for Android moving forward. Tks

Avoid Extending Application

I noticed the example is extending Application in DreamFactoryApp.java. As far as I know this isn't really best practice. It would be better to do the following:

Pass the context when getting an instance:

public class DreamFactoryAPI {

    private static DreamFactoryAPI INSTANCE;

    private final Context mContext;

    private Retrofit retrofit;

    private OkHttpClient httpClient;

    private static Converter<ResponseBody, ErrorMessage> errorConverter;

    public static String testToken;

    public static Boolean runningFromTest = false;

    public static DreamFactoryAPI getInstance(@NonNull Context context) { //context passed in here
        synchronized(DreamFactoryAPI.class) {
            if (INSTANCE == null) {
                INSTANCE = new DreamFactoryAPI(context);
            }
            return INSTANCE;
        }
    }

    private DreamFactoryAPI(@NonNull Context context) {  //context is part of the constructor
        mContext = context.getApplicationContext();

        httpClient = new OkHttpClient.Builder().addInterceptor(new Interceptor() {
// existing code
}

Then in the in the activity just pass this context when making a call to the DreamFactoryAPI.

final AuthService service = DreamFactoryAPI.getInstance(this).getService(AuthService.class);

Then move some of the normal saved data like the session to a normal public interface class for shared preferences.

"Authentication error: Unable to respond to any of these challenges" when trying to update the contact table

Hi,I am trying to play with this example to see what is possible but getting the error:
Authentication error: Unable to respond to any of these challenges: {}
When I try to add new contacts in the contact table using AddContactTask: Below is is the output I am getting,any pointers on what I might be doing wrong?

invokeAPI() called with: host = [https://df-ft-wayadn.enterprise.dreamfactory.com/api/v2], path = [/db/_table/contact], method = [POST], queryParams = [null], body = [{"first_name":"Gakwaya","twitter":"Twitt","image_url":"Image.png","last_name":"Daniel","notes":"Note","skype":"nSkype","id":51}], headerParams = [{X-DreamFactory-Session-Token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjMsInVzZXJfaWQiOjMsImVtYWlsIjoid2F5YWRuODhAZ21haWwuY29tIiwiZm9yZXZlciI6ZmFsc2UsImlzcyI6Imh0dHBzOlwvXC9kZi1mdC13YXlhZG4uZW50ZXJwcmlzZS5kcmVhbWZhY3RvcnkuY29tXC9hcGlcL3YyXC91c2VyXC9zZXNzaW9uIiwiaWF0IjoxNDYzOTc0MjM2LCJleHAiOjE0NjM5Nzc4MzYsIm5iZiI6MTQ2Mzk3NDIzNiwianRpIjoiNWIwODRlYThlZmZlZTBhZTUxYzdjMmQ4ZThkMDdmYzYifQ.9mfHzj_01-Ib5poK8TniJ9KEjC2_0ANb-2QaxLR2D2g, X-DreamFactory-Api-Key=20bd49da217c202bbef4f02b5c048703a9yyyyyyyyyyf57e096c1dad34934970}], contentType = [application/json], fileRequest = [null] 05-23 14:42:38.706 28430-28495/com.blikoon.dreamfactorytest W/DefaultRequestDirector: Authentication error: Unable to respond to any of these challenges: {} 05-23 14:42:38.716 28430-28495/com.blikoon.dreamfactorytest E/AddContactTask: going to on_failure() for an ApiException 05-23 14:42:38.716 28430-28495/com.blikoon.dreamfactorytest E/AddContactTask::baserequest::onError: com.blikoon.dreamfactorytest.dfapi.ApiException: {"error":{"context":null,"message":"Token has expired","code":401,"trace":["0 [internal function]: DreamFactory\\Http\\Middleware\\AccessCheck->handle(Object(Illuminate\\Http\\Request), Object(Closure))","1 /var/www/_releases/instance/dreamfactory/2.0.4/bootstrap/cache/compiled.php(9511): call_user_func_array(Array, Array)","2 [internal function]: Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))","3 /var/www/_releases/instance/dreamfactory/2.0.4/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\\Http\\Request))","4 [internal function]: Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))","5 /var/www/_releases/instance/dreamfactory/2.0.4/bootstrap/cache/compiled.php(9501): call_user_func(Object(Closure), Object(Illuminate\\Http\\Request))","6 /var/www/_releases/instance/dreamfactory/2.0.4/bootstrap/cache/compiled.php(9025): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))","7 /var/www/_releases/instance/dreamfactory/2.0.4/bootstrap/cache/compiled.php(9012): Illuminate\\Routing\\ControllerDispatcher->callWithinStack(Object(DreamFactory\\Http\\Controllers\\RestController), Object(Illuminate\\Routing\\Route), Object(Illuminate\\Http\\Request), 'handlePOST')","8 /var/www/_releases/instance/dreamfactory/2.0.4/bootstrap/cache/compiled.php(8099): Illuminate\\Routing\\ControllerDispatcher->dispatch(Object(Illuminate\\Routing\\Route), Object(Illuminate\\Http\\Request), 'DreamFactory\\Ht...', 'handlePOST')","9 /var/www/_releases/instance/dreamfactory/2.0.4/bootstrap/cache/compiled.php(8086): Illuminate\\Routing\\Route->runController(Object(Illuminate\\Http\\Request))","10 /var/www/_releases/instance/dreamfactory/2.0.4/bootstrap/cache/compiled.php(7800): Illuminate\\Routing\\Route->run(Object(Illuminate\\Http\\Request))","11 [internal function]: Illuminate\\Routing\\Router->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))","12 /var/www/_releases/instance/dreamfactory/2.0.4/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(52): call_user_func(Object(Closure), Object(Illuminate\\Http\\Request))","13 [internal function]: Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))","14 /var/www/_releases/instance/dreamfactory/2.0.4/bootstrap/cache/compiled.php(9501): call_user_func(Object(Closure), Object(Illuminate\\Http\\Request))","15 /var/www/_releases/instance/dreamfactory/2.0.4/bootstrap/cache/compiled.php(7801): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))","16 /var/www/_releases/instance/dreamfactory/2.0.4/bootstrap/cache/compiled.php(7792): Illuminate\\Routing\\Router->runRouteWithinStack(Object(Illuminate\\Routing\\Route), Object(Illuminate\\Http\\Request))","17 /var/www/_releases/instance/dreamfactory/2.0.4/bootstrap/cache/compiled.php(7782): Illuminate\\Routing\\Router->dispatchToRoute(Object(Illuminate\\Http\\Request))","18 /var/www/_releases/instance/dreamfactory/2.0.4/bootstrap/cache/compiled.php(2393): Illuminate\\Routing\\Router->dispatch(Object(Illuminate\\Http\\Request))","19 [internal function]: Illuminate\\Foundation\\Http\\Kernel->Illuminate\\Foundation\\Http\\{closure}(Object(Illuminate\\Http\\Request))","20 /var/www/_releases/instance/dreamfactory/2.0.4/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(52): call_user_func(Object(Closure), Object(Illuminate\\Http\\Request))","21 /var/www/_releases/instance/dreamfactory/2.0.4/vendor/dreamfactory/df-managed/src/Http/Middleware/ClusterAuditor.php(45): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))","22 [internal function]: DreamFactory\\Managed\\Http\\Middleware\\ClusterAuditor->handle(Object(Illuminate\\Http\\Request), Object(Closure))","23 /var/www/_releases/instance/dreamfactory/2.0.4/bootstrap/cache/compiled.php(9511): call_user_func_array(Array, Array)","24 [in

SSL Support

Does the DF API code support SSL? Are there any docs on DF Andoid SDK security?

The API should probably have some notes about SSL because the app is sending user passwords...
Especially because it's quite easy to support SSL on the bitnami image.

User Register Improvements

The RegisterTask doesn't handle passwords that are too short. The DF REST API requires a minimum of 6 characters in the password (oddly you can break this rule from the DF Admin Console, bug?).

Should this be checked directly in the Android text field? Or should the DF API throw an exception that the password is too short?

Another small note. If you don't set the DF instance user service: Open Reg Email to blank, the "login" queryParams won't actually work because confirmation is required.

missing model class com.dreamfactory.model.Records

I downloaded zip as of July 27 2014 10 AM IST - and the code fails to compile at multiple places as it is looking for this record

am I missing something ?

NOTE - I had downloaded the code ( Download ZIP )
Thanks
akila
git_issue

Apache Client HTTP Library Deprecated

Android API 23 has deprecated Apache client HTTP library. HTTP client should be replaced with HttpURLConnection. Unfortunately it might be a big change and not implemented for a while, but I figured I should make it an issue. That way other people who are reading this that try to implement the DF android SDK in Android 6.0 (API 23) know why gradle complains.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.