Adding backendless.jar from the SDK distribution to your project classpath

Hello.
I will be using your service and got two questions

  1. What is the best way and location to effectively import this into my existing project. Can I copy past the .jar file right inside the lib or src or assets folder? Which classpath can i drop this correctly or import? pls give me a clear guide.
  2. my chat app does not use email confirmation to authenticate users but phone number (sms). On this guide: https://backendless.com/mobile-developers/quick-start-guide-for-android/
    Can I skip 9,11,12 guide as below:?
  3. “Add some code which uses the Backendless API to test your application”
  4. “Another Backendless API example creates and saves a plain Java object from the Android client.”
  5. “Use the code snippet below to store an instance of the “Comment” class from the registered user:”

Hi Sheg,

Adding backendless dependency is not any different than any other library. If you use Android Studio, you can add it into build.gradle:

dependencies {
compile ‘com.backendless:backendless:3.0.8.2’
}

Alternatively, you should be able to copy it into the libs folder (assuming the folder is added as the location of dependencies).
Regards,Mark

I have already added same to an existing /libs folder

in main activity I added import com.backendless.Backendless;
but on hover, i saw unused imported statement
I have added the below and also got error saying… already exist
this is my existing code http://prnt.sc/agbdmn

@Override
public void onCreate( Bundle savedInstanceState )
{
super.onCreate( savedInstanceState );
setContentView( R.layout.main );
String appVersion = “v1”;
Backendless.initApp( this, xxxxxxxxxxxxxxxxx, xxxxxxxxxxxxxxx, appVersion );
}

Can you show the exact error you’re getting?

Please give me a video detailing how to achieve success… where exactly to drop it… I might end up spending weeks on this with messages

This is actual situation http://prnt.sc/agbp7w

The error shown in the screenshot has nothing to do with Backendless. You might be better off asking the question about that error on stackoverflow.com

Regards,
Mark

Nope. it is. when I remove your code, error disappeared.

You declare two methods with identical signatures in the same class. How is it a problem with Backendless???

http://support.backendless.com/public/attachments/a5342f52183ceea4dfc97945a041e5ac.jpg</img>

That is why I said it already exist… you dont answer someone who needs a help in that manner… simply point out what is wrong and what is right. If I have to remove my default method, the original purpose for it will be defeated.

Let me know which other logic to employ to make it work… we are not fighting

As far backendless initialization is concerned you need to include the Backendless.initApp method call when the application starts up. Creating a duplicate method is wrong just from the perspective of how the Java language works. Move the initApp call to the method that was already there and get rid of the method you added.

OK I have remove the method and added the initApp, it couldnt compile after cleaning the project, restarting the android studios:

Here is the screenshot: http://prnt.sc/agod8l

Hi Sheg,

I think this tutorial will be of great use for you: http://mathbits.com/MathBits/Java/DataBasics/Strings.htm

Sheg,

You are very close! The second, third and fourth arguments of the initApp method are String values, as a result, they must be surrounded by double quotes, like this:

“I am a Java String”

Hope this helps.
Mark

Success made!!!

Next, the below 9, 11 and 12 guide code, should be added to the manifext or main class?
9) “Add some code which uses the Backendless API to test your application”
11) “Another Backendless API example creates and saves a plain Java object from the Android client.”
12) “Use the code snippet below to store an instance of the “Comment” class from the registered user:”

For the steps 9, 11 and 12 you would need to add it to the application code. Manifest should not have any Java code in it.

am progressing… now my application runs with minifyEnabled

can I add this following line?
-keep class com.backendless.** {*;}

My application uses proguard, it necessary to add the below:?
-dontwarn com.backendless.-dontwarn weborb.-keep class weborb.** {*;}
advise accordingly

You need all of them. Please see the “Proguard Configuration” on the following page:
https://backendless.com/documentation/users/android/users_requirements.htm

I have dropped in your sdk , update main activity, added ap id, fb connect, gcm and etc and all on both my app and backendless dev portal. OK progress made and i can export apk successfully…
Now whats next to get connected?

Please help to proceed

I have dropped in your sdk , update main activity, added ap id, fb connect, gcm and etc and all on both my app and backendless dev portal. OK progress made and i can export apk successfully…
Now whats next to get connected? am building for android

Hi Sheg,

Recall us please what are you trying to achieve?

Regards, Artur.