1

In 2016 I released an app that used parse (and parse.com) to store some data, it worked really well. I published it on Google Play and I had almost 5k downloads. In 2017 parse.com was shut down. I did not have the time to move to another server so I unpublished it from Google Play. Now in 2018 I want to take it back online. I found that back4app.com is working with parse API. I spent some weeks updating my code and now it is working fine when I run it on Android Studio and let it install the app on my phone. However, yesterday I published a beta version on google play and some of my friends said that it was not working properly. I checked it on my phone and what I noticed is that when I install it directly from google play my back4app connection does not work.

Is there a work around for it? Is it related with permissions? What I do not understand is why it is working perfectly fine in my cell phone when android studio installs it and it is not communication with the server when it is installed directly from google play.

Below I am attaching my gradle hoping that there is something wrong here.

apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    buildToolsVersion '25.0.3'

    defaultConfig {
        applicationId "package.name"
        minSdkVersion 21
        targetSdkVersion 26
        multiDexEnabled true
        versionCode 13
        versionName "1.9.2"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    dexOptions {
        // Prevent OutOfMemory with MultiDex during the build phase
        javaMaxHeapSize "2048"
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    // Fancy Button
    compile 'com.android.support:appcompat-v7:26.0.0'
    compile 'info.hoang8f:fbutton:1.0.5'
    // Parse
    // Compile 'com.parse.bolts:bolts-android:1.+'
    compile 'com.parse:parse-android:1.16.3' //update version to the latest one
    compile fileTree(dir: 'libs', include: 'Parse-*.jar')
    // AdBuddiz
    compile 'com.purplebrain.adbuddiz.sdk:AdBuddiz-Java:3.+'
    // Push
    compile 'com.parse.bolts:bolts-android:1.+'
    compile 'com.google.firebase:firebase-core:10.0.1'
    compile 'com.google.firebase:firebase-messaging:10.0.1'
    // Pushes Firebase service
    apply plugin: 'com.google.gms.google-services'
}

repositories {
    maven {
        url 'http://repository.adbuddiz.com/maven'
        }
    maven {
        url "http://maven.google.com"
        }
    jcenter()
}
TylerH
  • 20,799
  • 66
  • 75
  • 101
Will
  • 804
  • 2
  • 8
  • 17
  • Bug descriptions without a clear logcat trace are mostly useless here on SO. Edit your question and add concrete problems on the error that occurs. – Robert Mar 11 '18 at 13:29
  • Thanks for your reply Robert. I do not know what can I post here to help because my app is compiling without errors and it is also creating the signed apk without errors. There is something wrong going on between those. I will post my gradle configurations, maybe there is something interesting there. Thanks again! – Will Mar 11 '18 at 13:39

1 Answers1

2

After some hours testing my code I finally found my error.

I was erroneously adding three times the same parse library, two were outdated and another one was the right one. See below:

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar']) <- HERE
    // Fancy Button
    compile 'com.android.support:appcompat-v7:26.0.0'
    compile 'info.hoang8f:fbutton:1.0.5'
    // Parse
    // Compile 'com.parse.bolts:bolts-android:1.+'
    compile 'com.parse:parse-android:1.16.3' //update version to the latest one  <- THIS IS THE ONLY ONE I NEED!
    compile fileTree(dir: 'libs', include: 'Parse-*.jar')  <- HERE
    // AdBuddiz
    compile 'com.purplebrain.adbuddiz.sdk:AdBuddiz-Java:3.+'
    // Push
    compile 'com.parse.bolts:bolts-android:1.+'
    compile 'com.google.firebase:firebase-core:10.0.1'
    compile 'com.google.firebase:firebase-messaging:10.0.1'
    // Pushes Firebase service
    apply plugin: 'com.google.gms.google-services'
}

So all I had to do was remove this two and leave the right one.See below:

dependencies {
    // Fancy Button
    compile 'com.android.support:appcompat-v7:26.0.0'
    compile 'info.hoang8f:fbutton:1.0.5'
    // Parse
    // Compile 'com.parse.bolts:bolts-android:1.+'
    compile 'com.parse:parse-android:1.16.3' //update version to the latest one  <- THIS IS THE ONLY ONE I NEED!
    // AdBuddiz
    compile 'com.purplebrain.adbuddiz.sdk:AdBuddiz-Java:3.+'
    // Push
    compile 'com.parse.bolts:bolts-android:1.+'
    compile 'com.google.firebase:firebase-core:10.0.1'
    compile 'com.google.firebase:firebase-messaging:10.0.1'
    // Pushes Firebase service
    apply plugin: 'com.google.gms.google-services'
}

I almost deleted this question but I believe that is good to leave it here to teach us that sometimes is really easy to solve a huge problem. All you need is to pay a little more attention to your code =/ My bad!

Will
  • 804
  • 2
  • 8
  • 17