SDK SETUP


This section describes setup and configuration of the Android Development Environment necessary for building Healthix mobile applications.

Java Development Kit (JDK)

The Java Development Kit is a prerequisite for the Android Eclipse IDE (which comes with the ADT Bundle) as well as Apache Ant.

Android Development Tools Bundle

The Android Development Tools (ADT) Bundle includes everything needed to begin developing Java Android

  • Android SDK Tools
  • Android Platform Tools
  • Latest Android Platform
  • Latest System Image for Emulator
android {
    compileSdkVersion 25
    buildToolsVersion '25.0.3'
    defaultConfig {
        applicationId "com.healthixsolution.provider.healthixprovider"
        minSdkVersion 16
        targetSdkVersion 25
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        vectorDrawables.useSupportLibrary = true
    }

Setting up your Android Studio Project


For an existing app:

  1. Open the build.gradle file inside your application module directory. Android Studio projects contain a top level build.gradle file and a build.gradle for each module. Make sure to edit the file for your application module.
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.3.3'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        maven { url "https://jitpack.io" }
        jcenter()
        mavenCentral()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

Add a new build rule under dependencies for the latest version of android. For example:

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support:appcompat-v7:25.3.1'
    compile('com.squareup.retrofit2:converter-simplexml:2.1.0') {
        exclude group: 'xpp3', module: 'xpp3'
        exclude group: 'stax', module: 'stax-api'
        exclude group: 'stax', module: 'stax'
    }
    compile 'com.android.support:appcompat-v7:25.3.1'
    compile 'com.android.support:design:25.3.1'
    compile 'com.hbb20:ccp:1.7.1'
    compile 'com.android.support:cardview-v7:25.3.1'
    compile 'com.android.support:recyclerview-v7:25.3.1'
    compile 'com.google.code.gson:gson:2.8.0'
    compile 'com.squareup.retrofit2:converter-gson:2.1.0'
    compile 'com.squareup.retrofit2:retrofit:2.1.0'
    compile 'com.squareup.okhttp3:okhttp:3.5.0'
    compile 'com.squareup.okhttp3:logging-interceptor:3.5.0'
    compile 'com.toptoche.searchablespinner:searchablespinnerlibrary:1.3.1'
    compile 'de.hdodenhof:circleimageview:2.1.0'
    compile 'com.github.bhargavms:DotLoader:1.0.1'
    compile 'com.skyfishjy.ripplebackground:library:1.0.1'
    compile 'com.github.bumptech.glide:glide:3.7.0'
    compile 'de.codecrafters.tableview:tableview:2.5.0'
    compile 'com.github.smart-fun:Perm:1.0.0'
    compile 'com.tbruyelle.rxpermissions2:rxpermissions:0.9.1@aar'
    compile 'uk.co.chrisjenx:calligraphy:2.2.0'
    compile 'org.jsoup:jsoup:1.10.2'
    compile 'com.mikhaellopez:circularfillableloaders:1.2.0'
    compile 'com.github.paolorotolo:appintro:4.1.0'
    compile 'cn.pedant.sweetalert:library:1.3'
    compile 'org.sufficientlysecure:html-textview:3.2'
    compile 'com.weiwangcn.betterspinner:library-material:1.1.0'
    compile 'com.jakewharton:butterknife:8.4.0'
    compile 'com.thoughtbot:expandablecheckrecyclerview:1.4'
    compile 'com.joanzapata.iconify:android-iconify-fontawesome:2.2.2'
    compile 'com.joanzapata.iconify:android-iconify-material:2.2.2'
    compile 'com.joanzapata.iconify:android-iconify-typicons:2.2.2'
    compile 'com.joanzapata.iconify:android-iconify:2.2.2'
    compile 'com.afollestad:digitus:0.3.0'
    compile 'com.android.support:support-v4:25.3.1'
    compile 'com.android.support:support-vector-drawable:25.3.1'
    testCompile 'junit:junit:4.12'
    annotationProcessor 'com.jakewharton:butterknife-compiler:8.4.0'
}

CONFIGURE MANIFEST

androidManifest.xml has the following:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="com.healthixsolution.provider.healthixprovider">

    <uses-permission
        android:name="android.permission.INTERNET"
        android:required="true" />
    <uses-permission
        android:name="android.permission.ACCESS_NETWORK_STATE"
        android:required="true" />
    <uses-permission
        android:name="android.permission.USE_FINGERPRINT"
        android:required="true" />

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/AppTheme"
        tools:replace="android:icon">
        <activity
            android:name=".SplashScreenActivity"
            android:theme="@style/AppFullTheme">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name=".IntroActivity"
            android:theme="@style/AppFullTheme"></activity>
        <activity android:name=".LoginActivity"></activity>
        <activity
            android:name=".HospitalActivity"
            android:parentActivityName=".LoginActivity"></activity>
        <activity android:name=".MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>
        <activity
            android:name=".BrowserActivity"
            android:label="@string/title_activity_insure_check"
            android:parentActivityName=".HospitalActivity"
            android:theme="@style/AppTheme" />
        <activity
            android:name=".InsureCheckActivity"
            android:label="@string/title_activity_insure_check"
            android:parentActivityName=".HospitalActivity"
            android:theme="@style/AppTheme" />
        <activity
            android:name=".SearchedInsureCheckActivity"
            android:label="Recent InsureCheck"
            android:parentActivityName=".HospitalActivity"
            android:theme="@style/AppTheme" />
        <activity
            android:name=".PatientActivity"
            android:label="Patient"
            android:parentActivityName=".InsureCheckActivity"
            android:theme="@style/AppTheme" />
        <activity
            android:name=".FindMemberActivity"
            android:label="Find Member"
            android:parentActivityName=".HospitalActivity"
            android:theme="@style/AppTheme" />
        <activity
            android:name=".FindAuthActivity"
            android:label="Find Member"
            android:parentActivityName=".HospitalActivity"
            android:theme="@style/AppTheme" />
        <activity
            android:name=".ViewAuthActivity"
            android:label="View Auth"
            android:parentActivityName=".HospitalActivity"
            android:theme="@style/AppTheme" />
        <activity
            android:name=".AuthSearchActivity"
            android:label="AuthLetter"
            android:parentActivityName=".FindMemberActivity"
            android:theme="@style/AppTheme" />
        <activity
            android:name=".AuthLetterActivity"
            android:label="AuthLetter"
            android:parentActivityName=".AuthSearchActivity"
            android:theme="@style/AppTheme" />
        <activity
            android:name=".NewsActivity"
            android:label="News"
            android:parentActivityName=".HospitalActivity"
            android:theme="@style/AppTheme" />
        <activity
            android:name=".ProvidersActivity"
            android:label=""></activity>
        <activity
            android:name=".provider.DoctorSearchActivity"
            android:label="Doctors"
            android:parentActivityName=".provider.SearchableActivity"></activity>
        <activity
            android:name=".provider.DrugSearchActivity"
            android:label="Search Drug"
            android:parentActivityName=".ProvidersActivity"></activity>
        <activity
            android:name=".provider.SearchableActivity"
            android:launchMode="singleTop"
            android:parentActivityName=".ProvidersActivity"></activity>
        <activity
            android:name=".provider.DoctorProfileActivity"
            android:label=""
            android:parentActivityName=".provider.SearchableActivity"
            android:theme="@style/AppTheme" />
        <activity
            android:name=".provider.HospitalSearchActivity"
            android:label="Search"
            android:parentActivityName=".ProvidersActivity"></activity>
        <activity
            android:name=".provider.HospitalProfileActivity"
            android:label=""
            android:parentActivityName=".provider.HospitalSearchActivity"></activity>
        <activity android:name=".FingerprintActivity" />
        <activity android:name=".FingerprintLoginActivity" />
        <activity
            android:name=".AboutActivity"
            android:label="@string/title_activity_about"
            android:parentActivityName=".HospitalActivity"
            android:theme="@style/AppTheme">
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.healthixsolution.provider.healthixprovider.HospitalActivity" />
        </activity>
        <activity
            android:name=".NumberActivity"
            android:label="Verify your number"
            android:parentActivityName=".LoginActivity"
            android:theme="@style/AppTheme"></activity>
        <activity
            android:name=".VerifyActivity"
            android:label="Verifying"
            android:parentActivityName=".NumberActivity"
            android:theme="@style/AppTheme">
            >
        </activity>
        <activity
            android:name=".RegisterActivity"
            android:label="Verifying"
            android:parentActivityName=".VerifyActivity"
            android:theme="@style/AppTheme">
            >
        </activity>
        <activity
            android:name=".SettingsActivity"
            android:label="@string/title_activity_settings"></activity>
        <activity
            android:name=".MyPreferencesActivity"
            android:theme="@style/PreferenceTheme"
            android:label="@string/title_activity_settings"></activity>
    </application>

</manifest>
Permissions

Your app needs to have internet permissions in order to communicate with the Healthix api services. Make sure you set:

    <uses-permission
        android:name="android.permission.INTERNET"
        android:required="true" />
    <uses-permission
        android:name="android.permission.ACCESS_NETWORK_STATE"
        android:required="true" />
    <uses-permission
        android:name="android.permission.USE_FINGERPRINT"
        android:required="true" />

results matching ""

    No results matching ""