Giter VIP home page Giter VIP logo

android-sdk's Introduction

The repository is DEPRECATED

The code is moved to https://github.com/Backendless/java-sdk

Backendless SDK for Java and Android Build Status

Welcome to Backendless! In this document you will find the instructions for getting up and running with Backendless quickly. The SDK you downloaded contains a library (jar file) with the APIs, which provide access to the Backendless services. These services enable the server-side functionality for developing and running mobile and desktop applications. Follow the steps below to get started with Backendless:

  1. Create Developer Account. An account is required in order to create and manage your Backendless backend. You can login to our console at: http://backendless.com/develop
  2. Locate Application ID and API Key. The console is where you can manage the applications, their configuration settings and data. Before you start using any of the APIs, make sure to select an application in the console and open the "Manage" section. The "App Settings" screen contains the application ID and API keys, which you will need to use in your code.
  3. Open Backendless Examples. The SDK includes several examples demonstrating some of the Backendless functionality. The /samples folder contains an IDEA project file (AndroidSampleApps.ipr) combining all the samples.
  4. Copy/Paste Application ID and API Key. Each example must be configured with the application ID and API key generated for your application.
  5. Run Sample Apps.

Setting up your app

Maven Integration

The backendless client library for Android and Java is available through the central Maven repository. Since the version of Backendless deployed to maven changes frequently, make sure to lookup the latest version number from Maven Central. To add a dependency for the library, add the following to pom.xml (make sure to replace "VERSION FROM MAVEN" with a specific version number):

<dependency>
  <groupId>com.backendless</groupId>
  <artifactId>backendless</artifactId>
  <version>VERSION FROM MAVEN</version> 
</dependency>

Gradle Configuration

To configure Backendless library in Gradle, add the following line into the "dependencies" element in gradle.build ((make sure to replace "VERSION FROM MAVEN" with a specific version number):

dependencies {

 compile 'com.backendless:backendless:VERSION FROM MAVEN'

}

android-sdk's People

Contributors

alexnavara avatar anatoliistepaniuk avatar denyskonakhevych avatar echipachenko avatar ersin-ertan avatar joesilentjoe avatar juliavalchuk avatar kao78 avatar ksv105 avatar ksv510 avatar markpiller avatar mudr1k avatar oleg-vyalyh avatar pro0f avatar scadgek avatar schaffe avatar teraden-backendless avatar xommmax avatar yuriizaripa 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  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

android-sdk's Issues

Internal client exception

Hi,
I start to use backendless and I encountered a problem. Each my request throws an exception BackendlessFault{ code: 'Internal client exception', message: 'https://api.backendless.com/1.1/binary' }

I know, that this exception occurs if I try to send request in the MainThread. But. It throws anywhere. I tried to use many solutions like execute it on new thread, execute it in AsyncTask and execute it with RxJava. It occurs anywhere.

I tried to use sync method and async (with AsyncCallback). All the same I get an error.

I try to init app not in Application class but in Activity. It gives nothing.
I check my permissions in manifest and there is INTERNET permission and ACCESS_NETWORK_STATE

My phone is connected to Wi-Fi.

I use version from Maven 3.0.20.1

Hope, you will help me. Thanks.

Make getBackendlessUser public

Is it possible to make the getBackendlessUser method in UserServiceAndroidExtra public ?
I'm asking that because I develop my apps following the Clean Code Architecture + Conductor (no fragments at all) and Rx, which makes the parameters needed at facebookLogin an anti-pattern.
Simply passing along the Token result and mappings would be much easier.

Thanks!

Hostname "XXX.XXX.XXX.XXX" was not verified

On selfhosted i have Hostname "XXX.XXX.XXX.XXX" was not verified error after switching to https. the javascripts client works fine with that same url but i still get that message on android client.

Is there any way to disable certificate verification for my ip or how to fix that issue. the client is supposed to work with both http and https out of the box.

Thanks in advance.

Improve error message when wrong appVersion provided

Consider the following code:

Backendless.initApp( "51783F74-D851-497D-FF41-8F68DAABDB00", "987DB19C-DFF2-60C4-FF24-0C42615B6400", "1.0" );

Map<String, String> bear = new HashMap<>();
Backendless.Data.of( "Bear" ).save( bear );

In case version "1.0" doesn't exist, the user received the following error:
BackendlessException{ code: 'Internal client exception', message: 'https://api.backendless.com/1.0/binary' }

Need to edit this error message to something like Application version 1.0 does not exist.

java.lang.ExceptionInInitializerError

I am using version 5.2.4 .
previously when i was working on debug variant i had no issues.
but today when i tried to build signed release apk i faced this problem.
the app will crash when i call this method.
Backendless.initApp(this, Defaults.APPLICATION_ID, Defaults.API_KEY);

Caused by: java.lang.NullPointerException

LoginWithGooglePlusSDK deprecated

image

GoogleApiClient has been deprecated, have you thought about a solution for this?
It seems that we have to adjust this SDK to GoogleApi or GoogleSignInClient.

json data send like parse

I am parse user.

In parse there had a strong opportunity to send json push notifications.
If you implement this feature I think it will great for users to use backendless

Ignored parameters in custom services

The backend logic is ignored from the function "Backendless.CustomService.invoke" from the android client SDK
codeless
I have configured an "onBoarding" service with a "getPages" function which receives parameters, in iOS and javascript clients I have used "Backendless.CustomService.invoke" with parameters and I have received the correct result, but from android I receive a complete table, ignoring business logic.

Example:
Backendless.CustomService.invoke("onBoarding", "getPages", arrayOf("pageSize" to "1"), Onboarding::class.java, callback)

BackendlessUser update fails without password

After calling Backendless.UserService.login(..) with either email and password or via social logins (FB, Twitter) the next BackendlessUser.update(..) called from the first request's handleResponse(BackendlessUser user) fails due to User password cannot be null or empty.

If I provide a password the call finishes successfully (not viable for the social logins, of course).

The checkUserToBeProper(BackendlessUser user) in UserService.java seems to be the point, where the check is performed and the error is thrown.

Any ideas how to circumvent this issue?

Unsafe implementation of the WebViewClient.onReceivedSslError handler

Got this warning from Google play developer account "Your app(s) have an unsafe implementation of the WebViewClient.onReceivedSslError handler. Specifically, the implementation ignores all SSL certificate validation errors, making your app vulnerable to man-in-the-middle attacks. An attacker could change the affected WebView's content, read transmitted data (such as login credentials), and execute code inside the app using JavaScript."

Affected Class : com.backendless.SocialAsyncCallback$1;

loginWithGooglePlusSdk() not setting UserTokenStorageFactory token

When logging in, the process I use is Backendless.UserService.isValidLogin, then I require the token. Both must be valid when the application restarts-As per Validating User Login Documentation-

Logging into backendless with Backendless.UserService.login, the UserTokenStorageFactory token is being set after the successful AsyncCallback() response, I can verify this because the user token is then checked here, which then ends my login logic.

When using Backendless.UserService.loginWithGooglePlusSdk(), and upon the successful AsyncCallback() response, the user token which is checked here fails because UserTokenStorageFactory.instance().getStorage().get() token is null.

Gradle sync problem with version 3.0.17

Hello. When i`m adding dependency(compile 'com.backendless:backendless:3.0.17') to build.gradle and trying to sync it causes an error:

Error:Failed to resolve: weborb:weborbclient:5.1.0.206

With version 3.0.15.1 no errors.
How to fix this error?

Backendless crashes when no Internet connectivity

Backendless throws error when there's Internet without connectivity. For example it will throw an error while fetching or connecting when using a wifi network which has a failed Internet connection.

Build error using gradle

I'm using gradle to build an Backendless app.

compile 'com.backendless:android:3.0.6'

When compiling i get the following error:

Error:(34, 41) java: cannot access com.backendless.commons.AbstractBackendlessCollection
  class file for com.backendless.commons.AbstractBackendlessCollection not found

The code generating the error is this:
BackendlessCollection<T> collection = Backendless.Persistence.of(clazz).find(query);

The same error appears if i use
compile 'com.backendless:android:3.0.5'

The build only works if i download the android/java sdk from https://backendless.com/downloads/

Thank you.

AUTHENTICATION FAILED RuntimeException in BackendlessBroadcastReceiver

Seeing the following crash log coming back from users in production. Hasn't manifested a lot, but have gotten several bug reports already. Using Backendless SDK 3.0.15.1

Fatal Exception: java.lang.RuntimeException: Unable to start receiver com.example.MyApplication.CustomPushReceiver: java.lang.RuntimeException: AUTHENTICATION_FAILED
       at android.app.ActivityThread.handleReceiver(ActivityThread.java:2476)
       at android.app.ActivityThread.access$1700(ActivityThread.java:144)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1322)
       at android.os.Handler.dispatchMessage(Handler.java:102)
       at android.os.Looper.loop(Looper.java:212)
       at android.app.ActivityThread.main(ActivityThread.java:5135)
       at java.lang.reflect.Method.invokeNative(Method.java)
       at java.lang.reflect.Method.invoke(Method.java:515)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:877)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:693)
       at dalvik.system.NativeStart.main(NativeStart.java)
Caused by java.lang.RuntimeException: AUTHENTICATION_FAILED
       at com.backendless.push.BackendlessBroadcastReceiver.onError(BackendlessBroadcastReceiver.java:148)
       at com.backendless.push.BackendlessBroadcastReceiver.handleRegistration(BackendlessBroadcastReceiver.java:292)
       at com.backendless.push.BackendlessBroadcastReceiver.handleIntent(BackendlessBroadcastReceiver.java:159)
       at com.backendless.push.BackendlessBroadcastReceiver.onReceive(BackendlessBroadcastReceiver.java:128)
       at android.app.ActivityThread.handleReceiver(ActivityThread.java:2469)
       at android.app.ActivityThread.access$1700(ActivityThread.java:144)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1322)
       at android.os.Handler.dispatchMessage(Handler.java:102)
       at android.os.Looper.loop(Looper.java:212)
       at android.app.ActivityThread.main(ActivityThread.java:5135)
       at java.lang.reflect.Method.invokeNative(Method.java)
       at java.lang.reflect.Method.invoke(Method.java:515)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:877)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:693)
       at dalvik.system.NativeStart.main(NativeStart.java)

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.