Code

AroundMe | Android Universal Geolocation Questions App Template

AroundMe | Android Universal Geolocation Questions App Template














18 April 2018
• Added a 'showInterstitial()' method in Configs.java
• Replaced the AdMob banner code in QuestionsList.java,  Home.java, ActivityScreen.java and Account.java with a call to show interstitial ads | Adjusted views in their relative xml files
• Added a ADMOB_INTERSTITIAL_UNIT_ID string in strings.xml
• Added some code to save Activity in the QuestionDetails.java -> 'favoriteButt()' method, for favorite questions
17 April 2018
• Added new Firebase dependencies in build.gradle(Module: app)
• Removed the 'com.google.android.gms:play-services:+' implementation and updated all dependencies to the required ones only 
• Added the 'google-services' classpath in the dependencies{} list in build.gradle(Project:)
        classpath 'com.google.gms:google-services:3.2.1'

• Added this Permission into Manifest.xml:
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />

• Fixed Build issue in line 224 in the 'settings_screen.xml' file
• Fixed Build issue in line 19 in the 'splash_screen.xml' file
• Updated the Documentation (connect your App to Firebase for GCM and Ads)
15 April 2018
• Updated to Android Studio 3.1.1
• Removed all dependencies of play-services | left only this one in build.gradle:
     implementation 'com.google.android.gms:play-services:+'
10 April 2018
• Updated to Android Studio 3.1
• Updated 'compileSdkVersion' and  'targetSdkVersion' to 27 in build.gradle
• Replaced 'compile' with 'implementation' in build.gradle (Module: app)
• Updated classpath 'com.android.tools.build:gradle:3.1.1' in build.gradle (Project:)
Jan 21th 2018
• Added this line in the dependencies list of build.gradle (Module: app):
    compile 'com.squareup.okhttp3:okhttp:+'
Jan 4th 2018
• Added this line of code into the  aList.setOnItemLongClickListener() method in Account.java:
    Configs.hidePD();
so the Alert will dismiss after removing a favorited question
Dec 18th 2017
• Edited the Geocoder code in Home.java as it follows, in order to prevent a crash in case of no address found:
      addresses = geocoder.getFromLocation(latitude, longitude, 1);
         if (Geocoder.isPresent()) {
              if (addresses.size() != 0) {
                   Address returnAddress = addresses.get(0);
                   String city = returnAddress.getLocality();
                   String country = returnAddress.getCountryName();
                   cityCountryStr = city + " - " + country;
              } 
Nov 2nd 2017
• Updated to Android Studio 3 and buildToolsVersion to 26.0.2
Oct 1st 2017
• Added some lines of code into 'signupButt()' method in SignUp.java that save a default avatar in the User class 
• Added a custom 'pd.xml' file in the 'layout' folder and some code into Confgs.java (showPD()  and hidePD() methods), which are used to replace the ProgressDialog code in the java files (that's because ProgressDialog is deprecated by API 26 | Android O)
So I've replaced all the:
    pd.dismiss();
    pd.setMessagge();
    pd.show();

with the new lines of code to show and hide the custom ProgressDialog, which start with:
   Configs.showPD()
   Configs.hidePD()

• Added this line of code:
    currentLocation = new Location("provider");
right above this one:
    currentLocation.setLatitude(Configs.DEFAULT_LOCATION.latitude);

into Home.java, OtherUserProfile.java, QuestionsList.java and Account.java -> 'onLocationChanged()' method, in order to the app to initialize the default Location properly in case of no GPS signal or no Location permission granted
• Edited 'queryQuestions()' method into QuestionsList.java, Account.java and Home.java
• Edited the 'submitButt' into AskQuestion.java
Sep 5th 2017
• First release | Android Studio 2.3.3 | Android 5.0+
• Backend with Parse SDK hosted on https://back4app.com




AroundMe is a Universal App Template where you can post and share geolocated questions on a Map and comment the questions sent by other users.

This app is useful for all those ones who need to find help nearby, lost something, looking for places around their area or just socialize and find new friends while you’re on vacation in a certain place.
Users can comment, favorite and share questions, as well as report inappropriate/offensive comments/posts.
AroundMe includes a Settings screen where you can edit your own Profile, rate the app on the App Store and follow your social networks pages, as well as read the terms of Use and contact the Admin of the app.

There’s also a nice set of Badges that will be shown on the top of the Profile screens based on the Thank You’s you’ve received for your own comments.
This app includes a Report inappropriate content feature, embedded Google Map and Terms of User HTML file.

Since its backend is by Parse you don’t have to buy any domain/hosting, there are NO PHP files to upload to a web server so you’ll save some money for server side.

AroundMe is a native Android Studio project, Java/XML language, Universal, Parse SDK hosted on http://back4app.com, super easy to customize.




About Parse SDK and back4app

Read this article for more info about back4app and Parse SDK: https://hubpages.com/technology/Parse-SDK-will-not-shutdown-in-thanks-to-back4app

Can I host Parse Server on my own server?

Yes, although I don’t provide support for the setup process, you can read the official Guide here: http://parseplatform.org

What about free support for this template?

I can offer free support for bugs encountered in the original code. Instead, if you’ve edited the code and messed something up with it, I may apply some fee to fix it either via TeamViewer or by checking your app project files directly on my computer.

How do I rename the app’s package name?

Read this tutorial to learn how to rename a package name: https://hubpages.com/technology/Android-How-to-rename-an-app-package

Should I use the latest version of Android Studio to edit this template?

Yes, I always update my apps to the latest version of the IDE and you also should make sure you’ve updated the Android Tools to their latest version of the Android SDK manager.

The demo APK crashes on startup

Make sure that the minimum Android version of your device is the one listed in the FEATURES section below. If the problem persists, please contact me through my profile’s contact form and send me the Logcat message of you get when the app crashes along with the steps you made to reproduce the crash. Please note that not all real devices print an error Logcat message, in this case just run the APK into the Android Studio’s emulator and you’ll surely get the red messages about your issue.

How do I remove AdMob banner ads?

  1. Enter the .xml files where there’s an AdView and remove its code:
        <com.google.android.gms.ads.AdView
            android:id="@+id/admobBanner" 
            android:layout_width="wrap_content" 
            android:layout_height="wrap_content" 
            ads:adSize="BANNER" 
            ads:adUnitId="@string/ADMOB_BANNER_UNIT_ID" 
            android:layout_alignParentBottom="true" 
            android:layout_centerHorizontal="true">
        </com.google.android.gms.ads.AdView>
    
  2. Enter the .java files where there’s an AdRequest instance into its onCreate() method and remove its code:
            // Init AdMob banner
            AdView mAdView = (AdView) findViewById(R.id.admobBanner);
            AdRequest adRequest = new AdRequest.Builder().build();
            mAdView.loadAd(adRequest);
    
  3. Lastly, remove the play-services-ads reference in the build.gradle file:
        compile 'com.google.android.gms:play-services-ads:+'
    






  • Android Studio 3.x project – Java/XML
  • Universal – Android 5.0+
  • AdMob banners
  • Works with Parse SDK hosted on back{4}app
  • Push Notifications for Comments and Thank you’s
  • Settings screen
  • Terms Of use HTML file (to be edited)
  • Report inappropriate/offensive users/content
  • ‘Thank you’ reward badges
  • PDF User Guide included
  • PSD icon graphics included
  • Easy to customize, well commented code


  • Apple Mac or Windows PC with their latest OS version installed
  • The latest version of Android Studio and some knowledge about its UI interface
  • Photoshop or any other image editor software
  • A Google Developer account to submit apps to the Play Store
  • An AdMob account to generate your own banner UNIT ID
  • A free account on back4app.com











by
by
by
by
by
by