Skip to content

Commit

Permalink
MI | Change package name to smartregister #6
Browse files Browse the repository at this point in the history
Signed-off-by: mib-iqbal <[email protected]>
  • Loading branch information
mib-iqbal committed Nov 6, 2017
1 parent b9ef543 commit 2a1d306
Show file tree
Hide file tree
Showing 32 changed files with 73 additions and 109 deletions.
2 changes: 1 addition & 1 deletion opensrp-gizi/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ android {
buildToolsVersion "26.0.1"

defaultConfig {
applicationId "org.ei.opensrp.gizi"
applicationId "org.smartregister.gizi"
minSdkVersion 18
targetSdkVersion 21
versionCode 1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.ei.opensrp.gizi;
package org.smartregister.gizi;

import android.app.Application;
import android.test.ApplicationTestCase;
Expand Down
17 changes: 9 additions & 8 deletions opensrp-gizi/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.ei.opensrp.gizi">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.smartregister.gizi">

<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.VIBRATE"/>

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>

<application android:allowBackup="true"
android:label="@string/app_name"
android:name="org.ei.opensrp.gizi.application.GiziApplication">
android:name=".application.GiziApplication">
<!-- local key -->
<!-- <meta-data
android:name="io.fabric.ApiKey"
Expand All @@ -19,7 +20,7 @@
android:value="b74c58c94d8965151212e8ecf1f4fdfbf5b7f4e4" />

<activity
android:name="org.ei.opensrp.gizi.LoginActivity"
android:name=".LoginActivity"
android:theme="@android:style/Theme.Holo"
android:windowSoftInputMode="adjustResize|stateHidden"
android:screenOrientation="landscape"
Expand All @@ -33,22 +34,22 @@
<activity android:name=".GiziHomeActivity"
android:theme="@style/AppTheme"
android:screenOrientation="landscape"/>
<activity android:name="org.ei.opensrp.gizi.gizi.GiziSmartRegisterActivity"
<activity android:name=".child.GiziSmartRegisterActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="@style/AppThemeNoActionBarAndTitle"
android:windowSoftInputMode="adjustResize"
android:screenOrientation="landscape"/>
<activity android:name=".gizi.GiziDetailActivity"
<activity android:name=".child.GiziDetailActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="@style/AppThemeNoActionBarAndTitle"
android:windowSoftInputMode="adjustResize"
android:screenOrientation="landscape"/>
<activity android:name=".gizi.GiziGrowthChartActivity"
<activity android:name=".child.GiziGrowthChartActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="@style/AppThemeNoActionBarAndTitle"
android:windowSoftInputMode="adjustResize"
android:screenOrientation="landscape"/>
<activity android:name=".gizi.GiziZScoreChartActivity"
<activity android:name=".child.GiziZScoreChartActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="@style/AppThemeNoActionBarAndTitle"
android:windowSoftInputMode="adjustResize"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
package org.ei.opensrp.gizi;
package org.smartregister.gizi;

import android.content.SharedPreferences;
import android.database.Cursor;
import android.os.StrictMode;
import android.preference.PreferenceManager;
import android.util.Log;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
Expand All @@ -14,18 +11,16 @@

import com.flurry.android.FlurryAgent;

import org.smartregister.AllConstants;
import org.smartregister.Context;
import org.smartregister.commonregistry.CommonPersonObjectController;
import org.smartregister.cursoradapter.SmartRegisterQueryBuilder;
import org.smartregister.event.Listener;

import org.smartregister.repository.AllSharedPreferences;
import org.smartregister.service.PendingFormSubmissionService;
import org.smartregister.sync.SyncAfterFetchListener;
import org.smartregister.sync.SyncProgressIndicator;
import org.smartregister.sync.UpdateActionsTask;
import org.ei.opensrp.gizi.gizi.FlurryFacade;
import org.smartregister.gizi.child.FlurryFacade;
import org.smartregister.view.activity.SecuredActivity;
import org.smartregister.view.contract.HomeContext;
import org.smartregister.view.controller.NativeAfterANMDetailsFetchListener;
Expand Down Expand Up @@ -134,7 +129,7 @@ protected void onCreation() {
//home dashboard
setContentView(R.layout.smart_registers_gizi_home);
// FlurryFacade.logEvent("gizi_home_dashboard");
navigationController = new org.ei.opensrp.gizi.GiziNavigationController(this,anmController,context());
navigationController = new org.smartregister.gizi.GiziNavigationController(this,anmController,context());
setupViews();
initialize();
DisplayFormFragment.formInputErrorMessage = getResources().getString(R.string.forminputerror);
Expand Down Expand Up @@ -179,8 +174,8 @@ private void initialize() {
FORM_SUBMITTED.addListener(onFormSubmittedListener);
ACTION_HANDLED.addListener(updateANMDetailsListener);
getSupportActionBar().setTitle("");
getSupportActionBar().setIcon(getResources().getDrawable(org.ei.opensrp.gizi.R.mipmap.logo));
getSupportActionBar().setLogo(org.ei.opensrp.gizi.R.mipmap.logo);
getSupportActionBar().setIcon(getResources().getDrawable(org.smartregister.gizi.R.mipmap.logo));
getSupportActionBar().setLogo(org.smartregister.gizi.R.mipmap.logo);
getSupportActionBar().setDisplayUseLogoEnabled(true);
getSupportActionBar().setDisplayShowHomeEnabled(true);
LoginActivity.setLanguage();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.ei.opensrp.gizi;
package org.smartregister.gizi;

import android.app.Activity;
import android.content.Intent;
Expand All @@ -7,8 +7,7 @@


//import org.ei.opensrp.gizi.test.TestSmartRegisterActivity;
import org.ei.opensrp.gizi.gizi.GiziSmartRegisterActivity;
import org.smartregister.view.activity.ReportsActivity;
import org.smartregister.gizi.child.GiziSmartRegisterActivity;
import org.smartregister.view.controller.ANMController;
import org.json.JSONObject;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.ei.opensrp.gizi;
package org.smartregister.gizi;

import android.app.Activity;
import android.app.AlertDialog;
Expand All @@ -25,20 +25,18 @@

import com.flurry.android.FlurryAgent;

import org.ei.opensrp.gizi.application.GiziApplication;
import org.smartregister.gizi.application.GiziApplication;
import org.smartregister.Context;
import org.smartregister.domain.LoginResponse;
import org.smartregister.domain.Response;
import org.smartregister.domain.ResponseStatus;
import org.smartregister.event.Listener;
import org.smartregister.repository.AllSharedPreferences;
import org.smartregister.sync.DrishtiSyncScheduler;
import org.ei.opensrp.gizi.gizi.ErrorReportingFacade;
import org.smartregister.util.Log;
import org.smartregister.view.BackgroundAction;
import org.smartregister.view.LockingBackgroundTask;
import org.smartregister.view.ProgressIndicator;
import org.ei.opensrp.gizi.SettingsActivity;

import java.io.IOException;
import java.text.SimpleDateFormat;
Expand Down Expand Up @@ -97,8 +95,8 @@ public void onCreate(Bundle savedInstanceState) {
setDoneActionHandlerOnPasswordField();
initializeProgressDialog();
getActionBar().setTitle("");
getActionBar().setIcon(getResources().getDrawable(org.ei.opensrp.gizi.R.mipmap.logo));
getActionBar().setBackgroundDrawable(getResources().getDrawable(org.ei.opensrp.gizi.R.color.action_bar_background));
getActionBar().setIcon(getResources().getDrawable(org.smartregister.gizi.R.mipmap.logo));
getActionBar().setBackgroundDrawable(getResources().getDrawable(org.smartregister.gizi.R.color.action_bar_background));
setLanguage();


Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.ei.opensrp.gizi;
package org.smartregister.gizi;

import android.content.SharedPreferences;
import android.os.Bundle;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,26 +1,21 @@
package org.ei.opensrp.gizi.application;
package org.smartregister.gizi.application;

import android.content.Intent;
import android.content.res.Configuration;

import org.acra.ACRA;
import org.acra.ReportingInteractionMode;
import org.acra.annotation.ReportsCrashes;
import org.ei.opensrp.gizi.repository.GiziRepository;
import org.smartregister.gizi.repository.GiziRepository;
import org.smartregister.Context;
import org.smartregister.CoreLibrary;
import org.smartregister.commonregistry.CommonFtsObject;
import org.ei.opensrp.gizi.LoginActivity;
import org.ei.opensrp.gizi.gizi.ErrorReportingFacade;
import org.ei.opensrp.gizi.gizi.FlurryFacade;
import org.smartregister.gizi.LoginActivity;
import org.smartregister.gizi.child.FlurryFacade;
import org.smartregister.repository.Repository;
import org.smartregister.sync.DrishtiSyncScheduler;
import org.smartregister.view.activity.DrishtiApplication;
import org.smartregister.view.receiver.SyncBroadcastReceiver;

import static org.smartregister.util.Log.logError;
import static org.smartregister.util.Log.logInfo;
import org.ei.opensrp.gizi.application.SyncGiziBroadcastReceiver;

import java.util.Locale;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.ei.opensrp.gizi.application;
package org.smartregister.gizi.application;

import android.content.BroadcastReceiver;
import android.content.Context;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package org.ei.opensrp.gizi.gizi;
package org.smartregister.gizi.child;

import org.smartregister.commonregistry.CommonPersonObjectClient;
import org.smartregister.cursoradapter.CursorFilterOption;
import org.smartregister.view.contract.SmartRegisterClient;
import org.smartregister.view.dialog.FilterOption;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
package org.ei.opensrp.gizi.gizi;

import android.content.Context;/*
import com.crashlytics.android.Crashlytics;
import io.fabric.sdk.android.Fabric;*/
package org.smartregister.gizi.child;

/**
* Created by Dimas on 9/22/2015.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.ei.opensrp.gizi.gizi;
package org.smartregister.gizi.child;


import android.content.Context;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.ei.opensrp.gizi.gizi;
package org.smartregister.gizi.child;

import org.smartregister.commonregistry.CommonPersonObjectClient;
import org.smartregister.view.contract.SmartRegisterClient;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
package org.ei.opensrp.gizi.gizi;
package org.smartregister.gizi.child;

import android.app.Activity;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.net.Uri;
import android.os.Bundle;
import android.os.Environment;
import android.view.View;
Expand All @@ -20,10 +17,9 @@
import org.smartregister.commonregistry.AllCommonsRepository;
import org.smartregister.commonregistry.CommonPersonObject;
import org.smartregister.commonregistry.CommonPersonObjectClient;
import org.ei.opensrp.gizi.R;
import org.smartregister.gizi.R;
import org.smartregister.repository.DetailsRepository;
import org.smartregister.util.Log;
import org.smartregister.util.OpenSRPImageLoader;
import org.smartregister.view.activity.DrishtiApplication;

import java.io.File;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.ei.opensrp.gizi.gizi;
package org.smartregister.gizi.child;

import android.app.Activity;
import android.content.Intent;
Expand All @@ -13,7 +13,7 @@

import org.smartregister.Context;
import org.smartregister.commonregistry.CommonPersonObjectClient;
import org.ei.opensrp.gizi.R;
import org.smartregister.gizi.R;

import java.text.SimpleDateFormat;
import java.util.Date;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package org.ei.opensrp.gizi.gizi;
package org.smartregister.gizi.child;

import org.smartregister.Context;
import org.smartregister.commonregistry.CommonPersonObjectClient;
import org.ei.opensrp.gizi.R;
import org.smartregister.gizi.R;
import org.smartregister.view.contract.SmartRegisterClient;
import org.smartregister.view.dialog.FilterOption;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package org.ei.opensrp.gizi.gizi;
package org.smartregister.gizi.child;

import android.view.View;

import org.smartregister.Context;
import org.smartregister.provider.SmartRegisterClientsProvider;
import org.ei.opensrp.gizi.R;
import org.smartregister.gizi.R;
import org.smartregister.view.contract.ANCSmartRegisterClient;
import org.smartregister.view.contract.ChildSmartRegisterClient;
import org.smartregister.view.contract.FPSmartRegisterClient;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.ei.opensrp.gizi.gizi;
package org.smartregister.gizi.child;

import android.app.Activity;
import android.content.Context;
Expand All @@ -21,7 +21,7 @@
import org.smartregister.cursoradapter.SmartRegisterCLientsProviderForCursorAdapter;
import org.smartregister.repository.DetailsRepository;
import org.smartregister.service.AlertService;
import org.ei.opensrp.gizi.R;
import org.smartregister.gizi.R;
import org.smartregister.view.activity.DrishtiApplication;
import org.smartregister.view.contract.SmartRegisterClient;
import org.smartregister.view.contract.SmartRegisterClients;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.ei.opensrp.gizi.gizi;
package org.smartregister.gizi.child;

import android.app.AlertDialog;
import android.content.DialogInterface;
Expand All @@ -13,23 +13,15 @@

import com.flurry.android.FlurryAgent;

import org.smartregister.Context;
import org.smartregister.commonregistry.AllCommonsRepository;
import org.smartregister.commonregistry.CommonPersonObject;
import org.smartregister.commonregistry.CommonPersonObjectClient;
import org.smartregister.cursoradapter.SmartRegisterQueryBuilder;
import org.smartregister.domain.Alert;
import org.smartregister.domain.form.FieldOverrides;
import org.smartregister.domain.form.FormSubmission;
import org.ei.opensrp.gizi.LoginActivity;
import org.ei.opensrp.gizi.fragment.GiziSmartRegisterFragment;
import org.ei.opensrp.gizi.pageradapter.BaseRegisterActivityPagerAdapter;
import org.smartregister.gizi.LoginActivity;
import org.smartregister.gizi.fragment.GiziSmartRegisterFragment;
import org.smartregister.gizi.pageradapter.BaseRegisterActivityPagerAdapter;
import org.smartregister.provider.SmartRegisterClientsProvider;
import org.smartregister.service.ZiggyService;
import org.ei.opensrp.gizi.LoginActivity;
import org.ei.opensrp.gizi.R;
import org.ei.opensrp.gizi.fragment.GiziSmartRegisterFragment;
import org.ei.opensrp.gizi.pageradapter.BaseRegisterActivityPagerAdapter;
import org.smartregister.gizi.R;
import org.smartregister.sync.ClientProcessor;
import org.smartregister.util.FormUtils;
import org.smartregister.view.activity.SecuredNativeSmartRegisterActivity;
Expand All @@ -46,13 +38,11 @@
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;

import butterknife.Bind;
import butterknife.ButterKnife;
import util.ZScore.ZScoreSystemCalculation;
import util.formula.Support;

public class GiziSmartRegisterActivity extends SecuredNativeSmartRegisterActivity implements
Expand Down Expand Up @@ -257,7 +247,7 @@ public void startFormActivity(final String formName, final String entityId, fina
FS.put("start", start);
FlurryAgent.logEvent(formName, FS, true);

if(formName.equals("kunjungan_gizi")) {
/*if(formName.equals("kunjungan_gizi")) {
if(getNumOfChild()<4)
activatingForm(formName,entityId,metaData);
else {
Expand All @@ -278,9 +268,9 @@ public void onClick(DialogInterface dialog, int which) {
builder.show();
}
}
else{
else{*/
activatingForm(formName,entityId,metaData);
}
//}
}

private void activatingForm(String formName, String entityId, String metaData){
Expand Down
Loading

0 comments on commit 2a1d306

Please sign in to comment.