Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class EngaugeApp extends BaseApp implements Application.ActivityLifecycleCallbacks {
- static SharedPrefsXtreme sharedPrefsXtreme_static;
- private ArrayList<EngaugeActivityItem> savedCustomers = new ArrayList<>();
- private static SharedPreferences prefs;
- private static EngaugeApp instance;
- private FirebaseAnalytics mFirebaseAnalytics;
- private String profile_photo;
- private String cover_photo;
- private String ussd_code;
- private String join_code;
- private String subAmount;
- private String subExpiry;
- private int activityReferences = 0;
- private boolean isActivityChangingConfigurations = false;
- public String getTransactionList()
- {
- return transactions_list;
- }
- public String transactions_list =
- "\n"
- + "["
- + " {\n"
- + " \"payer_name\":\"Musa Kimbo\",\n"
- + " \"amount\":500,\n"
- + " \"email\":\"musakimbo@gmail.com\",\n"
- + " \"review\":\"I enjoy the services\",\n"
- + " \"name\":\"Matwana Makena\",\n"
- + " \"phone\":"
- + "\""
- + "+254790186666"
- + "\""
- + ",\n"
- + " \"verified\":true,\n"
- + " \"createDate\":\"June 2 - 9:00am\",\n"
- + " \"reply\":{\n"
- + " \"text\":null,\n"
- + " \"createDate\":null\n"
- + " },\n"
- + " \"verifiedType\":\"VERIFIED\",\n"
- + " \"tag\":\"service\"\n"
- + " },\n"
- + " {\n"
- + " \"payer_name\":\"Musa Kimbo\",\n"
- + " \"amount\":500,\n"
- + " \"email\":\"musakimbo@gmail.com\",\n"
- + " \"review\":\"I enjoy the services\",\n"
- + " \"name\":\"Aboso Kiruiki\",\n"
- + " \"phone\":"
- + "\"+254727901421\",\n"
- + " \"verified\":false,\n"
- + " \"createDate\":\"June 2 - 9:00am\",\n"
- + " \"reply\":{\n"
- + " \"text\":null,\n"
- + " \"createDate\":null\n"
- + " },\n"
- + " \"verifiedType\":\"VERIFIED\",\n"
- + " \"tag\":\"service\"\n"
- + " },\n"
- + " {\n"
- + " \"payer_name\":\"Musa Kimbo\",\n"
- + " \"amount\":500,\n"
- + " \"email\":\"musakimbo@gmail.com\",\n"
- + " \"review\":\"I enjoy the services\",\n"
- + " \"name\":\"Ojino Kamau\",\n"
- + " \"phone\":"
- + "\""
- + "+254784859674"
- + "\""
- + ",\n"
- + " \"verified\":true,\n"
- + " \"createDate\":\"June 2 - 9:00am\",\n"
- + " \"reply\":{\n"
- + " \"text\":null,\n"
- + " \"createDate\":null\n"
- + " },\n"
- + " \"verifiedType\":\"VERIFIED\",\n"
- + " \"tag\":\"service\"\n"
- + " },\n"
- + " {\n"
- + " \"payer_name\":\"Musa Kimbo\",\n"
- + " \"amount\":500,\n"
- + " \"email\":\"musakimbo@gmail.com\",\n"
- + " \"review\":\"I enjoy the services\",\n"
- + " \"name\":\"Nelson Handela\",\n"
- + " \"phone\":"
- + "\""
- + "+2547586746374"
- + "\""
- + ",\n"
- + " \"verified\":false,\n"
- + " \"createDate\":\"June 2 - 9:00am\",\n"
- + " \"reply\":{\n"
- + " \"text\":null,\n"
- + " \"createDate\":null\n"
- + " },\n"
- + " \"verifiedType\":\"VERIFIED\",\n"
- + " \"tag\":\"service\"\n"
- + " },\n"
- + " {\n"
- + " \"payer_name\":\"Musa Kimbo\",\n"
- + " \"amount\":500,\n"
- + " \"email\":\"musakimbo@gmail.com\",\n"
- + " \"review\":\"I enjoy the services\",\n"
- + " \"name\":\"Gideon Mui\",\n"
- + " \"phone\":"
- + "\""
- + "+2547857689795"
- + "\""
- + ",\n"
- + " \"verified\":true,\n"
- + " \"createDate\":\"June 2 - 9:00am\",\n"
- + " \"reply\":{\n"
- + " \"text\":null,\n"
- + " \"createDate\":null\n"
- + " },\n"
- + " \"verifiedType\":\"VERIFIED\",\n"
- + " \"tag\":\"service\"\n"
- + " },\n"
- + " {\n"
- + " \"payer_name\":\"Musa Kimbo\",\n"
- + " \"amount\":500,\n"
- + " \"email\":\"musakimbo@gmail.com\",\n"
- + " \"review\":\"I enjoy the services\",\n"
- + " \"name\":\"Hosea David\",\n"
- + " \"phone\":"
- + "\""
- + "+2547884756745"
- + "\""
- + ",\n"
- + " \"verified\":true,\n"
- + " \"createDate\":\"June 2 - 9:00am\",\n"
- + " \"reply\":{\n"
- + " \"text\":null,\n"
- + " \"createDate\":null\n"
- + " },\n"
- + " \"verifiedType\":\"VERIFIED\",\n"
- + " \"tag\":\"service\"\n"
- + " },\n"
- + " {\n"
- + " \"payer_name\":\"Musa Kimbo\",\n"
- + " \"amount\":500,\n"
- + " \"email\":\"musakimbo@gmail.com\",\n"
- + " \"review\":\"I enjoy the services\",\n"
- + " \"name\":\"Goddy Juma\",\n"
- + " \"phone\":"
- + "\""
- + "+2547908475869"
- + "\""
- + ",\n"
- + " \"verified\":false,\n"
- + " \"createDate\":\"June 2 - 9:00am\",\n"
- + " \"reply\":{\n"
- + " \"text\":null,\n"
- + " \"createDate\":null\n"
- + " },\n"
- + " \"verifiedType\":\"VERIFIED\",\n"
- + " \"tag\":\"service\"\n"
- + " },\n"
- + " {\n"
- + " \"payer_name\":\"Musa Kimbo\",\n"
- + " \"amount\":500,\n"
- + " \"email\":\"musakimbo@gmail.com\",\n"
- + " \"review\":\"I enjoy the services\",\n"
- + " \"name\":\"Solomon Mkumbwa\",\n"
- + " \"phone\":"
- + "\""
- + "+254790186654"
- + "\""
- + ",\n"
- + " \"verified\":false,\n"
- + " \"createDate\":\"June 2 - 9:00am\",\n"
- + " \"reply\":{\n"
- + " \"text\":null,\n"
- + " \"createDate\":null\n"
- + " },\n"
- + " \"verifiedType\":\"VERIFIED\",\n"
- + " \"tag\":\"service\"\n"
- + " }\n"
- + " ]\n";
- String nigerianStatesThree =
- "[\n"
- + " {\n"
- + " state: 'All States',\n"
- + " lgas: [\n"
- + " 'Aba North',\n"
- + " 'Aba South',\n"
- + " 'Arochukwu',\n"
- + " 'Bende',\n"
- + " 'Ikawuno',\n"
- + " 'Ikwuano',\n"
- + " 'Isiala-Ngwa North',\n"
- + " 'Isiala-Ngwa South',\n"
- + " 'Isuikwuato',\n"
- + " 'Umu Nneochi',\n"
- + " 'Obi Ngwa',\n"
- + " 'Obioma Ngwa',\n"
- + " 'Ohafia',\n"
- + " 'Ohaozara',\n"
- + " 'Osisioma',\n"
- + " 'Ugwunagbo',\n"
- + " 'Ukwa West',\n"
- + " 'Ukwa East',\n"
- + " 'Umuahia North',\n"
- + " 'Umuahia South'\n"
- + " ]\n"
- + " },\n"
- + " {\n"
- + " state: 'Abia',\n"
- + " lgas: [\n"
- + " 'Aba North',\n"
- + " 'Aba South',\n"
- + " 'Arochukwu',\n"
- + " 'Bende',\n"
- + " 'Ikawuno',\n"
- + " 'Ikwuano',\n"
- + " 'Isiala-Ngwa North',\n"
- + " 'Isiala-Ngwa South',\n"
- + " 'Isuikwuato',\n"
- + " 'Umu Nneochi',\n"
- + " 'Obi Ngwa',\n"
- + " 'Obioma Ngwa',\n"
- + " 'Ohafia',\n"
- + " 'Ohaozara',\n"
- + " 'Osisioma',\n"
- + " 'Ugwunagbo',\n"
- + " 'Ukwa West',\n"
- + " 'Ukwa East',\n"
- + " 'Umuahia North',\n"
- + " 'Umuahia South'\n"
- + " ]\n"
- + " },\n"
- + " {\n"
- + " 'state': 'Adamawa',\n"
- + " 'lgas': [\n"
- + " 'Demsa',\n"
- + " 'Fufore',\n"
- + " 'Ganye',\n"
- + " 'Girei',\n"
- + " 'Gombi',\n"
- + " 'Guyuk',\n"
- + " 'Hong',\n"
- + " 'Jada',\n"
- + " 'Lamurde',\n"
- + " 'Madagali',\n"
- + " 'Maiha',\n"
- + " 'Mayo-Belwa',\n"
- + " 'Michika',\n"
- + " 'Mubi-North',\n"
- + " 'Mubi-South',\n"
- + " 'Numan',\n"
- + " 'Shelleng',\n"
- + " 'Song',\n"
- + " 'Toungo',\n"
- + " 'Yola North',\n"
- + " 'Yola South'\n"
- + " ]\n"
- + " },\n"
- + " {\n"
- + " 'state': 'Akwa Ibom',\n"
- + " 'lgas': [\n"
- + " 'Abak',\n"
- + " 'Eastern-Obolo',\n"
- + " 'Eket',\n"
- + " 'Esit-Eket',\n"
- + " 'Essien-Udim',\n"
- + " 'Etim-Ekpo',\n"
- + " 'Etinan',\n"
- + " 'Ibeno',\n"
- + " 'Ibesikpo-Asutan',\n"
- + " 'Ibiono-Ibom',\n"
- + " 'Ika',\n"
- + " 'Ikono',\n"
- + " 'Ikot-Abasi',\n"
- + " 'Ikot-Ekpene',\n"
- + " 'Ini',\n"
- + " 'Itu',\n"
- + " 'Mbo',\n"
- + " 'Mkpat-Enin',\n"
- + " 'Nsit-Atai',\n"
- + " 'Nsit-Ibom',\n"
- + " 'Nsit-Ubium',\n"
- + " 'Obot-Akara',\n"
- + " 'Okobo',\n"
- + " 'Onna',\n"
- + " 'Oron',\n"
- + " 'Oruk Anam',\n"
- + " 'Udung-Uko',\n"
- + " 'Ukanafun',\n"
- + " 'Urue-Offong/Oruko',\n"
- + " 'Uruan',\n"
- + " 'Uyo'\n"
- + " ]\n"
- + " },\n"
- + " {\n"
- + " 'state': 'Anambra',\n"
- + " 'lgas': [\n"
- + " 'Aguata',\n"
- + " 'Anambra East',\n"
- + " 'Anambra West',\n"
- + " 'Anaocha',\n"
- + " 'Awka North',\n"
- + " 'Awka South',\n"
- + " 'Ayamelum',\n"
- + " 'Dunukofia',\n"
- + " 'Ekwusigo',\n"
- + " 'Idemili-North',\n"
- + " 'Idemili-South',\n"
- + " 'Ihiala',\n"
- + " 'Njikoka',\n"
- + " 'Nnewi-North',\n"
- + " 'Nnewi-South',\n"
- + " 'Ogbaru',\n"
- + " 'Onitsha-North',\n"
- + " 'Onitsha-South',\n"
- + " 'Orumba-North',\n"
- + " 'Orumba-South'\n"
- + " ]\n"
- + " },\n"
- + " {\n"
- + " 'state': 'Bauchi',\n"
- + " 'lgas': [\n"
- + " 'Alkaleri',\n"
- + " 'Bauchi',\n"
- + " 'Bogoro',\n"
- + " 'Damban',\n"
- + " 'Darazo',\n"
- + " 'Dass',\n"
- + " 'Gamawa',\n"
- + " 'Ganjuwa',\n"
- + " 'Giade',\n"
- + " 'Itas\\/Gadau',\n"
- + " 'Jama Are',\n"
- + " 'Katagum',\n"
- + " 'Kirfi',\n"
- + " 'Misau',\n"
- + " 'Ningi',\n"
- + " 'Shira',\n"
- + " 'Tafawa-Balewa',\n"
- + " 'Toro',\n"
- + " 'Warji',\n"
- + " 'Zaki'\n"
- + " ]\n"
- + " },\n"
- + " {\n"
- + " 'state': 'Benue',\n"
- + " 'lgas': [\n"
- + " 'Ado',\n"
- + " 'Agatu',\n"
- + " 'Apa',\n"
- + " 'Buruku',\n"
- + " 'Gboko',\n"
- + " 'Guma',\n"
- + " 'Gwer-East',\n"
- + " 'Gwer-West',\n"
- + " 'Katsina-Ala',\n"
- + " 'Konshisha',\n"
- + " 'Kwande',\n"
- + " 'Logo',\n"
- + " 'Makurdi',\n"
- + " 'Ogbadibo',\n"
- + " 'Ohimini',\n"
- + " 'Oju',\n"
- + " 'Okpokwu',\n"
- + " 'Otukpo',\n"
- + " 'Tarka',\n"
- + " 'Ukum',\n"
- + " 'Ushongo',\n"
- + " 'Vandeikya'\n"
- + " ]\n"
- + " },\n"
- + " {\n"
- + " 'state': 'Borno',\n"
- + " 'lgas': [\n"
- + " 'Abadam',\n"
- + " 'Askira-Uba',\n"
- + " 'Bama',\n"
- + " 'Bayo',\n"
- + " 'Biu',\n"
- + " 'Chibok',\n"
- + " 'Damboa',\n"
- + " 'Dikwa',\n"
- + " 'Gubio',\n"
- + " 'Guzamala',\n"
- + " 'Gwoza',\n"
- + " 'Hawul',\n"
- + " 'Jere',\n"
- + " 'Kaga',\n"
- + " 'Kala\\/Balge',\n"
- + " 'Konduga',\n"
- + " 'Kukawa',\n"
- + " 'Kwaya-Kusar',\n"
- + " 'Mafa',\n"
- + " 'Magumeri',\n"
- + " 'Maiduguri',\n"
- + " 'Marte',\n"
- + " 'Mobbar',\n"
- + " 'Monguno',\n"
- + " 'Ngala',\n"
- + " 'Nganzai',\n"
- + " 'Shani'\n"
- + " ]\n"
- + " },\n"
- + " {\n"
- + " 'state': 'Bayelsa',\n"
- + " 'lgas': [\n"
- + " 'Brass',\n"
- + " 'Ekeremor',\n"
- + " 'Kolokuma\\/Opokuma',\n"
- + " 'Nembe',\n"
- + " 'Ogbia',\n"
- + " 'Sagbama',\n"
- + " 'Southern-Ijaw',\n"
- + " 'Yenagoa'\n"
- + " ]\n"
- + " },\n"
- + " {\n"
- + " 'state': 'Cross River',\n"
- + " 'lgas': [\n"
- + " 'Abi',\n"
- + " 'Akamkpa',\n"
- + " 'Akpabuyo',\n"
- + " 'Bakassi',\n"
- + " 'Bekwarra',\n"
- + " 'Biase',\n"
- + " 'Boki',\n"
- + " 'Calabar-Municipal',\n"
- + " 'Calabar-South',\n"
- + " 'Etung',\n"
- + " 'Ikom',\n"
- + " 'Obanliku',\n"
- + " 'Obubra',\n"
- + " 'Obudu',\n"
- + " 'Odukpani',\n"
- + " 'Ogoja',\n"
- + " 'Yakurr',\n"
- + " 'Yala'\n"
- + " ]\n"
- + " },\n"
- + " {\n"
- + " 'state': 'Delta',\n"
- + " 'lgas': [\n"
- + " 'Aniocha North',\n"
- + " 'Aniocha-North',\n"
- + " 'Aniocha-South',\n"
- + " 'Bomadi',\n"
- + " 'Burutu',\n"
- + " 'Ethiope-East',\n"
- + " 'Ethiope-West',\n"
- + " 'Ika-North-East',\n"
- + " 'Ika-South',\n"
- + " 'Isoko-North',\n"
- + " 'Isoko-South',\n"
- + " 'Ndokwa-East',\n"
- + " 'Ndokwa-West',\n"
- + " 'Okpe',\n"
- + " 'Oshimili-North',\n"
- + " 'Oshimili-South',\n"
- + " 'Patani',\n"
- + " 'Sapele',\n"
- + " 'Udu',\n"
- + " 'Ughelli-North',\n"
- + " 'Ughelli-South',\n"
- + " 'Ukwuani',\n"
- + " 'Uvwie',\n"
- + " 'Warri South-West',\n"
- + " 'Warri North',\n"
- + " 'Warri South'\n"
- + " ]\n"
- + " },\n"
- + " {\n"
- + " 'state': 'Ebonyi',\n"
- + " 'lgas': [\n"
- + " 'Abakaliki',\n"
- + " 'Afikpo-North',\n"
- + " 'Afikpo South (Edda)',\n"
- + " 'Ebonyi',\n"
- + " 'Ezza-North',\n"
- + " 'Ezza-South',\n"
- + " 'Ikwo',\n"
- + " 'Ishielu',\n"
- + " 'Ivo',\n"
- + " 'Izzi',\n"
- + " 'Ohaukwu',\n"
- + " 'Onicha'\n"
- + " ]\n"
- + " },\n"
- + " {\n"
- + " 'state': 'Edo',\n"
- + " 'lgas': [\n"
- + " 'Akoko Edo',\n"
- + " 'Egor',\n"
- + " 'Esan-Central',\n"
- + " 'Esan-North-East',\n"
- + " 'Esan-South-East',\n"
- + " 'Esan-West',\n"
- + " 'Etsako-Central',\n"
- + " 'Etsako-East',\n"
- + " 'Etsako-West',\n"
- + " 'Igueben',\n"
- + " 'Ikpoba-Okha',\n"
- + " 'Oredo',\n"
- + " 'Orhionmwon',\n"
- + " 'Ovia-North-East',\n"
- + " 'Ovia-South-West',\n"
- + " 'Owan East',\n"
- + " 'Owan-West',\n"
- + " 'Uhunmwonde'\n"
- + " ]\n"
- + " },\n"
- + " {\n"
- + " 'state': 'Ekiti',\n"
- + " 'lgas': [\n"
- + " 'Ado-Ekiti',\n"
- + " 'Efon',\n"
- + " 'Ekiti-East',\n"
- + " 'Ekiti-South-West',\n"
- + " 'Ekiti-West',\n"
- + " 'Emure',\n"
- + " 'Gbonyin',\n"
- + " 'Ido-Osi',\n"
- + " 'Ijero',\n"
- + " 'Ikere',\n"
- + " 'Ikole',\n"
- + " 'Ilejemeje',\n"
- + " 'Irepodun\\/Ifelodun',\n"
- + " 'Ise-Orun',\n"
- + " 'Moba',\n"
- + " 'Oye'\n"
- + " ]\n"
- + " },\n"
- + " {\n"
- + " 'state': 'Enugu',\n"
- + " 'lgas': [\n"
- + " 'Aninri',\n"
- + " 'Awgu',\n"
- + " 'Enugu-East',\n"
- + " 'Enugu-North',\n"
- + " 'Enugu-South',\n"
- + " 'Ezeagu',\n"
- + " 'Igbo-Etiti',\n"
- + " 'Igbo-Eze-North',\n"
- + " 'Igbo-Eze-South',\n"
- + " 'Isi-Uzo',\n"
- + " 'Nkanu-East',\n"
- + " 'Nkanu-West',\n"
- + " 'Nsukka',\n"
- + " 'Oji-River',\n"
- + " 'Udenu',\n"
- + " 'Udi',\n"
- + " 'Uzo-Uwani'\n"
- + " ]\n"
- + " },\n"
- + " {\n"
- + " 'state': 'Federal Capital Territory',\n"
- + " 'lgas': [\n"
- + " 'Abuja',\n"
- + " 'Kwali',\n"
- + " 'Kuje',\n"
- + " 'Gwagwalada',\n"
- + " 'Bwari',\n"
- + " 'Abaji'\n"
- + " ]\n"
- + " },\n"
- + " {\n"
- + " 'state': 'Gombe',\n"
- + " 'lgas': [\n"
- + " 'Akko',\n"
- + " 'Balanga',\n"
- + " 'Billiri',\n"
- + " 'Dukku',\n"
- + " 'Funakaye',\n"
- + " 'Gombe',\n"
- + " 'Kaltungo',\n"
- + " 'Kwami',\n"
- + " 'Nafada',\n"
- + " 'Shongom',\n"
- + " 'Yamaltu\\/Deba'\n"
- + " ]\n"
- + " },\n"
- + " {\n"
- + " 'state': 'Imo',\n"
- + " 'lgas': [\n"
- + " 'Aboh-Mbaise',\n"
- + " 'Ahiazu-Mbaise',\n"
- + " 'Ehime-Mbano',\n"
- + " 'Ezinihitte',\n"
- + " 'Ideato-North',\n"
- + " 'Ideato-South',\n"
- + " 'Ihitte\\/Uboma',\n"
- + " 'Ikeduru',\n"
- + " 'Isiala-Mbano',\n"
- + " 'Isu',\n"
- + " 'Mbaitoli',\n"
- + " 'Ngor-Okpala',\n"
- + " 'Njaba',\n"
- + " 'Nkwerre',\n"
- + " 'Nwangele',\n"
- + " 'Obowo',\n"
- + " 'Oguta',\n"
- + " 'Ohaji-Egbema',\n"
- + " 'Okigwe',\n"
- + " 'Onuimo',\n"
- + " 'Orlu',\n"
- + " 'Orsu',\n"
- + " 'Oru-East',\n"
- + " 'Oru-West',\n"
- + " 'Owerri-Municipal',\n"
- + " 'Owerri-North',\n"
- + " 'Owerri-West'\n"
- + " ]\n"
- + " },\n"
- + " {\n"
- + " 'state': 'Jigawa',\n"
- + " 'lgas': [\n"
- + " 'Auyo',\n"
- + " 'Babura',\n"
- + " 'Biriniwa',\n"
- + " 'Birnin-Kudu',\n"
- + " 'Buji',\n"
- + " 'Dutse',\n"
- + " 'Gagarawa',\n"
- + " 'Garki',\n"
- + " 'Gumel',\n"
- + " 'Guri',\n"
- + " 'Gwaram',\n"
- + " 'Gwiwa',\n"
- + " 'Hadejia',\n"
- + " 'Jahun',\n"
- + " 'Kafin-Hausa',\n"
- + " 'Kaugama',\n"
- + " 'Kazaure',\n"
- + " 'Kiri kasama',\n"
- + " 'Maigatari',\n"
- + " 'Malam Madori',\n"
- + " 'Miga',\n"
- + " 'Ringim',\n"
- + " 'Roni',\n"
- + " 'Sule-Tankarkar',\n"
- + " 'Taura',\n"
- + " 'Yankwashi'\n"
- + " ]\n"
- + " },\n"
- + " {\n"
- + " 'state': 'Kebbi',\n"
- + " 'lgas': [\n"
- + " 'Aleiro',\n"
- + " 'Arewa-Dandi',\n"
- + " 'Argungu',\n"
- + " 'Augie',\n"
- + " 'Bagudo',\n"
- + " 'Birnin-Kebbi',\n"
- + " 'Bunza',\n"
- + " 'Dandi',\n"
- + " 'Fakai',\n"
- + " 'Gwandu',\n"
- + " 'Jega',\n"
- + " 'Kalgo',\n"
- + " 'Koko-Besse',\n"
- + " 'Maiyama',\n"
- + " 'Ngaski',\n"
- + " 'Sakaba',\n"
- + " 'Shanga',\n"
- + " 'Suru',\n"
- + " 'Wasagu/Danko',\n"
- + " 'Yauri',\n"
- + " 'Zuru'\n"
- + " ]\n"
- + " },\n"
- + " {\n"
- + " 'state': 'Kaduna',\n"
- + " 'lgas': [\n"
- + " 'Birnin-Gwari',\n"
- + " 'Chikun',\n"
- + " 'Giwa',\n"
- + " 'Igabi',\n"
- + " 'Ikara',\n"
- + " 'Jaba',\n"
- + " 'Jema A',\n"
- + " 'Kachia',\n"
- + " 'Kaduna-North',\n"
- + " 'Kaduna-South',\n"
- + " 'Kagarko',\n"
- + " 'Kajuru',\n"
- + " 'Kaura',\n"
- + " 'Kauru',\n"
- + " 'Kubau',\n"
- + " 'Kudan',\n"
- + " 'Lere',\n"
- + " 'Makarfi',\n"
- + " 'Sabon-Gari',\n"
- + " 'Sanga',\n"
- + " 'Soba',\n"
- + " 'Zangon-Kataf',\n"
- + " 'Zaria'\n"
- + " ]\n"
- + " },\n"
- + " {\n"
- + " 'state': 'Kano',\n"
- + " 'lgas': [\n"
- + " 'Ajingi',\n"
- + " 'Albasu',\n"
- + " 'Bagwai',\n"
- + " 'Bebeji',\n"
- + " 'Bichi',\n"
- + " 'Bunkure',\n"
- + " 'Dala',\n"
- + " 'Dambatta',\n"
- + " 'Dawakin-Kudu',\n"
- + " 'Dawakin-Tofa',\n"
- + " 'Doguwa',\n"
- + " 'Fagge',\n"
- + " 'Gabasawa',\n"
- + " 'Garko',\n"
- + " 'Garun-Mallam',\n"
- + " 'Gaya',\n"
- + " 'Gezawa',\n"
- + " 'Gwale',\n"
- + " 'Gwarzo',\n"
- + " 'Kabo',\n"
- + " 'Kano-Municipal',\n"
- + " 'Karaye',\n"
- + " 'Kibiya',\n"
- + " 'Kiru',\n"
- + " 'Kumbotso',\n"
- + " 'Kunchi',\n"
- + " 'Kura',\n"
- + " 'Madobi',\n"
- + " 'Makoda',\n"
- + " 'Minjibir',\n"
- + " 'Nasarawa',\n"
- + " 'Rano',\n"
- + " 'Rimin-Gado',\n"
- + " 'Rogo',\n"
- + " 'Shanono',\n"
- + " 'Sumaila',\n"
- + " 'Takai',\n"
- + " 'Tarauni',\n"
- + " 'Tofa',\n"
- + " 'Tsanyawa',\n"
- + " 'Tudun-Wada',\n"
- + " 'Ungogo',\n"
- + " 'Warawa',\n"
- + " 'Wudil'\n"
- + " ]\n"
- + " },\n"
- + " {\n"
- + " 'state': 'Kogi',\n"
- + " 'lgas': [\n"
- + " 'Adavi',\n"
- + " 'Ajaokuta',\n"
- + " 'Ankpa',\n"
- + " 'Dekina',\n"
- + " 'Ibaji',\n"
- + " 'Idah',\n"
- + " 'Igalamela-Odolu',\n"
- + " 'Ijumu',\n"
- + " 'Kabba\\/Bunu',\n"
- + " 'Kogi',\n"
- + " 'Lokoja',\n"
- + " 'Mopa-Muro',\n"
- + " 'Ofu',\n"
- + " 'Ogori\\/Magongo',\n"
- + " 'Okehi',\n"
- + " 'Okene',\n"
- + " 'Olamaboro',\n"
- + " 'Omala',\n"
- + " 'Oyi',\n"
- + " 'Yagba-East',\n"
- + " 'Yagba-West'\n"
- + " ]\n"
- + " },\n"
- + " {\n"
- + " 'state': 'Katsina',\n"
- + " 'lgas': [\n"
- + " 'Bakori',\n"
- + " 'Batagarawa',\n"
- + " 'Batsari',\n"
- + " 'Baure',\n"
- + " 'Bindawa',\n"
- + " 'Charanchi',\n"
- + " 'Dan-Musa',\n"
- + " 'Dandume',\n"
- + " 'Danja',\n"
- + " 'Daura',\n"
- + " 'Dutsi',\n"
- + " 'Dutsin-Ma',\n"
- + " 'Faskari',\n"
- + " 'Funtua',\n"
- + " 'Ingawa',\n"
- + " 'Jibia',\n"
- + " 'Kafur',\n"
- + " 'Kaita',\n"
- + " 'Kankara',\n"
- + " 'Kankia',\n"
- + " 'Katsina',\n"
- + " 'Kurfi',\n"
- + " 'Kusada',\n"
- + " 'Mai-Adua',\n"
- + " 'Malumfashi',\n"
- + " 'Mani',\n"
- + " 'Mashi',\n"
- + " 'Matazu',\n"
- + " 'Musawa',\n"
- + " 'Rimi',\n"
- + " 'Sabuwa',\n"
- + " 'Safana',\n"
- + " 'Sandamu',\n"
- + " 'Zango'\n"
- + " ]\n"
- + " },\n"
- + " {\n"
- + " 'state': 'Kwara',\n"
- + " 'lgas': [\n"
- + " 'Asa',\n"
- + " 'Baruten',\n"
- + " 'Edu',\n"
- + " 'Ekiti (Araromi/Opin)',\n"
- + " 'Ilorin-East',\n"
- + " 'Ilorin-South',\n"
- + " 'Ilorin-West',\n"
- + " 'Isin',\n"
- + " 'Kaiama',\n"
- + " 'Moro',\n"
- + " 'Offa',\n"
- + " 'Oke-Ero',\n"
- + " 'Oyun',\n"
- + " 'Pategi'\n"
- + " ]\n"
- + " },\n"
- + " {\n"
- + " 'state': 'Lagos',\n"
- + " 'lgas': [\n"
- + " 'Agege',\n"
- + " 'Ajeromi-Ifelodun',\n"
- + " 'Alimosho',\n"
- + " 'Amuwo-Odofin',\n"
- + " 'Apapa',\n"
- + " 'Badagry',\n"
- + " 'Epe',\n"
- + " 'Eti-Osa',\n"
- + " 'Ibeju-Lekki',\n"
- + " 'Ifako-Ijaiye',\n"
- + " 'Ikeja',\n"
- + " 'Ikorodu',\n"
- + " 'Kosofe',\n"
- + " 'Lagos-Island',\n"
- + " 'Lagos-Mainland',\n"
- + " 'Mushin',\n"
- + " 'Ojo',\n"
- + " 'Oshodi-Isolo',\n"
- + " 'Shomolu',\n"
- + " 'Surulere',\n"
- + " 'Yewa-South'\n"
- + " ]\n"
- + " },\n"
- + " {\n"
- + " 'state': 'Nasarawa',\n"
- + " 'lgas': [\n"
- + " 'Akwanga',\n"
- + " 'Awe',\n"
- + " 'Doma',\n"
- + " 'Karu',\n"
- + " 'Keana',\n"
- + " 'Keffi',\n"
- + " 'Kokona',\n"
- + " 'Lafia',\n"
- + " 'Nasarawa',\n"
- + " 'Nasarawa-Eggon',\n"
- + " 'Obi',\n"
- + " 'Wamba',\n"
- + " 'Toto'\n"
- + " ]\n"
- + " },\n"
- + " {\n"
- + " 'state': 'Niger',\n"
- + " 'lgas': [\n"
- + " 'Agaie',\n"
- + " 'Agwara',\n"
- + " 'Bida',\n"
- + " 'Borgu',\n"
- + " 'Bosso',\n"
- + " 'Chanchaga',\n"
- + " 'Edati',\n"
- + " 'Gbako',\n"
- + " 'Gurara',\n"
- + " 'Katcha',\n"
- + " 'Kontagora',\n"
- + " 'Lapai',\n"
- + " 'Lavun',\n"
- + " 'Magama',\n"
- + " 'Mariga',\n"
- + " 'Mashegu',\n"
- + " 'Mokwa',\n"
- + " 'Moya',\n"
- + " 'Paikoro',\n"
- + " 'Rafi',\n"
- + " 'Rijau',\n"
- + " 'Shiroro',\n"
- + " 'Suleja',\n"
- + " 'Tafa',\n"
- + " 'Wushishi'\n"
- + " ]\n"
- + " },\n"
- + " {\n"
- + " 'state': 'Ogun',\n"
- + " 'lgas': [\n"
- + " 'Abeokuta-North',\n"
- + " 'Abeokuta-South',\n"
- + " 'Ado-Odo\\/Ota',\n"
- + " 'Ewekoro',\n"
- + " 'Ifo',\n"
- + " 'Ijebu-East',\n"
- + " 'Ijebu-North',\n"
- + " 'Ijebu-North-East',\n"
- + " 'Ijebu-Ode',\n"
- + " 'Ikenne',\n"
- + " 'Imeko-Afon',\n"
- + " 'Ipokia',\n"
- + " 'Obafemi-Owode',\n"
- + " 'Odeda',\n"
- + " 'Odogbolu',\n"
- + " 'Ogun-Waterside',\n"
- + " 'Remo-North',\n"
- + " 'Shagamu',\n"
- + " 'Yewa North'\n"
- + " ]\n"
- + " },\n"
- + " {\n"
- + " 'state': 'Ondo',\n"
- + " 'lgas': [\n"
- + " 'Akoko North-East',\n"
- + " 'Akoko North-West',\n"
- + " 'Akoko South-West',\n"
- + " 'Akoko South-East',\n"
- + " 'Akure-North',\n"
- + " 'Akure-South',\n"
- + " 'Ese-Odo',\n"
- + " 'Idanre',\n"
- + " 'Ifedore',\n"
- + " 'Ilaje',\n"
- + " 'Ile-Oluji-Okeigbo',\n"
- + " 'Irele',\n"
- + " 'Odigbo',\n"
- + " 'Okitipupa',\n"
- + " 'Ondo West',\n"
- + " 'Ondo-East',\n"
- + " 'Ose',\n"
- + " 'Owo'\n"
- + " ]\n"
- + " },\n"
- + " {\n"
- + " 'state': 'Osun',\n"
- + " 'lgas': [\n"
- + " 'Atakumosa West',\n"
- + " 'Atakumosa East',\n"
- + " 'Ayedaade',\n"
- + " 'Ayedire',\n"
- + " 'Boluwaduro',\n"
- + " 'Boripe',\n"
- + " 'Ede South',\n"
- + " 'Ede North',\n"
- + " 'Egbedore',\n"
- + " 'Ejigbo',\n"
- + " 'Ife North',\n"
- + " 'Ife South',\n"
- + " 'Ife-Central',\n"
- + " 'Ife-East',\n"
- + " 'Ifelodun',\n"
- + " 'Ila',\n"
- + " 'Ilesa-East',\n"
- + " 'Ilesa-West',\n"
- + " 'Irepodun',\n"
- + " 'Irewole',\n"
- + " 'Isokan',\n"
- + " 'Iwo',\n"
- + " 'Obokun',\n"
- + " 'Odo-Otin',\n"
- + " 'Ola Oluwa',\n"
- + " 'Olorunda',\n"
- + " 'Oriade',\n"
- + " 'Orolu',\n"
- + " 'Osogbo'\n"
- + " ]\n"
- + " },\n"
- + " {\n"
- + " 'state': 'Oyo',\n"
- + " 'lgas': [\n"
- + " 'Afijio',\n"
- + " 'Akinyele',\n"
- + " 'Atiba',\n"
- + " 'Atisbo',\n"
- + " 'Egbeda',\n"
- + " 'Ibadan North',\n"
- + " 'Ibadan North-East',\n"
- + " 'Ibadan North-West',\n"
- + " 'Ibadan South-East',\n"
- + " 'Ibadan South-West',\n"
- + " 'Ibarapa-Central',\n"
- + " 'Ibarapa-East',\n"
- + " 'Ibarapa-North',\n"
- + " 'Ido',\n"
- + " 'Ifedayo',\n"
- + " 'Irepo',\n"
- + " 'Iseyin',\n"
- + " 'Itesiwaju',\n"
- + " 'Iwajowa',\n"
- + " 'Kajola',\n"
- + " 'Lagelu',\n"
- + " 'Ogo-Oluwa',\n"
- + " 'Ogbomosho-North',\n"
- + " 'Ogbomosho-South',\n"
- + " 'Olorunsogo',\n"
- + " 'Oluyole',\n"
- + " 'Ona-Ara',\n"
- + " 'Orelope',\n"
- + " 'Ori-Ire',\n"
- + " 'Oyo-West',\n"
- + " 'Oyo-East',\n"
- + " 'Saki-East',\n"
- + " 'Saki-West',\n"
- + " 'Surulere'\n"
- + " ]\n"
- + " },\n"
- + " {\n"
- + " 'state': 'Plateau',\n"
- + " 'lgas': [\n"
- + " 'Barkin-Ladi',\n"
- + " 'Bassa',\n"
- + " 'Bokkos',\n"
- + " 'Jos-East',\n"
- + " 'Jos-North',\n"
- + " 'Jos-South',\n"
- + " 'Kanam',\n"
- + " 'Kanke',\n"
- + " 'Langtang-North',\n"
- + " 'Langtang-South',\n"
- + " 'Mangu',\n"
- + " 'Mikang',\n"
- + " 'Pankshin',\n"
- + " 'Qua an Pan',\n"
- + " 'Riyom',\n"
- + " 'Shendam',\n"
- + " 'Wase'\n"
- + " ]\n"
- + " },\n"
- + " {\n"
- + " 'state': 'Rivers',\n"
- + " 'lgas': [\n"
- + " 'Abua\\/Odual',\n"
- + " 'Ahoada-East',\n"
- + " 'Ahoada-West',\n"
- + " 'Akuku Toru',\n"
- + " 'Andoni',\n"
- + " 'Asari-Toru',\n"
- + " 'Bonny',\n"
- + " 'Degema',\n"
- + " 'Eleme',\n"
- + " 'Emuoha',\n"
- + " 'Etche',\n"
- + " 'Gokana',\n"
- + " 'Ikwerre',\n"
- + " 'Khana',\n"
- + " 'Obio\\/Akpor',\n"
- + " 'Ogba-Egbema-Ndoni',\n"
- + " 'Ogba\\/Egbema\\/Ndoni',\n"
- + " 'Ogu\\/Bolo',\n"
- + " 'Okrika',\n"
- + " 'Omuma',\n"
- + " 'Opobo\\/Nkoro',\n"
- + " 'Oyigbo',\n"
- + " 'Port-Harcourt',\n"
- + " 'Tai'\n"
- + " ]\n"
- + " },\n"
- + " {\n"
- + " 'state': 'Sokoto',\n"
- + " 'lgas': [\n"
- + " 'Binji',\n"
- + " 'Bodinga',\n"
- + " 'Dange-Shuni',\n"
- + " 'Gada',\n"
- + " 'Goronyo',\n"
- + " 'Gudu',\n"
- + " 'Gwadabawa',\n"
- + " 'Illela',\n"
- + " 'Kebbe',\n"
- + " 'Kware',\n"
- + " 'Rabah',\n"
- + " 'Sabon Birni',\n"
- + " 'Shagari',\n"
- + " 'Silame',\n"
- + " 'Sokoto-North',\n"
- + " 'Sokoto-South',\n"
- + " 'Tambuwal',\n"
- + " 'Tangaza',\n"
- + " 'Tureta',\n"
- + " 'Wamako',\n"
- + " 'Wurno',\n"
- + " 'Yabo'\n"
- + " ]\n"
- + " },\n"
- + " {\n"
- + " 'state': 'Taraba',\n"
- + " 'lgas': [\n"
- + " 'Ardo-Kola',\n"
- + " 'Bali',\n"
- + " 'Donga',\n"
- + " 'Gashaka',\n"
- + " 'Gassol',\n"
- + " 'Ibi',\n"
- + " 'Jalingo',\n"
- + " 'Karim-Lamido',\n"
- + " 'Kurmi',\n"
- + " 'Lau',\n"
- + " 'Sardauna',\n"
- + " 'Takum',\n"
- + " 'Ussa',\n"
- + " 'Wukari',\n"
- + " 'Yorro',\n"
- + " 'Zing'\n"
- + " ]\n"
- + " },\n"
- + " {\n"
- + " 'state': 'Yobe',\n"
- + " 'lgas': [\n"
- + " 'Bade',\n"
- + " 'Bursari',\n"
- + " 'Damaturu',\n"
- + " 'Fika',\n"
- + " 'Fune',\n"
- + " 'Geidam',\n"
- + " 'Gujba',\n"
- + " 'Gulani',\n"
- + " 'Jakusko',\n"
- + " 'Karasuwa',\n"
- + " 'Machina',\n"
- + " 'Nangere',\n"
- + " 'Nguru',\n"
- + " 'Potiskum',\n"
- + " 'Tarmuwa',\n"
- + " 'Yunusari',\n"
- + " 'Yusufari'\n"
- + " ]\n"
- + " },\n"
- + " {\n"
- + " 'state': 'Zamfara',\n"
- + " 'lgas': [\n"
- + " 'Anka',\n"
- + " 'Bakura',\n"
- + " 'Birnin Magaji/Kiyaw',\n"
- + " 'Bukkuyum',\n"
- + " 'Bungudu',\n"
- + " 'Gummi',\n"
- + " 'Gusau',\n"
- + " 'Isa',\n"
- + " 'Kaura-Namoda',\n"
- + " 'Kiyawa',\n"
- + " 'Maradun',\n"
- + " 'Maru',\n"
- + " 'Shinkafi',\n"
- + " 'Talata-Mafara',\n"
- + " 'Tsafe',\n"
- + " 'Zurmi'\n"
- + " ]\n"
- + " }\n"
- + "];";
- String nigerianStatesTwo =
- "[\n"
- + " {\n"
- + " state: 'All Constituencies',\n"
- + " lgas: [\n"
- + " 'Aba North',\n"
- + " 'Aba South',\n"
- + " 'Arochukwu',\n"
- + " 'Bende',\n"
- + " 'Ikawuno',\n"
- + " 'Ikwuano',\n"
- + " 'Isiala-Ngwa North',\n"
- + " 'Isiala-Ngwa South',\n"
- + " 'Isuikwuato',\n"
- + " 'Umu Nneochi',\n"
- + " 'Obi Ngwa',\n"
- + " 'Obioma Ngwa',\n"
- + " 'Ohafia',\n"
- + " 'Ohaozara',\n"
- + " 'Osisioma',\n"
- + " 'Ugwunagbo',\n"
- + " 'Ukwa West',\n"
- + " 'Ukwa East',\n"
- + " 'Umuahia North',\n"
- + " 'Umuahia South'\n"
- + " ]\n"
- + " },\n"
- + " {\n"
- + " 'state': 'Westlands',\n"
- + " 'lgas': [\n"
- + " 'Demsa',\n"
- + " 'Fufore',\n"
- + " 'Ganye',\n"
- + " 'Girei',\n"
- + " 'Gombi',\n"
- + " 'Guyuk',\n"
- + " 'Hong',\n"
- + " 'Jada',\n"
- + " 'Lamurde',\n"
- + " 'Madagali',\n"
- + " 'Maiha',\n"
- + " 'Mayo-Belwa',\n"
- + " 'Michika',\n"
- + " 'Mubi-North',\n"
- + " 'Mubi-South',\n"
- + " 'Numan',\n"
- + " 'Shelleng',\n"
- + " 'Song',\n"
- + " 'Toungo',\n"
- + " 'Yola North',\n"
- + " 'Yola South'\n"
- + " ]\n"
- + " },\n"
- + " {\n"
- + " 'state': 'Dagoretti',\n"
- + " 'lgas': [\n"
- + " 'Demsa',\n"
- + " 'Fufore',\n"
- + " 'Ganye',\n"
- + " 'Girei',\n"
- + " 'Gombi',\n"
- + " 'Guyuk',\n"
- + " 'Hong',\n"
- + " 'Jada',\n"
- + " 'Lamurde',\n"
- + " 'Madagali',\n"
- + " 'Maiha',\n"
- + " 'Mayo-Belwa',\n"
- + " 'Michika',\n"
- + " 'Mubi-North',\n"
- + " 'Mubi-South',\n"
- + " 'Numan',\n"
- + " 'Shelleng',\n"
- + " 'Song',\n"
- + " 'Toungo',\n"
- + " 'Yola North',\n"
- + " 'Yola South'\n"
- + " ]\n"
- + " },\n"
- + " {\n"
- + " 'state': 'Langata',\n"
- + " 'lgas': [\n"
- + " 'Abak',\n"
- + " 'Eastern-Obolo',\n"
- + " 'Eket',\n"
- + " 'Esit-Eket',\n"
- + " 'Essien-Udim',\n"
- + " 'Etim-Ekpo',\n"
- + " 'Etinan',\n"
- + " 'Ibeno',\n"
- + " 'Ibesikpo-Asutan',\n"
- + " 'Ibiono-Ibom',\n"
- + " 'Ika',\n"
- + " 'Ikono',\n"
- + " 'Ikot-Abasi',\n"
- + " 'Ikot-Ekpene',\n"
- + " 'Ini',\n"
- + " 'Itu',\n"
- + " 'Mbo',\n"
- + " 'Mkpat-Enin',\n"
- + " 'Nsit-Atai',\n"
- + " 'Nsit-Ibom',\n"
- + " 'Nsit-Ubium',\n"
- + " 'Obot-Akara',\n"
- + " 'Okobo',\n"
- + " 'Onna',\n"
- + " 'Oron',\n"
- + " 'Oruk Anam',\n"
- + " 'Udung-Uko',\n"
- + " 'Ukanafun',\n"
- + " 'Urue-Offong/Oruko',\n"
- + " 'Uruan',\n"
- + " 'Uyo'\n"
- + " ]\n"
- + " },\n"
- + " {\n"
- + " 'state': 'Embakasi',\n"
- + " 'lgas': [\n"
- + " 'Aguata',\n"
- + " 'Anambra East',\n"
- + " 'Anambra West',\n"
- + " 'Anaocha',\n"
- + " 'Awka North',\n"
- + " 'Awka South',\n"
- + " 'Ayamelum',\n"
- + " 'Dunukofia',\n"
- + " 'Ekwusigo',\n"
- + " 'Idemili-North',\n"
- + " 'Idemili-South',\n"
- + " 'Ihiala',\n"
- + " 'Njikoka',\n"
- + " 'Nnewi-North',\n"
- + " 'Nnewi-South',\n"
- + " 'Ogbaru',\n"
- + " 'Onitsha-North',\n"
- + " 'Onitsha-South',\n"
- + " 'Orumba-North',\n"
- + " 'Orumba-South'\n"
- + " ]\n"
- + " },\n"
- + " {\n"
- + " 'state': 'Kasarani',\n"
- + " 'lgas': [\n"
- + " 'Alkaleri',\n"
- + " 'Bauchi',\n"
- + " 'Bogoro',\n"
- + " 'Damban',\n"
- + " 'Darazo',\n"
- + " 'Dass',\n"
- + " 'Gamawa',\n"
- + " 'Ganjuwa',\n"
- + " 'Giade',\n"
- + " 'Itas\\/Gadau',\n"
- + " 'Jama Are',\n"
- + " 'Katagum',\n"
- + " 'Kirfi',\n"
- + " 'Misau',\n"
- + " 'Ningi',\n"
- + " 'Shira',\n"
- + " 'Tafawa-Balewa',\n"
- + " 'Toro',\n"
- + " 'Warji',\n"
- + " 'Zaki'\n"
- + " ]\n"
- + " },\n"
- + " {\n"
- + " 'state': 'Kibra',\n"
- + " 'lgas': [\n"
- + " 'Ado',\n"
- + " 'Agatu',\n"
- + " 'Apa',\n"
- + " 'Buruku',\n"
- + " 'Gboko',\n"
- + " 'Guma',\n"
- + " 'Gwer-East',\n"
- + " 'Gwer-West',\n"
- + " 'Katsina-Ala',\n"
- + " 'Konshisha',\n"
- + " 'Kwande',\n"
- + " 'Logo',\n"
- + " 'Makurdi',\n"
- + " 'Ogbadibo',\n"
- + " 'Ohimini',\n"
- + " 'Oju',\n"
- + " 'Okpokwu',\n"
- + " 'Otukpo',\n"
- + " 'Tarka',\n"
- + " 'Ukum',\n"
- + " 'Ushongo',\n"
- + " 'Vandeikya'\n"
- + " ]\n"
- + " },\n"
- + " {\n"
- + " 'state': 'Makadara',\n"
- + " 'lgas': [\n"
- + " 'Abadam',\n"
- + " 'Askira-Uba',\n"
- + " 'Bama',\n"
- + " 'Bayo',\n"
- + " 'Biu',\n"
- + " 'Chibok',\n"
- + " 'Damboa',\n"
- + " 'Dikwa',\n"
- + " 'Gubio',\n"
- + " 'Guzamala',\n"
- + " 'Gwoza',\n"
- + " 'Hawul',\n"
- + " 'Jere',\n"
- + " 'Kaga',\n"
- + " 'Kala\\/Balge',\n"
- + " 'Konduga',\n"
- + " 'Kukawa',\n"
- + " 'Kwaya-Kusar',\n"
- + " 'Mafa',\n"
- + " 'Magumeri',\n"
- + " 'Maiduguri',\n"
- + " 'Marte',\n"
- + " 'Mobbar',\n"
- + " 'Monguno',\n"
- + " 'Ngala',\n"
- + " 'Nganzai',\n"
- + " 'Shani'\n"
- + " ]\n"
- + " },\n"
- + " {\n"
- + " 'state': 'Starehe',\n"
- + " 'lgas': [\n"
- + " 'Brass',\n"
- + " 'Ekeremor',\n"
- + " 'Kolokuma\\/Opokuma',\n"
- + " 'Nembe',\n"
- + " 'Ogbia',\n"
- + " 'Sagbama',\n"
- + " 'Southern-Ijaw',\n"
- + " 'Yenagoa'\n"
- + " ]\n"
- + " },\n"
- + " {\n"
- + " 'state': 'Ruaraka',\n"
- + " 'lgas': [\n"
- + " 'Abi',\n"
- + " 'Akamkpa',\n"
- + " 'Akpabuyo',\n"
- + " 'Bakassi',\n"
- + " 'Bekwarra',\n"
- + " 'Biase',\n"
- + " 'Boki',\n"
- + " 'Calabar-Municipal',\n"
- + " 'Calabar-South',\n"
- + " 'Etung',\n"
- + " 'Ikom',\n"
- + " 'Obanliku',\n"
- + " 'Obubra',\n"
- + " 'Obudu',\n"
- + " 'Odukpani',\n"
- + " 'Ogoja',\n"
- + " 'Yakurr',\n"
- + " 'Yala'\n"
- + " ]\n"
- + " },\n"
- + " {\n"
- + " 'state': 'Roysambu',\n"
- + " 'lgas': [\n"
- + " 'Aniocha North',\n"
- + " 'Aniocha-North',\n"
- + " 'Aniocha-South',\n"
- + " 'Bomadi',\n"
- + " 'Burutu',\n"
- + " 'Ethiope-East',\n"
- + " 'Ethiope-West',\n"
- + " 'Ika-North-East',\n"
- + " 'Ika-South',\n"
- + " 'Isoko-North',\n"
- + " 'Isoko-South',\n"
- + " 'Ndokwa-East',\n"
- + " 'Ndokwa-West',\n"
- + " 'Okpe',\n"
- + " 'Oshimili-North',\n"
- + " 'Oshimili-South',\n"
- + " 'Patani',\n"
- + " 'Sapele',\n"
- + " 'Udu',\n"
- + " 'Ughelli-North',\n"
- + " 'Ughelli-South',\n"
- + " 'Ukwuani',\n"
- + " 'Uvwie',\n"
- + " 'Warri South-West',\n"
- + " 'Warri North',\n"
- + " 'Warri South'\n"
- + " ]\n"
- + " },\n"
- + " {\n"
- + " 'state': 'Kamukunji',\n"
- + " 'lgas': [\n"
- + " 'Abakaliki',\n"
- + " 'Afikpo-North',\n"
- + " 'Afikpo South (Edda)',\n"
- + " 'Ebonyi',\n"
- + " 'Ezza-North',\n"
- + " 'Ezza-South',\n"
- + " 'Ikwo',\n"
- + " 'Ishielu',\n"
- + " 'Ivo',\n"
- + " 'Izzi',\n"
- + " 'Ohaukwu',\n"
- + " 'Onicha'\n"
- + " ]\n"
- + " },\n"
- + " {\n"
- + " 'state': 'Mathare',\n"
- + " 'lgas': [\n"
- + " 'Akoko Edo',\n"
- + " 'Egor',\n"
- + " 'Esan-Central',\n"
- + " 'Esan-North-East',\n"
- + " 'Esan-South-East',\n"
- + " 'Esan-West',\n"
- + " 'Etsako-Central',\n"
- + " 'Etsako-East',\n"
- + " 'Etsako-West',\n"
- + " 'Igueben',\n"
- + " 'Ikpoba-Okha',\n"
- + " 'Oredo',\n"
- + " 'Orhionmwon',\n"
- + " 'Ovia-North-East',\n"
- + " 'Ovia-South-West',\n"
- + " 'Owan East',\n"
- + " 'Owan-West',\n"
- + " 'Uhunmwonde'\n"
- + " ]\n"
- + " }\n"
- + "];";
- String nigerianStates =
- "[\n"
- + " {\n"
- + " state: 'Westlands',\n"
- + " lgas: [\n"
- + " 'Aba North',\n"
- + " 'Aba South',\n"
- + " 'Arochukwu',\n"
- + " 'Bende',\n"
- + " 'Ikawuno',\n"
- + " 'Ikwuano',\n"
- + " 'Isiala-Ngwa North',\n"
- + " 'Isiala-Ngwa South',\n"
- + " 'Isuikwuato',\n"
- + " 'Umu Nneochi',\n"
- + " 'Obi Ngwa',\n"
- + " 'Obioma Ngwa',\n"
- + " 'Ohafia',\n"
- + " 'Ohaozara',\n"
- + " 'Osisioma',\n"
- + " 'Ugwunagbo',\n"
- + " 'Ukwa West',\n"
- + " 'Ukwa East',\n"
- + " 'Umuahia North',\n"
- + " 'Umuahia South'\n"
- + " ]\n"
- + " },\n"
- + " {\n"
- + " 'state': 'Dagoretti',\n"
- + " 'lgas': [\n"
- + " 'Demsa',\n"
- + " 'Fufore',\n"
- + " 'Ganye',\n"
- + " 'Girei',\n"
- + " 'Gombi',\n"
- + " 'Guyuk',\n"
- + " 'Hong',\n"
- + " 'Jada',\n"
- + " 'Lamurde',\n"
- + " 'Madagali',\n"
- + " 'Maiha',\n"
- + " 'Mayo-Belwa',\n"
- + " 'Michika',\n"
- + " 'Mubi-North',\n"
- + " 'Mubi-South',\n"
- + " 'Numan',\n"
- + " 'Shelleng',\n"
- + " 'Song',\n"
- + " 'Toungo',\n"
- + " 'Yola North',\n"
- + " 'Yola South'\n"
- + " ]\n"
- + " },\n"
- + " {\n"
- + " 'state': 'Langata',\n"
- + " 'lgas': [\n"
- + " 'Abak',\n"
- + " 'Eastern-Obolo',\n"
- + " 'Eket',\n"
- + " 'Esit-Eket',\n"
- + " 'Essien-Udim',\n"
- + " 'Etim-Ekpo',\n"
- + " 'Etinan',\n"
- + " 'Ibeno',\n"
- + " 'Ibesikpo-Asutan',\n"
- + " 'Ibiono-Ibom',\n"
- + " 'Ika',\n"
- + " 'Ikono',\n"
- + " 'Ikot-Abasi',\n"
- + " 'Ikot-Ekpene',\n"
- + " 'Ini',\n"
- + " 'Itu',\n"
- + " 'Mbo',\n"
- + " 'Mkpat-Enin',\n"
- + " 'Nsit-Atai',\n"
- + " 'Nsit-Ibom',\n"
- + " 'Nsit-Ubium',\n"
- + " 'Obot-Akara',\n"
- + " 'Okobo',\n"
- + " 'Onna',\n"
- + " 'Oron',\n"
- + " 'Oruk Anam',\n"
- + " 'Udung-Uko',\n"
- + " 'Ukanafun',\n"
- + " 'Urue-Offong/Oruko',\n"
- + " 'Uruan',\n"
- + " 'Uyo'\n"
- + " ]\n"
- + " },\n"
- + " {\n"
- + " 'state': 'Embakasi',\n"
- + " 'lgas': [\n"
- + " 'Aguata',\n"
- + " 'Anambra East',\n"
- + " 'Anambra West',\n"
- + " 'Anaocha',\n"
- + " 'Awka North',\n"
- + " 'Awka South',\n"
- + " 'Ayamelum',\n"
- + " 'Dunukofia',\n"
- + " 'Ekwusigo',\n"
- + " 'Idemili-North',\n"
- + " 'Idemili-South',\n"
- + " 'Ihiala',\n"
- + " 'Njikoka',\n"
- + " 'Nnewi-North',\n"
- + " 'Nnewi-South',\n"
- + " 'Ogbaru',\n"
- + " 'Onitsha-North',\n"
- + " 'Onitsha-South',\n"
- + " 'Orumba-North',\n"
- + " 'Orumba-South'\n"
- + " ]\n"
- + " },\n"
- + " {\n"
- + " 'state': 'Kasarani',\n"
- + " 'lgas': [\n"
- + " 'Alkaleri',\n"
- + " 'Bauchi',\n"
- + " 'Bogoro',\n"
- + " 'Damban',\n"
- + " 'Darazo',\n"
- + " 'Dass',\n"
- + " 'Gamawa',\n"
- + " 'Ganjuwa',\n"
- + " 'Giade',\n"
- + " 'Itas\\/Gadau',\n"
- + " 'Jama Are',\n"
- + " 'Katagum',\n"
- + " 'Kirfi',\n"
- + " 'Misau',\n"
- + " 'Ningi',\n"
- + " 'Shira',\n"
- + " 'Tafawa-Balewa',\n"
- + " 'Toro',\n"
- + " 'Warji',\n"
- + " 'Zaki'\n"
- + " ]\n"
- + " },\n"
- + " {\n"
- + " 'state': 'Kibra',\n"
- + " 'lgas': [\n"
- + " 'Ado',\n"
- + " 'Agatu',\n"
- + " 'Apa',\n"
- + " 'Buruku',\n"
- + " 'Gboko',\n"
- + " 'Guma',\n"
- + " 'Gwer-East',\n"
- + " 'Gwer-West',\n"
- + " 'Katsina-Ala',\n"
- + " 'Konshisha',\n"
- + " 'Kwande',\n"
- + " 'Logo',\n"
- + " 'Makurdi',\n"
- + " 'Ogbadibo',\n"
- + " 'Ohimini',\n"
- + " 'Oju',\n"
- + " 'Okpokwu',\n"
- + " 'Otukpo',\n"
- + " 'Tarka',\n"
- + " 'Ukum',\n"
- + " 'Ushongo',\n"
- + " 'Vandeikya'\n"
- + " ]\n"
- + " },\n"
- + " {\n"
- + " 'state': 'Makadara',\n"
- + " 'lgas': [\n"
- + " 'Abadam',\n"
- + " 'Askira-Uba',\n"
- + " 'Bama',\n"
- + " 'Bayo',\n"
- + " 'Biu',\n"
- + " 'Chibok',\n"
- + " 'Damboa',\n"
- + " 'Dikwa',\n"
- + " 'Gubio',\n"
- + " 'Guzamala',\n"
- + " 'Gwoza',\n"
- + " 'Hawul',\n"
- + " 'Jere',\n"
- + " 'Kaga',\n"
- + " 'Kala\\/Balge',\n"
- + " 'Konduga',\n"
- + " 'Kukawa',\n"
- + " 'Kwaya-Kusar',\n"
- + " 'Mafa',\n"
- + " 'Magumeri',\n"
- + " 'Maiduguri',\n"
- + " 'Marte',\n"
- + " 'Mobbar',\n"
- + " 'Monguno',\n"
- + " 'Ngala',\n"
- + " 'Nganzai',\n"
- + " 'Shani'\n"
- + " ]\n"
- + " },\n"
- + " {\n"
- + " 'state': 'Starehe',\n"
- + " 'lgas': [\n"
- + " 'Brass',\n"
- + " 'Ekeremor',\n"
- + " 'Kolokuma\\/Opokuma',\n"
- + " 'Nembe',\n"
- + " 'Ogbia',\n"
- + " 'Sagbama',\n"
- + " 'Southern-Ijaw',\n"
- + " 'Yenagoa'\n"
- + " ]\n"
- + " },\n"
- + " {\n"
- + " 'state': 'Ruaraka',\n"
- + " 'lgas': [\n"
- + " 'Abi',\n"
- + " 'Akamkpa',\n"
- + " 'Akpabuyo',\n"
- + " 'Bakassi',\n"
- + " 'Bekwarra',\n"
- + " 'Biase',\n"
- + " 'Boki',\n"
- + " 'Calabar-Municipal',\n"
- + " 'Calabar-South',\n"
- + " 'Etung',\n"
- + " 'Ikom',\n"
- + " 'Obanliku',\n"
- + " 'Obubra',\n"
- + " 'Obudu',\n"
- + " 'Odukpani',\n"
- + " 'Ogoja',\n"
- + " 'Yakurr',\n"
- + " 'Yala'\n"
- + " ]\n"
- + " },\n"
- + " {\n"
- + " 'state': 'Roysambu',\n"
- + " 'lgas': [\n"
- + " 'Aniocha North',\n"
- + " 'Aniocha-North',\n"
- + " 'Aniocha-South',\n"
- + " 'Bomadi',\n"
- + " 'Burutu',\n"
- + " 'Ethiope-East',\n"
- + " 'Ethiope-West',\n"
- + " 'Ika-North-East',\n"
- + " 'Ika-South',\n"
- + " 'Isoko-North',\n"
- + " 'Isoko-South',\n"
- + " 'Ndokwa-East',\n"
- + " 'Ndokwa-West',\n"
- + " 'Okpe',\n"
- + " 'Oshimili-North',\n"
- + " 'Oshimili-South',\n"
- + " 'Patani',\n"
- + " 'Sapele',\n"
- + " 'Udu',\n"
- + " 'Ughelli-North',\n"
- + " 'Ughelli-South',\n"
- + " 'Ukwuani',\n"
- + " 'Uvwie',\n"
- + " 'Warri South-West',\n"
- + " 'Warri North',\n"
- + " 'Warri South'\n"
- + " ]\n"
- + " },\n"
- + " {\n"
- + " 'state': 'Kamukunji',\n"
- + " 'lgas': [\n"
- + " 'Abakaliki',\n"
- + " 'Afikpo-North',\n"
- + " 'Afikpo South (Edda)',\n"
- + " 'Ebonyi',\n"
- + " 'Ezza-North',\n"
- + " 'Ezza-South',\n"
- + " 'Ikwo',\n"
- + " 'Ishielu',\n"
- + " 'Ivo',\n"
- + " 'Izzi',\n"
- + " 'Ohaukwu',\n"
- + " 'Onicha'\n"
- + " ]\n"
- + " },\n"
- + " {\n"
- + " 'state': 'Mathare',\n"
- + " 'lgas': [\n"
- + " 'Akoko Edo',\n"
- + " 'Egor',\n"
- + " 'Esan-Central',\n"
- + " 'Esan-North-East',\n"
- + " 'Esan-South-East',\n"
- + " 'Esan-West',\n"
- + " 'Etsako-Central',\n"
- + " 'Etsako-East',\n"
- + " 'Etsako-West',\n"
- + " 'Igueben',\n"
- + " 'Ikpoba-Okha',\n"
- + " 'Oredo',\n"
- + " 'Orhionmwon',\n"
- + " 'Ovia-North-East',\n"
- + " 'Ovia-South-West',\n"
- + " 'Owan East',\n"
- + " 'Owan-West',\n"
- + " 'Uhunmwonde'\n"
- + " ]\n"
- + " }\n"
- + "];";
- public String getSchemas() {
- return schemas;
- }
- public String getIndustries() {
- return industries;
- }
- String schemas =
- "[\n"
- + " {\n"
- + " \"categoryName\":\"LocalBusiness\"\n"
- + " },\n"
- + " {\n"
- + " \"categoryName\":\"\u200BHomeAndConstructionBusiness \"\n"
- + " },\n"
- + " {\n"
- + " \"categoryName\":\"AutoRepair\"\n"
- + " },\n"
- + " {\n"
- + " \"categoryName\":\"\u200BTravelAgency\"\n"
- + " },\n"
- + " {\n"
- + " \"categoryName\":\"TouristInformationCenter\"\n"
- + " },\n"
- + " {\n"
- + " \"categoryName\":\"LodgingBusiness\"\n"
- + " },\n"
- + " {\n"
- + " \"categoryName\":\"Financial Services\"\n"
- + " },\n"
- + " {\n"
- + " \"categoryName\":\"\u200BFinancialService\"\n"
- + " },\n"
- + " {\n"
- + " \"categoryName\":\"InternetCafe\"\n"
- + " },\n"
- + " {\n"
- + " \"categoryName\":\"\u200B\u200B\u200BOnlineBusiness \"\n"
- + " }"
- + ""
- + ""
- + ""
- + ",\n"
- + " {\n"
- + " \"categoryName\":\"\u200B\u200B\u200BStore\n \"\n"
- + " },\n"
- + " {\n"
- + " \"categoryName\":\"\u200B\u200B\u200BProfessionalService \"\n"
- + " },\n"
- + " {\n"
- + " \"categoryName\":\"\u200B\u200B\u200BMedicalBusiness \"\n"
- + " },\n"
- + " {\n"
- + " \"categoryName\":\"\u200B\u200B\u200BSportsActivityLocation \"\n"
- + " },\n"
- + " {\n"
- + " \"categoryName\":\"\u200B\u200B\u200BHealthClub \"\n"
- + " },\n"
- + " {\n"
- + " \"categoryName\":\"\u200B\u200B\u200BCreativeWork \"\n"
- + " },\n"
- + " {\n"
- + " \"categoryName\":\"\u200B\u200B\u200BComputerStore\n \"\n"
- + " },\n"
- + " {\n"
- + " \"categoryName\":\"\u200B\u200B\u200BMobilePhoneStore \"\n"
- + " },\n"
- + " {\n"
- + " \"categoryName\":\"\u200B\u200B\u200BElectronicsStore \"\n"
- + " },\n"
- + " {\n"
- + " \"categoryName\":\"\u200B\u200B\u200BRealEstateAgent \"\n"
- + " },\n"
- + " {\n"
- + " \"categoryName\":\"\u200B\u200B\u200BAutomotiveBusiness \"\n"
- + " },\n"
- + " {\n"
- + " \"categoryName\":\"\u200B\u200B\u200BLodgingBusiness \"\n"
- + " },\n"
- + " {\n"
- + " \"categoryName\":\"\u200B\u200B\u200BFurnitureStore \"\n"
- + " },\n"
- + " {\n"
- + " \"categoryName\":\"\u200B\u200B\u200BClothingStore \"\n"
- + " },\n"
- + " {\n"
- + " \"categoryName\":\"\u200B\u200B\u200BFoodEstablishment \"\n"
- + " },\n"
- + " {\n"
- + " \"categoryName\":\"\u200B\u200B\u200BHealthAndBeautyBusiness \"\n"
- + " }\n"
- + "]";
- String industriesBackendFallback =
- " [\n" +
- " {\n" +
- " \"name\":\"Mobile Phone Shop\",\n" +
- " \"schema_name\":\"MobilePhoneStore\",\n" +
- " \"id\":28\n" +
- " },\n" +
- " {\n" +
- " \"name\":\"Health and Wellness Club\",\n" +
- " \"schema_name\":\"HealthClub\",\n" +
- " \"id\":27\n" +
- " },\n" +
- " {\n" +
- " \"name\":\"Online Business\",\n" +
- " \"schema_name\":\"OnlineBusiness\",\n" +
- " \"id\":26\n" +
- " },\n" +
- " {\n" +
- " \"name\":\"Lodging\",\n" +
- " \"schema_name\":\"LodgingBusiness\",\n" +
- " \"id\":25\n" +
- " },\n" +
- " {\n" +
- " \"name\":\"Tourism Information Center\",\n" +
- " \"schema_name\":\"TouristInformationCenter\",\n" +
- " \"id\":24\n" +
- " },\n" +
- " {\n" +
- " \"name\":\"Other\",\n" +
- " \"schema_name\":\"LocalBusiness\",\n" +
- " \"id\":23\n" +
- " },\n" +
- " {\n" +
- " \"name\":\"Home and Construction\",\n" +
- " \"schema_name\":\"HomeAndConstructionBusiness\",\n" +
- " \"id\":22\n" +
- " },\n" +
- " {\n" +
- " \"name\":\"Mechanical And Auto Repair\",\n" +
- " \"schema_name\":\"AutoRepair\",\n" +
- " \"id\":21\n" +
- " },\n" +
- " {\n" +
- " \"name\":\"Travel Agency\",\n" +
- " \"schema_name\":\"TravelAgency\",\n" +
- " \"id\":20\n" +
- " },\n" +
- " {\n" +
- " \"name\":\"Financial Services\",\n" +
- " \"schema_name\":\"FinancialService\",\n" +
- " \"id\":19\n" +
- " },\n" +
- " {\n" +
- " \"name\":\"Internet Cafe\",\n" +
- " \"schema_name\":\"InternetCafe\",\n" +
- " \"id\":18\n" +
- " },\n" +
- " {\n" +
- " \"name\":\"Agriculture\",\n" +
- " \"schema_name\":\"Agriculture\",\n" +
- " \"id\":17\n" +
- " },\n" +
- " {\n" +
- " \"name\":\"Retail and Shopping\",\n" +
- " \"schema_name\":\"Store\",\n" +
- " \"id\":16\n" +
- " },\n" +
- " {\n" +
- " \"name\":\"Professional Services\",\n" +
- " \"schema_name\":\"ProfessionalService\",\n" +
- " \"id\":15\n" +
- " },\n" +
- " {\n" +
- " \"name\":\"Medical and Healthcare\",\n" +
- " \"schema_name\":\"MedicalBusiness\",\n" +
- " \"id\":14\n" +
- " },\n" +
- " {\n" +
- " \"name\":\"Construction\",\n" +
- " \"schema_name\":\"ProfessionalService\",\n" +
- " \"id\":13\n" +
- " },\n" +
- " {\n" +
- " \"name\":\"Sports and Activities\",\n" +
- " \"schema_name\":\"SportsActivityLocation\",\n" +
- " \"id\":12\n" +
- " },\n" +
- " {\n" +
- " \"name\":\"Creative Work\",\n" +
- " \"schema_name\":\"CreativeWork\",\n" +
- " \"id\":11\n" +
- " },\n" +
- " {\n" +
- " \"name\":\"Computer Shop\",\n" +
- " \"schema_name\":\"ComputerStore\",\n" +
- " \"id\":10\n" +
- " },\n" +
- " {\n" +
- " \"name\":\"Electronics Shop\",\n" +
- " \"schema_name\":\"ElectronicsStore\",\n" +
- " \"id\":9\n" +
- " },\n" +
- " {\n" +
- " \"name\":\"Real Estate Agent/Agency\",\n" +
- " \"schema_name\":\"RealEstateAgent\",\n" +
- " \"id\":8\n" +
- " },\n" +
- " {\n" +
- " \"name\":\"Vehicles and Automotive\",\n" +
- " \"schema_name\":\"AutomotiveBusiness\",\n" +
- " \"id\":7\n" +
- " },\n" +
- " {\n" +
- " \"name\":\"Hospitality\",\n" +
- " \"schema_name\":\"LodgingBusiness\",\n" +
- " \"id\":6\n" +
- " },\n" +
- " {\n" +
- " \"name\":\"Home and Office Furniture\",\n" +
- " \"schema_name\":\"FurnitureStore\",\n" +
- " \"id\":5\n" +
- " },\n" +
- " {\n" +
- " \"name\":\"Fashion and Accessories\",\n" +
- " \"schema_name\":\"ClothingStore\",\n" +
- " \"id\":4\n" +
- " },\n" +
- " {\n" +
- " \"name\":\"Food Establishment\",\n" +
- " \"schema_name\":\"FoodEstablishment\",\n" +
- " \"id\":3\n" +
- " },\n" +
- " {\n" +
- " \"name\":\"Health and Beauty\",\n" +
- " \"schema_name\":\"HealthAndBeautyBusiness\",\n" +
- " \"id\":2\n" +
- " },\n" +
- " {\n" +
- " \"name\":\"Transport and Logistics\",\n" +
- " \"schema_name\":\"AutomotiveBusiness\",\n" +
- " \"id\":1\n" +
- " }\n" +
- "]";
- String industries =
- "[\n"
- + " {\n"
- + " \"categoryName\":\"Other\"\n"
- + " },\n"
- + " {\n"
- + " \"categoryName\":\"\u200BHome and Construction \"\n"
- + " },\n"
- + " {\n"
- + " \"categoryName\":\"Mechanical and Auto Repair\"\n"
- + " },\n"
- + " {\n"
- + " \"categoryName\":\"\u200BTravel Agency\"\n"
- + " },\n"
- + " {\n"
- + " \"categoryName\":\"Tourism Information Center\"\n"
- + " },\n"
- + " {\n"
- + " \"categoryName\":\"Lodging (Hotels, Bed & Breakfast, etc.) \"\n"
- + " },\n"
- + " {\n"
- + " \"categoryName\":\"Financial Services\"\n"
- + " },\n"
- + " {\n"
- + " \"categoryName\":\"\u200BInternet Cafe\"\n"
- + " },\n"
- + " {\n"
- + " \"categoryName\":\"Mobile, tablets & Laptops\"\n"
- + " },\n"
- + " {\n"
- + " \"categoryName\":\"\u200B\u200B\u200BOnline Business \"\n"
- + " },\n"
- + " {\n"
- + " \"categoryName\":\"\u200B\u200B\u200BRetail and Shopping \"\n"
- + " },\n"
- + " {\n"
- + " \"categoryName\":\"\u200B\u200B\u200BProfessional Services (Consultant,"
- + " Lawyer, Doctors etc.) \"\n"
- + " },\n"
- + " {\n"
- + " \"categoryName\":\"\u200B\u200B\u200BMedical and Healthcare \"\n"
- + " },\n"
- + " {\n"
- + " \"categoryName\":\"\u200B\u200B\u200BSports and Activities \"\n"
- + " },\n"
- + " {\n"
- + " \"categoryName\":\"\u200B\u200B\u200BHealth and Wellness Club \"\n"
- + " },\n"
- + " {\n"
- + " \"categoryName\":\"\u200B\u200B\u200BCreative Work (Photography, Writing,"
- + " Filmography) \"\n"
- + " },\n"
- + " {\n"
- + " \"categoryName\":\"\u200B\u200B\u200BComputer Shop \"\n"
- + " },\n"
- + " {\n"
- + " \"categoryName\":\"\u200B\u200B\u200BMobile, Tablets & Laptops \"\n"
- + " },\n"
- + " {\n"
- + " \"categoryName\":\"\u200B\u200B\u200BElectronic Appliances \"\n"
- + " },\n"
- + " {\n"
- + " \"categoryName\":\"\u200B\u200B\u200BReal Estate Agent/Agency \"\n"
- + " },\n"
- + " {\n"
- + " \"categoryName\":\"\u200B\u200B\u200BVehicles & Automotive \"\n"
- + " },\n"
- + " {\n"
- + " \"categoryName\":\"\u200B\u200B\u200BHospitality \"\n"
- + " },\n"
- + " {\n"
- + " \"categoryName\":\"\u200B\u200B\u200BHome and Office Furniture \"\n"
- + " },\n"
- + " {\n"
- + " \"categoryName\":\"\u200B\u200B\u200BFashion & Accessories \"\n"
- + " },\n"
- + " {\n"
- + " \"categoryName\":\"\u200B\u200B\u200BFood & Beverages \"\n"
- + " },\n"
- + " {\n"
- + " \"categoryName\":\"\u200B\u200B\u200BHealth and Beauty (Salon, Spa,"
- + " Massages, etc.) \"\n"
- + " }\n"
- + "]";
- String bankList =
- "[\n"
- + " {\n"
- + " code: '044',\n"
- + " id: 1,\n"
- + " 'name': 'Access Bank'\n"
- + " }, {\n"
- + " code: '023',\n"
- + " id: 2,\n"
- + " name: 'Citi Bank'\n"
- + " }, {\n"
- + " code: '050',\n"
- + " id: 4,\n"
- + " name: 'EcoBank PLC'\n"
- + " }, {\n"
- + " code: '011',\n"
- + " id: 5,\n"
- + " name: 'First Bank PLC'\n"
- + " }, {\n"
- + " code: '214',\n"
- + " id: 6,\n"
- + " name: 'First City Monument Bank'\n"
- + " }, {\n"
- + " code: '070',\n"
- + " id: 7,\n"
- + " name: 'Fidelity Bank'\n"
- + " }, {\n"
- + " code: '058',\n"
- + " id: 8,\n"
- + " name: 'Guaranty Trust Bank'\n"
- + " }, {\n"
- + " code: '076',\n"
- + " id: 9,\n"
- + " name: 'Polaris bank'\n"
- + " }, {\n"
- + " code: '221',\n"
- + " id: 10,\n"
- + " name: 'Stanbic IBTC Bank'\n"
- + " }, {\n"
- + " code: '068',\n"
- + " id: 11,\n"
- + " name: 'Standard Chaterted bank PLC'\n"
- + " }, {\n"
- + " code: '232',\n"
- + " id: 12,\n"
- + " name: 'Sterling Bank PLC'\n"
- + " }, {\n"
- + " code: '033',\n"
- + " id: 13,\n"
- + " name: 'United Bank for Africa'\n"
- + " }, {\n"
- + " code: '032',\n"
- + " id: 14,\n"
- + " name: 'Union Bank PLC'\n"
- + " }, {\n"
- + " code: '035',\n"
- + " id: 15,\n"
- + " name: 'Wema Bank PLC'\n"
- + " }, {\n"
- + " code: '057',\n"
- + " id: 16,\n"
- + " name: 'Zenith bank PLC'\n"
- + " }, {\n"
- + " code: '215',\n"
- + " id: 17,\n"
- + " name: 'Unity Bank PLC'\n"
- + " }, {\n"
- + " code: '101',\n"
- + " id: 18,\n"
- + " name: 'ProvidusBank PLC'\n"
- + " }, {\n"
- + " code: '082',\n"
- + " id: 183,\n"
- + " name: 'Keystone Bank'\n"
- + " }, {\n"
- + " code: '301',\n"
- + " id: 184,\n"
- + " name: 'Jaiz Bank'\n"
- + " }, {\n"
- + " code: '030',\n"
- + " id: 186,\n"
- + " name: 'Heritage Bank'\n"
- + " }, {\n"
- + " code: '100',\n"
- + " id: 231,\n"
- + " name: 'Suntrust Bank'\n"
- + " }, {\n"
- + " code: '608',\n"
- + " id: 252,\n"
- + " name: 'FINATRUST MICROFINANCE BANK'\n"
- + " }, {\n"
- + " code: '090175',\n"
- + " id: 253,\n"
- + " name: 'Rubies Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090267',\n"
- + " id: 254,\n"
- + " name: 'Kuda'\n"
- + " }, {\n"
- + " code: '090115',\n"
- + " id: 258,\n"
- + " name: 'TCF MFB'\n"
- + " }, {\n"
- + " code: '400001',\n"
- + " id: 259,\n"
- + " name: 'FSDH Merchant Bank'\n"
- + " }, {\n"
- + " code: '502',\n"
- + " id: 260,\n"
- + " name: 'Rand merchant Bank'\n"
- + " }, {\n"
- + " code: '103',\n"
- + " id: 301,\n"
- + " name: 'Globus Bank'\n"
- + " }, {\n"
- + " code: '327',\n"
- + " id: 389,\n"
- + " name: 'Paga'\n"
- + " }, {\n"
- + " code: '000026',\n"
- + " id: 395,\n"
- + " name: 'Taj Bank Limited'\n"
- + " }, {\n"
- + " code: '100022',\n"
- + " id: 596,\n"
- + " name: 'GoMoney'\n"
- + " }, {\n"
- + " code: '090180',\n"
- + " id: 597,\n"
- + " name: 'AMJU Unique Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090393',\n"
- + " id: 638,\n"
- + " name: 'BRIDGEWAY MICROFINANCE BANK'\n"
- + " }, {\n"
- + " code: '090328',\n"
- + " id: 639,\n"
- + " name: 'Eyowo MFB'\n"
- + " }, {\n"
- + " code: '090281',\n"
- + " id: 640,\n"
- + " name: 'Mint-Finex MICROFINANCE BANK'\n"
- + " }, {\n"
- + " code: '070006',\n"
- + " id: 659,\n"
- + " name: 'Covenant Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090110',\n"
- + " id: 660,\n"
- + " name: 'VFD Micro Finance Bank'\n"
- + " }, {\n"
- + " code: '090317',\n"
- + " id: 661,\n"
- + " name: 'PatrickGold Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090325',\n"
- + " id: 728,\n"
- + " name: 'Sparkle'\n"
- + " }, {\n"
- + " code: '305',\n"
- + " id: 784,\n"
- + " name: 'Paycom'\n"
- + " }, {\n"
- + " code: '070001',\n"
- + " id: 811,\n"
- + " name: 'NPF MicroFinance Bank'\n"
- + " }, {\n"
- + " code: '110001',\n"
- + " id: 812,\n"
- + " name: 'PayAttitude Online'\n"
- + " }, {\n"
- + " code: '100027',\n"
- + " id: 813,\n"
- + " name: 'Intellifin'\n"
- + " }, {\n"
- + " code: '100032',\n"
- + " id: 814,\n"
- + " name: 'Contec Global Infotech Limited (NowNow)'\n"
- + " }, {\n"
- + " code: '100031',\n"
- + " id: 815,\n"
- + " name: 'FCMB Easy Account'\n"
- + " }, {\n"
- + " code: '100030',\n"
- + " id: 816,\n"
- + " name: 'EcoMobile'\n"
- + " }, {\n"
- + " code: '100029',\n"
- + " id: 817,\n"
- + " name: 'Innovectives Kesh'\n"
- + " }, {\n"
- + " code: '100026',\n"
- + " id: 818,\n"
- + " name: 'One Finance'\n"
- + " }, {\n"
- + " code: '100025',\n"
- + " id: 819,\n"
- + " name: 'Zinternet Nigera Limited'\n"
- + " }, {\n"
- + " code: '100023',\n"
- + " id: 820,\n"
- + " name: 'TagPay'\n"
- + " }, {\n"
- + " code: '100021',\n"
- + " id: 821,\n"
- + " name: 'Eartholeum'\n"
- + " }, {\n"
- + " code: '100020',\n"
- + " id: 822,\n"
- + " name: 'MoneyBox'\n"
- + " }, {\n"
- + " code: '100019',\n"
- + " id: 824,\n"
- + " name: 'Fidelity Mobile'\n"
- + " }, {\n"
- + " code: '000019',\n"
- + " id: 825,\n"
- + " name: 'Enterprise Bank'\n"
- + " }, {\n"
- + " code: '060001',\n"
- + " id: 826,\n"
- + " name: 'Coronation Merchant Bank'\n"
- + " }, {\n"
- + " code: '060002',\n"
- + " id: 827,\n"
- + " name: 'FBNQUEST Merchant Bank'\n"
- + " }, {\n"
- + " code: '060003',\n"
- + " id: 828,\n"
- + " name: 'Nova Merchant Bank'\n"
- + " }, {\n"
- + " code: '070007',\n"
- + " id: 829,\n"
- + " name: 'Omoluabi savings and loans'\n"
- + " }, {\n"
- + " code: '090001',\n"
- + " id: 830,\n"
- + " name: 'ASOSavings & Loans'\n"
- + " }, {\n"
- + " code: '090005',\n"
- + " id: 831,\n"
- + " name: 'Trustbond Mortgage Bank'\n"
- + " }, {\n"
- + " code: '090006',\n"
- + " id: 832,\n"
- + " name: 'SafeTrust '\n"
- + " }, {\n"
- + " code: '090107',\n"
- + " id: 833,\n"
- + " name: 'FBN Mortgages Limited'\n"
- + " }, {\n"
- + " code: '100024',\n"
- + " id: 834,\n"
- + " name: 'Imperial Homes Mortgage Bank'\n"
- + " }, {\n"
- + " code: '100028',\n"
- + " id: 835,\n"
- + " name: 'AG Mortgage Bank'\n"
- + " }, {\n"
- + " code: '070009',\n"
- + " id: 836,\n"
- + " name: 'Gateway Mortgage Bank'\n"
- + " }, {\n"
- + " code: '070010',\n"
- + " id: 837,\n"
- + " name: 'Abbey Mortgage Bank'\n"
- + " }, {\n"
- + " code: '070011',\n"
- + " id: 838,\n"
- + " name: 'Refuge Mortgage Bank'\n"
- + " }, {\n"
- + " code: '070012',\n"
- + " id: 839,\n"
- + " name: 'Lagos Building Investment Company'\n"
- + " }, {\n"
- + " code: '070013',\n"
- + " id: 840,\n"
- + " name: 'Platinum Mortgage Bank'\n"
- + " }, {\n"
- + " code: '070014',\n"
- + " id: 841,\n"
- + " name: 'First Generation Mortgage Bank'\n"
- + " }, {\n"
- + " code: '070015',\n"
- + " id: 842,\n"
- + " name: 'Brent Mortgage Bank'\n"
- + " }, {\n"
- + " code: '070016',\n"
- + " id: 843,\n"
- + " name: 'Infinity Trust Mortgage Bank'\n"
- + " }, {\n"
- + " code: '090003',\n"
- + " id: 844,\n"
- + " name: 'Jubilee-Life Mortgage Bank'\n"
- + " }, {\n"
- + " code: '070017',\n"
- + " id: 845,\n"
- + " name: 'Haggai Mortgage Bank Limited'\n"
- + " }, {\n"
- + " code: '090108',\n"
- + " id: 846,\n"
- + " name: 'New Prudential Bank'\n"
- + " }, {\n"
- + " code: '070002',\n"
- + " id: 847,\n"
- + " name: 'Fortis Microfinance Bank'\n"
- + " }, {\n"
- + " code: '070008',\n"
- + " id: 848,\n"
- + " name: 'Page Financials'\n"
- + " }, {\n"
- + " code: '090004',\n"
- + " id: 849,\n"
- + " name: 'Parralex Microfinance bank'\n"
- + " }, {\n"
- + " code: '090097',\n"
- + " id: 850,\n"
- + " name: 'Ekondo MFB'\n"
- + " }, {\n"
- + " code: '090112',\n"
- + " id: 851,\n"
- + " name: 'Seed Capital Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090114',\n"
- + " id: 852,\n"
- + " name: 'Empire trust MFB'\n"
- + " }, {\n"
- + " code: '090116',\n"
- + " id: 853,\n"
- + " name: 'AMML MFB'\n"
- + " }, {\n"
- + " code: '090117',\n"
- + " id: 854,\n"
- + " name: 'Boctrust Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090118',\n"
- + " id: 855,\n"
- + " name: 'IBILE Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090119',\n"
- + " id: 856,\n"
- + " name: 'Ohafia Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090120',\n"
- + " id: 857,\n"
- + " name: 'Wetland Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090121',\n"
- + " id: 858,\n"
- + " name: 'Hasal Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090122',\n"
- + " id: 859,\n"
- + " name: 'Gowans Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090123',\n"
- + " id: 860,\n"
- + " name: 'Verite Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090124',\n"
- + " id: 861,\n"
- + " name: 'Xslnce Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090125',\n"
- + " id: 862,\n"
- + " name: 'Regent Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090126',\n"
- + " id: 863,\n"
- + " name: 'Fidfund Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090127',\n"
- + " id: 864,\n"
- + " name: 'BC Kash Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090128',\n"
- + " id: 865,\n"
- + " name: 'Ndiorah Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090129',\n"
- + " id: 866,\n"
- + " name: 'Money Trust Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090130',\n"
- + " id: 867,\n"
- + " name: 'Consumer Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090131',\n"
- + " id: 868,\n"
- + " name: 'Allworkers Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090132',\n"
- + " id: 869,\n"
- + " name: 'Richway Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090133',\n"
- + " id: 870,\n"
- + " name: ' AL-Barakah Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090134',\n"
- + " id: 871,\n"
- + " name: 'Accion Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090135',\n"
- + " id: 872,\n"
- + " name: 'Personal Trust Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090136',\n"
- + " id: 873,\n"
- + " name: 'Baobab Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090137',\n"
- + " id: 874,\n"
- + " name: 'PecanTrust Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090138',\n"
- + " id: 875,\n"
- + " name: 'Royal Exchange Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090139',\n"
- + " id: 876,\n"
- + " name: 'Visa Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090140',\n"
- + " id: 877,\n"
- + " name: 'Sagamu Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090141',\n"
- + " id: 878,\n"
- + " name: 'Chikum Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090142',\n"
- + " id: 879,\n"
- + " name: 'Yes Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090143',\n"
- + " id: 880,\n"
- + " name: 'Apeks Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090144',\n"
- + " id: 881,\n"
- + " name: 'CIT Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090145',\n"
- + " id: 882,\n"
- + " name: 'Fullrange Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090146',\n"
- + " id: 883,\n"
- + " name: 'Trident Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090147',\n"
- + " id: 884,\n"
- + " name: 'Hackman Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090148',\n"
- + " id: 885,\n"
- + " name: 'Bowen Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090149',\n"
- + " id: 886,\n"
- + " name: 'IRL Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090150',\n"
- + " id: 887,\n"
- + " name: 'Virtue Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090151',\n"
- + " id: 888,\n"
- + " name: 'Mutual Trust Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090152',\n"
- + " id: 889,\n"
- + " name: 'Nagarta Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090153',\n"
- + " id: 890,\n"
- + " name: 'FFS Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090154',\n"
- + " id: 891,\n"
- + " name: 'CEMCS Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090155',\n"
- + " id: 892,\n"
- + " name: 'La Fayette Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090156',\n"
- + " id: 893,\n"
- + " name: 'e-Barcs Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090157',\n"
- + " id: 894,\n"
- + " name: 'Infinity Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090158',\n"
- + " id: 895,\n"
- + " name: 'Futo Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090159',\n"
- + " id: 896,\n"
- + " name: 'Credit Afrique Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090160',\n"
- + " id: 897,\n"
- + " name: 'Addosser Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090161',\n"
- + " id: 898,\n"
- + " name: 'Okpoga Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090162',\n"
- + " id: 899,\n"
- + " name: 'Stanford Microfinance Bak'\n"
- + " }, {\n"
- + " code: '090164',\n"
- + " id: 900,\n"
- + " name: 'First Royal Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090165',\n"
- + " id: 901,\n"
- + " name: 'Petra Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090166',\n"
- + " id: 902,\n"
- + " name: 'Eso-E Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090167',\n"
- + " id: 903,\n"
- + " name: 'Daylight Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090168',\n"
- + " id: 904,\n"
- + " name: 'Gashua Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090169',\n"
- + " id: 905,\n"
- + " name: 'Alpha Kapital Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090171',\n"
- + " id: 906,\n"
- + " name: 'Mainstreet Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090172',\n"
- + " id: 907,\n"
- + " name: 'Astrapolaris Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090173',\n"
- + " id: 908,\n"
- + " name: 'Reliance Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090174',\n"
- + " id: 909,\n"
- + " name: 'Malachy Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090175',\n"
- + " id: 910,\n"
- + " name: 'HighStreet Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090176',\n"
- + " id: 911,\n"
- + " name: 'Bosak Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090177',\n"
- + " id: 912,\n"
- + " name: 'Lapo Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090178',\n"
- + " id: 913,\n"
- + " name: 'GreenBank Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090179',\n"
- + " id: 914,\n"
- + " name: 'FAST Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090188',\n"
- + " id: 915,\n"
- + " name: 'Baines Credit Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090189',\n"
- + " id: 916,\n"
- + " name: 'Esan Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090190',\n"
- + " id: 917,\n"
- + " name: 'Mutual Benefits Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090191',\n"
- + " id: 918,\n"
- + " name: 'KCMB Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090192',\n"
- + " id: 919,\n"
- + " name: 'Midland Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090193',\n"
- + " id: 920,\n"
- + " name: 'Unical Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090194',\n"
- + " id: 921,\n"
- + " name: 'NIRSAL Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090195',\n"
- + " id: 922,\n"
- + " name: 'Grooming Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090196',\n"
- + " id: 923,\n"
- + " name: 'Pennywise Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090197',\n"
- + " id: 924,\n"
- + " name: 'ABU Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090198',\n"
- + " id: 925,\n"
- + " name: 'RenMoney Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090205',\n"
- + " id: 926,\n"
- + " name: 'New Dawn Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090251',\n"
- + " id: 927,\n"
- + " name: 'UNN MFB'\n"
- + " }, {\n"
- + " code: '090258',\n"
- + " id: 928,\n"
- + " name: 'Imo State Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090259',\n"
- + " id: 929,\n"
- + " name: 'Alekun Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090260',\n"
- + " id: 930,\n"
- + " name: 'Above Only Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090261',\n"
- + " id: 931,\n"
- + " name: 'Quickfund Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090262',\n"
- + " id: 932,\n"
- + " name: 'Stellas Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090263',\n"
- + " id: 933,\n"
- + " name: 'Navy Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090264',\n"
- + " id: 934,\n"
- + " name: 'Auchi Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090265',\n"
- + " id: 935,\n"
- + " name: 'Lovonus Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090266',\n"
- + " id: 936,\n"
- + " name: 'Uniben Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090268',\n"
- + " id: 937,\n"
- + " name: 'Adeyemi College Staff Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090269',\n"
- + " id: 938,\n"
- + " name: 'Greenville Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090270',\n"
- + " id: 939,\n"
- + " name: 'AB Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090271',\n"
- + " id: 940,\n"
- + " name: 'Lavender Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090272',\n"
- + " id: 941,\n"
- + " name: 'Olabisi Onabanjo University Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090273',\n"
- + " id: 942,\n"
- + " name: 'Emeralds Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090276',\n"
- + " id: 943,\n"
- + " name: 'Trustfund Microfinance Bank'\n"
- + " }, {\n"
- + " code: '090277',\n"
- + " id: 944,\n"
- + " name: 'Al-Hayat Microfinance Bank'\n"
- + " }, {\n"
- + " code: '100001',\n"
- + " id: 945,\n"
- + " name: 'FET'\n"
- + " }, {\n"
- + " code: '100003',\n"
- + " id: 946,\n"
- + " name: 'Parkway-ReadyCash'\n"
- + " }, {\n"
- + " code: '100005',\n"
- + " id: 947,\n"
- + " name: 'Cellulant'\n"
- + " }, {\n"
- + " code: '100006',\n"
- + " id: 948,\n"
- + " name: 'eTranzact'\n"
- + " }, {\n"
- + " code: '100007',\n"
- + " id: 949,\n"
- + " name: 'Stanbic IBTC @ease wallet'\n"
- + " }, {\n"
- + " code: '100008',\n"
- + " id: 950,\n"
- + " name: 'Ecobank Xpress Account'\n"
- + " }, {\n"
- + " code: '100009',\n"
- + " id: 951,\n"
- + " name: 'GTMobile'\n"
- + " }, {\n"
- + " code: '100010',\n"
- + " id: 952,\n"
- + " name: 'TeasyMobile'\n"
- + " }, {\n"
- + " code: '100011',\n"
- + " id: 953,\n"
- + " name: 'Mkudi'\n"
- + " }, {\n"
- + " code: '100012',\n"
- + " id: 954,\n"
- + " name: 'VTNetworks'\n"
- + " }, {\n"
- + " code: '100013',\n"
- + " id: 955,\n"
- + " name: 'AccessMobile'\n"
- + " }, {\n"
- + " code: '100014',\n"
- + " id: 956,\n"
- + " name: 'FBNMobile'\n"
- + " }, {\n"
- + " code: '100015',\n"
- + " id: 957,\n"
- + " name: 'Kegow'\n"
- + " }, {\n"
- + " code: '100016',\n"
- + " id: 958,\n"
- + " name: 'FortisMobile'\n"
- + " }, {\n"
- + " code: '100017',\n"
- + " id: 959,\n"
- + " name: 'Hedonmark'\n"
- + " }, {\n"
- + " code: '100018',\n"
- + " id: 960,\n"
- + " name: 'ZenithMobile'\n"
- + " }, {\n"
- + " code: '110002',\n"
- + " id: 961,\n"
- + " name: 'Flutterwave Technology Solutions Limited'\n"
- + " }, {\n"
- + " code: '999999',\n"
- + " id: 962,\n"
- + " name: 'NIP Virtual Bank'\n"
- + " }\n"
- + "]";
- private Long timestamp;
- private Long endtimestamp;
- private ArrayList<EngaugeOffersItem> offerslist =
- offerslist = new ArrayList<EngaugeOffersItem>();
- SharedPrefsXtreme sharedPrefsXtreme;
- public String token;
- public String getBankList() {
- return bankList;
- }
- public String getToken() {
- return sharedPrefsXtreme.getData("token");
- }
- public static String getTokenStatic() {
- return sharedPrefsXtreme_static.getData("token");
- }
- public Boolean appLaunched = false;
- public Boolean goToAdvertsLazyRedirect = false;
- public Boolean goToPhotosLazyRedirect = false;
- public Boolean goToReviewsLazyRedirect = false;
- public Boolean goToOffersLazyRedirect = false;
- public Boolean goToContactsLazyRedirect = false;
- public Boolean goToAd = false;
- public Boolean goToPhoto = false;
- public Double totalrating = 0.0;
- public Double totalreviewers = 0.0;
- public Double totalamountlastweek = 0.0;
- public Double totalamountlastBeforeweek = 0.0;
- public Boolean reviews = false;
- public Boolean isFromFrist = false;
- public void setIsPromoLaunched(String isPromoLaunched) {
- sharedPrefsXtreme.saveData("ispromolaunched", isPromoLaunched);
- }
- public String getIsPromoLaunched() {
- return sharedPrefsXtreme.getData("ispromolaunched");
- }
- public Boolean getIsFromFrist() {
- return Boolean.parseBoolean(sharedPrefsXtreme.getData("fromfirst"));
- }
- public void setIsFromFrist(Boolean isFromFrist) {
- sharedPrefsXtreme.saveData("fromfirst", String.valueOf(isFromFrist));
- this.isFromFrist = isFromFrist;
- }
- public Boolean getIsSeenUssdTutorial() {
- return Boolean.parseBoolean(
- sharedPrefsXtreme.getData("isSeenUssdTutorial").matches("")
- ? "false"
- : sharedPrefsXtreme.getData("isSeenUssdTutorial"));
- }
- public void setIsSeenUssdTutorial() {
- sharedPrefsXtreme.saveData("isSeenUssdTutorial", "true");
- }
- public Boolean getIsPastIntro() {
- return Boolean.parseBoolean(sharedPrefsXtreme.getData("isPastIntro"));
- }
- public void setIsPastIntro() {
- sharedPrefsXtreme.saveData("isPastIntro", "true");
- }
- public String getBankDetailsUpdated() {
- return sharedPrefsXtreme.getData("bankdetailsupdated");
- }
- public void setBankDetailsUpdated(String truth) {
- sharedPrefsXtreme.saveData("bankdetailsupdated", truth);
- }
- public String getCompletedAdCreation() {
- return sharedPrefsXtreme.getData("completedadcreation");
- }
- public void setCompletedAdCreation(String truth) {
- sharedPrefsXtreme.saveData("completedadcreation", truth);
- }
- public void setTotalamountlastweek(Double totalamountlastBeforeweek) {
- totalamountlastBeforeweek = totalamountlastBeforeweek + totalamountlastBeforeweek;
- sharedPrefsXtreme.saveData("totalreviewers", String.valueOf(totalreviewers));
- }
- public void setCreateAdImage(String createAdImage) {
- sharedPrefsXtreme.saveData("createadimg", createAdImage);
- }
- public void setIsFromNotifReview(String isFromNotifBool) {
- sharedPrefsXtreme.saveData("isfromnotifreview", isFromNotifBool);
- }
- public Boolean getIsFromNotifReview() {
- return !sharedPrefsXtreme.getData("isfromnotifreview").equals("")
- && Boolean.parseBoolean(sharedPrefsXtreme.getData("isfromnotifreview"));
- }
- public void setSocialId(String socialId) {
- sharedPrefsXtreme.saveData("socialid", socialId);
- }
- public String getSocialId() {
- return !sharedPrefsXtreme.getData("socialid").equals("null")?sharedPrefsXtreme.getData("socialid"):"";
- }
- public void setRadDistance(String distance) {
- sharedPrefsXtreme.saveData("distance", distance);
- }
- public String getRadDistance() {
- return sharedPrefsXtreme.getData("distance").equals("")
- ? "10 Km"
- : sharedPrefsXtreme.getData("distance") + "";
- }
- public String getAdditionalInfo() {
- return sharedPrefsXtreme.getData("additionalinfo");
- }
- public String convertFromScientificNotation(double number) {
- try {
- // Check if in scientific notation
- if (String.valueOf(number).toLowerCase().contains("e")) {
- // System.out.println("The scientific notation number'"
- // + number
- // + "' detected, it will be converted to normal representation with
- // 25 maximum fraction digits.");
- NumberFormat formatter = new DecimalFormat();
- formatter.setMaximumFractionDigits(25);
- return formatter.format(number);
- } else {
- NumberFormat formatter = new DecimalFormat();
- formatter.setMaximumFractionDigits(25);
- return formatter.format(number);
- }
- }
- catch (RuntimeException e)
- {
- Log.e("runtime", "runtimeException "+e.getMessage());
- return "0";
- }
- // return String.valueOf(number);
- }
- public void showIntro(View view, String title, String content, Context context) {
- String key = title.toLowerCase().replace(" ", "");
- if (!getIntroForViewShown(key).equals("true")) {
- new GuideView.Builder(context)
- .setTitle(title)
- .setContentText(content)
- .setTargetView(view)
- .setGravity(GuideView.Gravity.auto) // optional
- .setDismissType(
- GuideView.DismissType
- .anywhere) // optional - default DismissType.targetView
- .setContentTextSize(12) // optional
- .setTitleTextSize(14) // optional
- .build()
- .show();
- setIntroForViewShown(key);
- }
- }
- public void setIntroForViewShown(String bool) {
- sharedPrefsXtreme.saveData(bool, "true");
- }
- public String getIntroForViewShown(String bool) {
- return sharedPrefsXtreme.getData(bool);
- }
- public void setAdditionalInfo(String additionalInfo) {
- sharedPrefsXtreme.saveData("additionalinfo", additionalInfo);
- }
- public String getIndustriesBackend() {
- return sharedPrefsXtreme.getData("industries_bac").equals("")
- ? industriesBackendFallback
- : sharedPrefsXtreme.getData("industries_bac");
- }
- public void setIndustriesBasckend(String industriesBasckend) {
- sharedPrefsXtreme.saveData("industries_bac", industriesBasckend);
- }
- public String getReferral() {
- return sharedPrefsXtreme.getData("referral");
- }
- public void setReferral(String referral) {
- sharedPrefsXtreme.saveData("referral", referral);
- }
- public String getProductsandServices() {
- return sharedPrefsXtreme.getData("prodsandservices");
- }
- public void setProductsAndServices(String productsAndServices) {
- sharedPrefsXtreme.saveData("prodsandservices", productsAndServices);
- }
- public String getBusinessHrs() {
- return sharedPrefsXtreme.getData("businessHrs");
- }
- public void setBusinessHrs(String businessHrs) {
- sharedPrefsXtreme.saveData("businessHrs", businessHrs);
- }
- public void setMaxAge(String maxAge) {
- sharedPrefsXtreme.saveData("maxAge", maxAge);
- }
- public String getGender() {
- return sharedPrefsXtreme.getData("gender").equals("")
- ? "All"
- : sharedPrefsXtreme.getData("gender");
- }
- public void setGender(String gender) {
- sharedPrefsXtreme.saveData("gender", gender);
- }
- public String getLocation() {
- return sharedPrefsXtreme.getData("loc").equals("")
- ? "Westlands, Nairobi"
- : sharedPrefsXtreme.getData("loc") + ", Nigeria";
- }
- public String getLocationPost() {
- return sharedPrefsXtreme.getData("loc").equals("")
- ? "Lagos"
- : sharedPrefsXtreme.getData("loc");
- }
- public String titleCasetise(String input) {
- try {
- if(input!=null&&!input.equals(""))
- {
- String[] words = input.toLowerCase().split("\\s+");
- if (words.length == 1) {
- // Capitalize the first letter of the word
- return Character.toUpperCase(words[0].charAt(0)) + words[0].substring(1);
- } else {
- // Capitalize the first letter of each word
- StringBuilder result = new StringBuilder();
- for (String word : words) {
- result.append(Character.toUpperCase(word.charAt(0))).append(word.substring(1)).append(" ");
- }
- return result.toString().trim();
- }
- }
- else {
- return "";
- }
- }
- catch (StringIndexOutOfBoundsException e)
- {
- Log.e("emptyName", "emptyName "+e.getMessage());
- return "";
- }
- }
- public void setLocation(String location) {
- sharedPrefsXtreme.saveData("loc", location);
- }
- public String getMinAge() {
- return sharedPrefsXtreme.getData("minAge").equals("")
- ? "18"
- : sharedPrefsXtreme.getData("minAge");
- }
- public void setMinAge(String minAge) {
- sharedPrefsXtreme.saveData("minAge", minAge);
- }
- public String getStartTimeStamp() {
- return String.valueOf(timestamp);
- }
- public void setStoreNumber_(String storeNumber_) {
- sharedPrefsXtreme.saveData("store_number", storeNumber_);
- }
- public String getStore_number() {
- return sharedPrefsXtreme.getData("store_number");
- }
- public void setTillNumber_(String tillNumber_) {
- sharedPrefsXtreme.saveData("till_number", tillNumber_);
- }
- public String getTill_number() {
- return sharedPrefsXtreme.getData("till_number");
- }
- public void setSubscriptionStatus(String substatus) {
- sharedPrefsXtreme.saveData("substatus", substatus);
- }
- public String getSubscriptionPackageName() {
- return sharedPrefsXtreme.getData("packagename");
- }
- public void setTotalUsers(String totalUsers) {
- sharedPrefsXtreme.saveData("totalUsers", totalUsers);
- }
- public String getTotalUsers() {
- return sharedPrefsXtreme.getData("totalUsers");
- }
- public void setUserEngagementDuration(String userEngagementDuration) {
- sharedPrefsXtreme.saveData("userEngagementDuration", userEngagementDuration);
- }
- public String convertFromScientificNotationString(String numberStr) {
- Double number = Double.parseDouble(numberStr);
- // Check if in scientific notation
- if (String.valueOf(number).toLowerCase().contains("e")) {
- // System.out.println("The scientific notation number'"
- // + number
- // + "' detected, it will be converted to normal representation with
- // 25 maximum fraction digits.");
- NumberFormat formatter = new DecimalFormat();
- formatter.setMaximumFractionDigits(25);
- return formatter.format(number);
- } else {
- NumberFormat formatter = new DecimalFormat();
- formatter.setMaximumFractionDigits(25);
- return formatter.format(number);
- }
- // return String.valueOf(number);
- }
- public String getStoreNumber() {
- return sharedPrefsXtreme.getData("store");
- }
- public void setStoreNumber(String storeNumber) {
- sharedPrefsXtreme.saveData("store", storeNumber);
- }
- public void setNewUsers(String newUsers) {
- sharedPrefsXtreme.saveData("newUsers", newUsers);
- }
- public String getNewUsers() {
- return sharedPrefsXtreme.getData("newUsers");
- }
- public String getStartTimeStampsServer() {
- return sharedPrefsXtreme.getData("starttimestampserver");
- }
- public void setPageViews(String pageViews) {
- sharedPrefsXtreme.saveData("pageViews", pageViews);
- }
- public String getPageViews() {
- return sharedPrefsXtreme.getData("pageViews");
- }
- public void setStartTimeStampServer(String timeStamp) {
- sharedPrefsXtreme.saveData("starttimestampserver", timeStamp);
- }
- public String returnToCompleteProfile() {
- String tocompleteprofile =
- sharedPrefsXtreme.getData("tocompleteprofile").equals(null)
- ? null
- : sharedPrefsXtreme.getData("tocompleteprofile");
- String isLoggedin =
- sharedPrefsXtreme.getData("isLoggedin").equals(null)
- ? null
- : sharedPrefsXtreme.getData("isLoggedin");
- String returnedStr = null;
- if (tocompleteprofile != null
- && tocompleteprofile.equals("truth")
- && isLoggedin != null
- && isLoggedin.equals("truth")) {
- returnedStr = "toCompleteProfile";
- } else if (tocompleteprofile != null
- && tocompleteprofile.equals("truthbutlogged")
- && isLoggedin != null
- && isLoggedin.equals("truth")) {
- returnedStr = "truthbutlogged";
- } else if (tocompleteprofile != null
- && tocompleteprofile.equals("false")
- && isLoggedin != null
- && isLoggedin.equals("truth")) {
- returnedStr = "truthbutloggedfalse";
- }
- return returnedStr;
- }
- public Boolean returnIsIntroScreenShown() {
- return sharedPrefsXtreme.getData("isSlideShow") != null
- && Boolean.parseBoolean(sharedPrefsXtreme.getData("isSlideShow"));
- }
- public void setIsIntroShown(Boolean isSlideShow) {
- sharedPrefsXtreme.saveData("isSlideShow", String.valueOf(isSlideShow));
- }
- public String returnLogStateShared() {
- return sharedPrefsXtreme.getData("isLoggedin") == null
- ? null
- : sharedPrefsXtreme.getData("isLoggedin");
- }
- public String returnLoginState() {
- String tocompleteprofile =
- sharedPrefsXtreme.getData("tocompleteprofile").equals(null)
- ? null
- : sharedPrefsXtreme.getData("tocompleteprofile");
- String isLoggedin =
- sharedPrefsXtreme.getData("isLoggedin").equals(null)
- ? null
- : sharedPrefsXtreme.getData("isLoggedin");
- String returnedStr = null;
- if (isLoggedin != null && isLoggedin.equals("verifprocess")) {
- returnedStr = "verifprocess";
- } else if (isLoggedin != null && isLoggedin.equals("verifprocesswhatsapp")) {
- returnedStr = "verifprocesswhatsapp";
- } else if (tocompleteprofile != null
- && tocompleteprofile.equals("truth")
- && isLoggedin != null
- && isLoggedin.equals("truth")) {
- returnedStr = "toCompleteProfile";
- } else if (tocompleteprofile != null
- && tocompleteprofile.equals("truthbutlogged")
- && isLoggedin != null
- && isLoggedin.equals("truth")) {
- returnedStr = "truthbutlogged";
- } else if (tocompleteprofile != null
- && tocompleteprofile.equals("false")
- && isLoggedin != null
- && isLoggedin.equals("truth")) {
- returnedStr = "truthbutloggedfalse";
- }
- return returnedStr;
- }
- public String getEndTimeStampsServer() {
- return sharedPrefsXtreme.getData("endtimestampserver");
- }
- public void setEndTimeStampServer(String timeStamp) {
- sharedPrefsXtreme.saveData("endtimestampserver", timeStamp);
- }
- public String getCreditFlutterWaveFailure() {
- return sharedPrefsXtreme.getData("flutterfailure");
- }
- public void setCreditFlutterWavePaymentFailed(String flutterfailure) {
- sharedPrefsXtreme.saveData("flutterfailure", flutterfailure);
- }
- public String getTxRef() {
- return sharedPrefsXtreme.getData("txref");
- }
- public void setTxRef(String txRef) {
- sharedPrefsXtreme.saveData("txref", txRef);
- }
- public String getFlwRef() {
- return sharedPrefsXtreme.getData("flwref");
- }
- public void setFlwRef(String flwRef) {
- sharedPrefsXtreme.saveData("flwref", flwRef);
- }
- public String getTransactionIdFlutterWave() {
- return sharedPrefsXtreme.getData("transactionIdFlutterWavef");
- }
- public static String getPhoneNumberLocal() {
- return sharedPrefsXtreme_static.getData("phonenum");
- }
- public void setTransactionIdFlutterWave(String transactionIdFlutterWavef) {
- sharedPrefsXtreme.saveData("transactionIdFlutterWavef", transactionIdFlutterWavef);
- }
- public String getStartTimeStamps() {
- return sharedPrefsXtreme.getData("starttimestamp");
- }
- public void setStartTimeStamp(String timeStamp) {
- sharedPrefsXtreme.saveData("starttimestamp", timeStamp);
- }
- public String getReadableTimeEnd() {
- return sharedPrefsXtreme.getData("readabletimeend");
- }
- public void setReadableTimeEnd(String readableTimeEnd) {
- sharedPrefsXtreme.saveData("readabletimeend", readableTimeEnd);
- }
- public String getPromoCodeSet() {
- return sharedPrefsXtreme.getData("promocode");
- }
- public void setPromoCodeSet(String readableTime) {
- sharedPrefsXtreme.saveData("promocode", readableTime);
- }
- public String getReadableTimeStart() {
- return sharedPrefsXtreme.getData("readabletime");
- }
- public void setReadableTimeStart(String readableTime) {
- sharedPrefsXtreme.saveData("readabletime", readableTime);
- }
- public String getBankAcName() {
- return sharedPrefsXtreme.getData("bankacnumber");
- }
- public String getBankAcNumber() {
- return sharedPrefsXtreme.getData("bankacnumber");
- }
- public String getBankNameID() {
- return sharedPrefsXtreme.getData("bankname");
- }
- public String getSavedBankName() {
- return sharedPrefsXtreme.getData("banknamereal");
- }
- public String getEndTimeStamp() {
- return sharedPrefsXtreme.getData("endtimestamp");
- }
- public void setEndtimestamp(String endtimestamp) {
- sharedPrefsXtreme.saveData("endtimestamp", endtimestamp);
- }
- public void setEmailCollab(String emailCollab) {
- sharedPrefsXtreme.saveData("emailcollab", emailCollab);
- }
- public static byte[] getBytes(Context ctx) {
- SharedPreferences prefs = ctx.getSharedPreferences("imagebytecover", Context.MODE_PRIVATE);
- String str = prefs.getString("imagestring", null);
- if (str != null) {
- return str.getBytes(Charsets.ISO_8859_1);
- }
- return null;
- }
- public static void setBytes(Context ctx, byte[] bytes) {
- SharedPreferences preferences = ctx.getSharedPreferences("imagebytecover", 0);
- preferences.edit().remove("imagestring").commit();
- SharedPreferences prefs = ctx.getSharedPreferences("imagebytecover", Context.MODE_PRIVATE);
- SharedPreferences.Editor e = prefs.edit();
- e.putString("imagestring", new String(bytes, Charsets.ISO_8859_1));
- e.commit();
- }
- public static byte[] getBytesProfile(Context ctx) {
- SharedPreferences prefs =
- ctx.getSharedPreferences("imagebyteprofile", Context.MODE_PRIVATE);
- String str = prefs.getString("imagestringprofile", null);
- if (str != null) {
- return str.getBytes(Charsets.ISO_8859_1);
- }
- return null;
- }
- public void hideKeyboard(View view) {}
- public static void setBytesProfile(Context ctx, byte[] bytes) {
- SharedPreferences preferences = ctx.getSharedPreferences("imagebyteprofile", 0);
- preferences.edit().remove("imagestringprofile").commit();
- SharedPreferences prefs =
- ctx.getSharedPreferences("imagebyteprofile", Context.MODE_PRIVATE);
- SharedPreferences.Editor e = prefs.edit();
- e.putString("imagestringprofile", new String(bytes, Charsets.ISO_8859_1));
- e.commit();
- }
- public String mtnValidatorPrimitive(String phonenum, String errorMessage) {
- if (phonenum.startsWith("+2547025")
- || phonenum.startsWith("+2547026")
- || phonenum.startsWith("+254916")
- || phonenum.startsWith("+254703")
- || phonenum.startsWith("+254704")
- || phonenum.startsWith("+254706")
- || phonenum.startsWith("+254803")
- || phonenum.startsWith("+254806")
- || phonenum.startsWith("+254810")
- || phonenum.startsWith("+254813")
- || phonenum.startsWith("+254814")
- || phonenum.startsWith("+254816")
- || phonenum.startsWith("+254903")
- || phonenum.startsWith("+254906")
- || phonenum.startsWith("+254913")) {
- return "valid";
- } else {
- return errorMessage;
- }
- }
- public String getAdDurationDays() {
- return sharedPrefsXtreme.getData("adduration").equals("")
- || sharedPrefsXtreme.getData("adduration").equals("1")
- ? "1 Day"
- : sharedPrefsXtreme.getData("adduration") + " Days";
- }
- public Integer getAdDurationDaysInt() {
- return Integer.parseInt(sharedPrefsXtreme.getData("adduration"));
- }
- public String getAdDurationDaysPost() {
- return sharedPrefsXtreme.getData("adduration").equals("")
- ? "1"
- : sharedPrefsXtreme.getData("adduration");
- }
- public String getAd_AI_Description() {
- return sharedPrefsXtreme.getData("ai_description").equals("")
- ? ""
- : sharedPrefsXtreme.getData("ai_description");
- }
- public void setGoal(String goal) {
- sharedPrefsXtreme.saveData("goal", goal);
- }
- public String getGoal() {
- return sharedPrefsXtreme.getData("goal").equals("")
- ? ""
- : sharedPrefsXtreme.getData("goal");
- }
- public void setTargetAudience(String targetAudience) {
- sharedPrefsXtreme.saveData("targetAudience", targetAudience);
- }
- public String getTargetAudience() {
- return sharedPrefsXtreme.getData("targetAudience").equals("")
- ? ""
- : sharedPrefsXtreme.getData("targetAudience");
- }
- public void setAd_AI_Description(String ai_description) {
- sharedPrefsXtreme.saveData("ai_description", ai_description);
- }
- public String getAdStartTimeStamp() {
- return sharedPrefsXtreme.getData("adstarttimestamp").equals("")
- ? String.valueOf(timestamp)
- : sharedPrefsXtreme.getData("adstarttimestamp");
- }
- public void setAdDurationDays(String adDurationDays) {
- sharedPrefsXtreme.saveData("adduration", adDurationDays);
- }
- public String getMaxAge() {
- return sharedPrefsXtreme.getData("maxAge").equals("")
- ? "65"
- : sharedPrefsXtreme.getData("maxAge");
- }
- public void setIsBackFromAds(String isBackFromAds) {
- sharedPrefsXtreme.saveData("isbackfromads", isBackFromAds);
- }
- public String getIsBackFromAds() {
- return sharedPrefsXtreme.getData("isbackfromads");
- }
- public void setLastTabAds(String lastTabads) {
- sharedPrefsXtreme.saveData("lasttabads", lastTabads);
- }
- public String getLastTabads() {
- return sharedPrefsXtreme.getData("lasttabads").equals("")
- ? "0"
- : sharedPrefsXtreme.getData("lasttab");
- }
- public void setAdDays(String addays) {
- sharedPrefsXtreme.saveData("addays", addays);
- }
- public String getAdDays() {
- return sharedPrefsXtreme.getData("addays").equals("")
- ? "30"
- : sharedPrefsXtreme.getData("addays");
- }
- public void setIsBackFromOffers(String isBackFromOffers) {
- sharedPrefsXtreme.saveData("isbackfromoffers", isBackFromOffers);
- }
- public String getIsBackFromOffers() {
- return sharedPrefsXtreme.getData("isbackfromoffers");
- }
- public void setLastTab(String lastTab) {
- sharedPrefsXtreme.saveData("lasttab", lastTab);
- }
- public String getLastTab() {
- return sharedPrefsXtreme.getData("lasttab").equals("")
- ? "0"
- : sharedPrefsXtreme.getData("lasttab");
- }
- public void setReviewsBool(Boolean reviews) {
- this.reviews = reviews;
- }
- public Boolean getReviewsBool() {
- return reviews;
- }
- public String getCreateAdImage() {
- return sharedPrefsXtreme.getData("createadimg");
- }
- public void setTotalreviewers(Double totalreviewers) {
- sharedPrefsXtreme.saveData("totalreviewers", String.valueOf(totalreviewers));
- }
- public void setTotalNotifications(Integer notificationsNum) {
- sharedPrefsXtreme.saveData("notificationsNu", String.valueOf(notificationsNum));
- }
- public void goToNotifications() {
- startActivity(new Intent(getApplicationContext(), Notification_Activity.class));
- }
- public boolean isValidContextForGlide(final Context context) {
- if (context == null) {
- return false;
- }
- if (context instanceof Activity) {
- final Activity activity = (Activity) context;
- if (activity.isDestroyed() || activity.isFinishing()) {
- return false;
- }
- }
- return true;
- }
- public boolean isPastDate(String inputDate) {
- SimpleDateFormat format = new SimpleDateFormat("EEE, d MMM yyyy");
- try {
- Date date = format.parse(inputDate);
- Date currentDate = new Date();
- return date.before(currentDate);
- } catch (ParseException e) {
- Log.e("err", "err " + e.getMessage() + " " + inputDate);
- return false;
- }
- }
- public Integer getTotalNotifications() {
- return sharedPrefsXtreme.getData("notificationsNu").equals("")
- ? 0
- : Integer.parseInt(sharedPrefsXtreme.getData("notificationsNu"));
- }
- public Integer getTotalratings() {
- try {
- return sharedPrefsXtreme.getData("totalratings").equals("")
- ? 0
- : Integer.parseInt(sharedPrefsXtreme.getData("totalratings"));
- }
- catch (NumberFormatException e)
- {
- return 0;
- }
- }
- public void setTotalRatings(String totalRatings) {
- sharedPrefsXtreme.saveData("totalratings", totalRatings);
- }
- public Double getTotalreviewers() {
- return sharedPrefsXtreme.getData("totalreviewers").equals("")
- ? 0.0
- : Double.parseDouble(sharedPrefsXtreme.getData("totalreviewers"));
- }
- public Bitmap loadBitmap(Context context, String picName) throws IOException {
- Bitmap b = null;
- FileInputStream fis = null;
- try {
- fis =
- context.openFileInput(
- Base64.encodeToString(picName.getBytes("UTF-8"), Base64.DEFAULT));
- b = BitmapFactory.decodeStream(fis);
- } catch (FileNotFoundException e) {
- Log.e(TAG, "file not found");
- } finally {
- if (fis != null) {
- fis.close();
- }
- }
- return b;
- }
- public Long getTotalreviewersInt() {
- return sharedPrefsXtreme.getData("totalreviewers").equals("")
- ? 0
- : Long.parseLong(sharedPrefsXtreme.getData("totalreviewers"));
- }
- public void setAverageRating(Double totalratingarg) {
- sharedPrefsXtreme.saveData("averagerating", String.valueOf(totalratingarg));
- }
- public Float getAverageRating() {
- DecimalFormat df = new DecimalFormat("#.#");
- return sharedPrefsXtreme.getData("averagerating").equals("")
- || sharedPrefsXtreme.getData("averagerating").equals("∞")
- ? Float.parseFloat("0")
- : Float.parseFloat(
- df.format(Double.parseDouble(sharedPrefsXtreme.getData("averagerating"))));
- }
- public void setButtonEnabled(MaterialButton button) {
- button.setBackgroundColor(getResources().getColor(R.color.yellow));
- button.setTextColor(getResources().getColor(R.color.white));
- button.setEnabled(true);
- }
- public void setButtonDisabled(MaterialButton button) {
- button.setBackgroundColor(getResources().getColor(R.color.lightblue));
- button.setEnabled(false);
- button.setTextColor(getResources().getColor(R.color.white));
- }
- public void setHasReply(String hasReplytext, String reply) {
- sharedPrefsXtreme.saveData(hasReplytext, hasReplytext);
- sharedPrefsXtreme.saveData("reply" + hasReplytext, reply);
- }
- public String getCreateAd() {
- return sharedPrefsXtreme.getData("createadcomp");
- }
- public void setCreateAd(String truth) {
- sharedPrefsXtreme.saveData("createadcomp", truth);
- }
- public String getImportedContacts() {
- return sharedPrefsXtreme.getData("importedContacts");
- }
- public void setImportedContacts(String truth) {
- sharedPrefsXtreme.saveData("importedContacts", truth);
- }
- public String getCompletedBizProf() {
- return sharedPrefsXtreme.getData("completedbizprof");
- }
- public void setCompletedBizProf(String truth) {
- sharedPrefsXtreme.saveData("completedbizprof", truth);
- }
- public void setIsSeenUpdateTime(Boolean truth) {
- sharedPrefsXtreme.saveData("timeupdated", String.valueOf(truth));
- }
- public Boolean getIsSeenAdCampaign() {
- return !sharedPrefsXtreme.getData("ad_photos").equals("")
- && Boolean.parseBoolean(sharedPrefsXtreme.getData("ad_photos"));
- }
- public Boolean getMTN_Thryve_Sim() {
- return !sharedPrefsXtreme.getData("sim_two").equals("")
- && Boolean.parseBoolean(sharedPrefsXtreme.getData("sim_two"));
- }
- public void setMTN_Thryve_Sim(Boolean truth) {
- sharedPrefsXtreme.saveData("sim_two", String.valueOf(truth));
- }
- public void setIsSeenAdCampaign(Boolean truth) {
- sharedPrefsXtreme.saveData("ad_photos", String.valueOf(truth));
- }
- public Boolean getIsSeenUpdateTime() {
- return !sharedPrefsXtreme.getData("timeupdated").equals("")
- && Boolean.parseBoolean(sharedPrefsXtreme.getData("timeupdated"));
- }
- public void setIsSeenLocationIntro(Boolean truth) {
- sharedPrefsXtreme.saveData("location_info_thryve", String.valueOf(truth));
- }
- public Boolean getIsSeenLocationIntro() {
- return !sharedPrefsXtreme.getData("location_info_thryve").equals("")
- && Boolean.parseBoolean(sharedPrefsXtreme.getData("location_info_thryve"));
- }
- public void setIsSeenIntro(Boolean truth) {
- sharedPrefsXtreme.saveData("intro_thryve", String.valueOf(truth));
- }
- public Boolean getIsSeenIntro() {
- return !sharedPrefsXtreme.getData("intro_thryve").equals("")
- && Boolean.parseBoolean(sharedPrefsXtreme.getData("intro_thryve"));
- }
- public String getReply(String oid) {
- return sharedPrefsXtreme.getData("reply" + oid);
- }
- public String getHasReplyText(String oid) {
- return sharedPrefsXtreme.getData(oid);
- }
- public String getReferal() {
- return sharedPrefsXtreme.getData("referalCode");
- }
- public void setBizNameReg() {
- sharedPrefsXtreme.saveData("businessNameReg", "");
- }
- public void setReferalLink(String referalLink) {
- sharedPrefsXtreme.saveData("referalCode", referalLink);
- }
- public void setBizDescReg() {
- sharedPrefsXtreme.saveData("businessDescriptionreg", "");
- }
- public void setEngaugeSite(String engaugeSite) {
- sharedPrefsXtreme.saveData("engaugeSite", engaugeSite);
- }
- public String getEngaugeSite() {
- return sharedPrefsXtreme.getData("engaugeSite");
- }
- public void setBizIndustryReg() {
- sharedPrefsXtreme.saveData("industryNameReg", "");
- }
- public String getBizNameReg() {
- return sharedPrefsXtreme.getData("businessNameReg");
- }
- public String getBizDescReg() {
- return sharedPrefsXtreme.getData("businessDescriptionreg");
- }
- public String getIndustryNameReg() {
- return sharedPrefsXtreme.getData("industryNameReg");
- }
- public String getFromRegist() {
- return sharedPrefsXtreme.getData("fromRegist");
- }
- public String getPlaceName() {
- return sharedPrefsXtreme.getData("placename");
- }
- public Double getMonday() {
- Double day =
- sharedPrefsXtreme.getData("monday").equals("")
- ? 2700.0
- : Double.parseDouble(sharedPrefsXtreme.getData("monday"));
- return day;
- }
- public Double getSunday() {
- Double day =
- sharedPrefsXtreme.getData("sunday").equals("")
- ? 4600.0
- : Double.parseDouble(sharedPrefsXtreme.getData("sunday"));
- return day;
- }
- public Double getTuesday() {
- Double day =
- sharedPrefsXtreme.getData("tuesday").equals("")
- ? 5400.0
- : Double.parseDouble(sharedPrefsXtreme.getData("tuesday"));
- return day;
- }
- public Double getWednesday() {
- Double day =
- sharedPrefsXtreme.getData("wednesday").equals("")
- ? 2350.0
- : Double.parseDouble(sharedPrefsXtreme.getData("wednesday"));
- return day;
- }
- public Double getThursday() {
- Double day =
- sharedPrefsXtreme.getData("thursday").equals("")
- ? 5000.0
- : Double.parseDouble(sharedPrefsXtreme.getData("thursday"));
- return day;
- }
- public Double getFriday() {
- Double day =
- sharedPrefsXtreme.getData("friday").equals("")
- ? 3530.0
- : Double.parseDouble(sharedPrefsXtreme.getData("friday"));
- return day;
- }
- public Double getSaturday() {
- Double day =
- sharedPrefsXtreme.getData("saturday").equals("")
- ? 1455.0
- : Double.parseDouble(sharedPrefsXtreme.getData("saturday"));
- return day;
- }
- public void setMonday(String monday) {
- sharedPrefsXtreme.saveData("monday", monday);
- }
- public void setTuesday(String tuesday) {
- sharedPrefsXtreme.saveData("tuesday", tuesday);
- }
- public void setWednesday(String wednesday) {
- sharedPrefsXtreme.saveData("wednesday", wednesday);
- }
- public void setInstagram(String instagram) {
- sharedPrefsXtreme.saveData("instagram", instagram);
- }
- public void setFacebook(String facebook) {
- sharedPrefsXtreme.saveData("facebook", facebook);
- }
- public void setWhatsappNumber(String whatsappNumber) {
- sharedPrefsXtreme.saveData("whatsappNumber", whatsappNumber);
- }
- public String getWhatsappNumber() {
- return sharedPrefsXtreme.getData("whatsappNumber");
- }
- public void setOthers(String others) {
- sharedPrefsXtreme.saveData("others", others);
- }
- public void setPlaceName(String placeName) {
- sharedPrefsXtreme.saveData("placename", placeName);
- }
- public void setLongitudeProfile(String longitudeProfile) {
- sharedPrefsXtreme.saveData("longitudeProfile", longitudeProfile);
- }
- public void setLatitudeProfile(String latitudeProfile) {
- sharedPrefsXtreme.saveData("latitudeProfile", latitudeProfile);
- }
- public String getInstagram() {
- return sharedPrefsXtreme.getData("instagram");
- }
- public void setChema(String schema) {
- sharedPrefsXtreme.saveData("schema", schema);
- }
- public void setWebsite(String website) {
- sharedPrefsXtreme.saveData("website", website);
- }
- public void setThursday(String thursday) {
- sharedPrefsXtreme.saveData("thursday", thursday);
- }
- public void setFriday(String friday) {
- sharedPrefsXtreme.saveData("friday", friday);
- }
- public void setSaturday(String saturday) {
- sharedPrefsXtreme.saveData("saturday", saturday);
- }
- public void setSunday(String sunday) {
- sharedPrefsXtreme.saveData("sunday", sunday);
- }
- public String getLongitudeProfile() {
- return sharedPrefsXtreme.getData("longitudeProfile");
- }
- public String getLatitudeProfile() {
- return sharedPrefsXtreme.getData("latitudeProfile");
- }
- public String getFacebook() {
- return sharedPrefsXtreme.getData("facebook");
- }
- public String getBulkCreditBalance() {
- return sharedPrefsXtreme.getData("bulkcredbalance");
- }
- public void setBulkCreditBalance(String bulkcredbalance) {
- sharedPrefsXtreme.saveData("bulkcredbalance", bulkcredbalance);
- }
- public String getAdCreditsAmount() {
- return sharedPrefsXtreme.getData("adcred");
- }
- public String getIsBlocked() {
- return sharedPrefsXtreme.getData("is_blocked");
- }
- public void setIsBlocked(String is_blocked) {
- sharedPrefsXtreme.saveData("is_blocked", is_blocked);
- }
- public void setAdCreditsAmount(String adCreditsAmount) {
- sharedPrefsXtreme.saveData("adcred", adCreditsAmount);
- }
- public String getWebsite() {
- return sharedPrefsXtreme.getData("website");
- }
- public String getOthers() {
- return sharedPrefsXtreme.getData("others");
- }
- public void setTotaltoCompare(Double totaltoCompare) {
- totalamountlastweek = totalamountlastweek + totaltoCompare;
- sharedPrefsXtreme.saveData("totaltocompare", String.valueOf(totaltoCompare));
- }
- public Double getTotalamountlastweek() {
- Double totallastweek =
- sharedPrefsXtreme.getData("totaltocompare").equals("")
- ? 12300
- : Double.parseDouble(sharedPrefsXtreme.getData("totaltocompare"));
- return totallastweek;
- }
- public void setCvvNum(String cvvNum) {
- sharedPrefsXtreme.saveData("cvvnum", cvvNum);
- }
- public String getCvvNum() {
- return sharedPrefsXtreme.getData("cvvnum");
- }
- public String getBankName() {
- return sharedPrefsXtreme.getData("bankname");
- }
- public String getAcName() {
- return sharedPrefsXtreme.getData("acname");
- }
- public String getAcNumber() {
- return sharedPrefsXtreme.getData("acnumber");
- }
- public void setGoToAd(Boolean goToAd) {
- this.goToAd = goToAd;
- }
- public Boolean getGoToPhoto() {
- return goToPhoto;
- }
- public void setGoToPhoto(Boolean goToPhoto) {
- this.goToPhoto = goToPhoto;
- }
- public Boolean getGoToAd() {
- return goToAd;
- }
- public void setGoToReviewsLazyRedirect(Boolean goToReviewsLazyRedirect) {
- this.goToReviewsLazyRedirect = goToReviewsLazyRedirect;
- }
- public void setGoToPhotosLazyRedirect(Boolean goToPhotosLazyRedirect) {
- this.goToPhotosLazyRedirect = goToPhotosLazyRedirect;
- }
- public Boolean getGoToReviewsLazyRedirect() {
- return goToReviewsLazyRedirect;
- }
- public Boolean getGoToPhotosLazyRedirect() {
- return goToPhotosLazyRedirect;
- }
- public void setGoToAdvertsLazyRedirect(Boolean goToAdvertsLazyRedirect) {
- this.goToAdvertsLazyRedirect = goToAdvertsLazyRedirect;
- }
- public void setGoToContactsLazyRedirect(Boolean goToContactsLazyRedirect) {
- this.goToContactsLazyRedirect = goToContactsLazyRedirect;
- }
- public Boolean getGoToContactsLazyRedirect() {
- return goToContactsLazyRedirect;
- }
- public void setGoToOffersLazyRedirect(Boolean goToOffersLazyRedirect) {
- this.goToOffersLazyRedirect = goToOffersLazyRedirect;
- }
- public Boolean getGoToAdvertsLazyRedirect() {
- return goToAdvertsLazyRedirect;
- }
- public Boolean getGoToOffersLazyRedirect() {
- return goToOffersLazyRedirect;
- }
- public void saveMoreCustomers(ArrayList<EngaugeActivityItem> customerList) {
- // method to load arraylist from shared prefs
- // initializing our shared prefs with name as
- // shared preferences.
- ArrayList<EngaugeActivityItem> activitylist;
- activitylist = new ArrayList<EngaugeActivityItem>();
- // creating a variable for gson.
- Gson gson = new Gson();
- // below line is to get to string present from our
- // shared prefs if not present setting it as null.
- String json = sharedPrefsXtreme.getData("customerList");
- if (json != null) {
- if (json != "") {
- // below line is to get the type of our array list.
- Type type = new TypeToken<ArrayList<EngaugeActivityItem>>() {}.getType();
- // in below line we are getting data from gson
- // and saving it to our array list
- activitylist = gson.fromJson(json, type);
- activitylist.addAll(customerList);
- String jsonnew = gson.toJson(activitylist);
- // below line is to save data in shared
- // prefs in the form of string.
- sharedPrefsXtreme.saveData("customerList", jsonnew);
- // checking below if the array list is empty or not
- if (activitylist == null) {
- // if the array list is empty
- // creating a new array list.
- activitylist = new ArrayList<>();
- }
- }
- }
- }
- public void setSavedCustomers(ArrayList<EngaugeActivityItem> savedCustomers)
- {
- this.savedCustomers=savedCustomers;
- }
- public ArrayList<EngaugeActivityItem> loadSavedCustomers() {
- // method to load arraylist from shared prefs
- // initializing our shared prefs with name as
- // shared preferences.
- ArrayList<EngaugeActivityItem> activitylist;
- activitylist = new ArrayList<EngaugeActivityItem>();
- // creating a variable for gson.
- Gson gson = new Gson();
- // below line is to get to string present from our
- // shared prefs if not present setting it as null.
- String json = sharedPrefsXtreme.getData("customerList");
- if (json != null) {
- if (json != "") {
- // below line is to get the type of our array list.
- Type type = new TypeToken<ArrayList<EngaugeActivityItem>>() {}.getType();
- // in below line we are getting data from gson
- // and saving it to our array list
- activitylist = gson.fromJson(json, type);
- // checking below if the array list is empty or not
- if (activitylist == null) {
- // if the array list is empty
- // creating a new array list.
- activitylist = new ArrayList<>();
- }
- }
- }
- return activitylist;
- }
- public void setIsSubscribed(String aTrue) {
- }
- public String getSubAmount() {
- return subAmount;
- }
- public void setSubAmount(String subAmount) {
- this.subAmount = subAmount;
- }
- public String getSubExpiry() {
- return subExpiry;
- }
- public void setSubExpiry(String subExpiry) {
- this.subExpiry = subExpiry;
- }
- private class MyTask extends AsyncTask<Void, Void, Void> {
- final ArrayList<EngaugeActivityItem>[] contacts = new ArrayList[1];
- final ArrayList<EngaugeActivityItem>[] activitylist = new ArrayList[1];
- @Override
- protected Void doInBackground(Void... voids) {
- // Perform heavy task here
- activitylist[0] = new ArrayList<EngaugeActivityItem>();
- // creating a variable for gson.
- Gson gson = new Gson();
- // below line is to get to string present from our
- // shared prefs if not present setting it as null.
- String json = sharedPrefsXtreme.getData("customerList");
- if (json != null) {
- if (!json.equals("")) {
- // below line is to get the type of our array list.
- Type type = new TypeToken<ArrayList<EngaugeActivityItem>>() {}.getType();
- // in below line we are getting data from gson
- // and saving it to our array list
- activitylist[0] = gson.fromJson(json, type);
- contacts[0] = activitylist[0];
- savedCustomers = gson.fromJson(json, type);
- setSavedCustomers(savedCustomers);
- Log.e("saved", "saved");
- // checking below if the array list is empty or not
- if (activitylist[0] == null) {
- // if the array list is empty
- // creating a new array list.
- activitylist[0] = new ArrayList<>();
- }
- }
- }
- return null;
- }
- @Override
- protected void onPostExecute(Void aVoid) {
- // Update UI here
- }
- }
- // Start the task
- public void loadSavedCustomersBackground() {
- // method to load arraylist from shared prefs
- // initializing our shared prefs with name as
- // shared preferences.
- final ArrayList<EngaugeActivityItem>[] contacts = new ArrayList[1];
- final ArrayList<EngaugeActivityItem>[] activitylist = new ArrayList[1];
- MyTask myTask = new MyTask();
- myTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
- }
- public static ArrayList<EngaugeOffersItem> sortByDate(ArrayList<EngaugeOffersItem> objects) {
- Collections.sort(
- objects, (obj1, obj2) -> obj2.getStart_date().compareTo(obj1.getStart_date()));
- return objects;
- }
- public void saveContactsNew(ArrayList<Contacts> customerList) {
- // method for saving the data in array list.
- // creating a new variable for gson.
- Gson gson = new Gson();
- // getting data from gson and storing it in a string.
- String json = gson.toJson(customerList);
- // below line is to save data in shared
- // prefs in the form of string.
- sharedPrefsXtreme.saveData("customerList", json);
- // after saving data we are displaying a toast message.
- }
- public int theWordCountIs(String s) {
- String trim = s.trim();
- if (trim.isEmpty()) return 0;
- return trim.split("\\s+").length;
- }
- public static String retrieveWordsOfnNumber(String line, int n) {
- line += " ";
- String returnedStr = "";
- Pattern pattern = Pattern.compile("\\w*\\s");
- Matcher matcher = pattern.matcher(line);
- ArrayList<String> list = new ArrayList<String>();
- int i = 0;
- while (matcher.find()) {
- if (i != n) list.add(matcher.group());
- else break;
- i++;
- }
- returnedStr = TextUtils.join("-", list);
- return returnedStr;
- }
- public String generateDomainName(String businessName) {
- String businessNameFormatted = businessName.replace("'", "");
- String generatedDomainName = "";
- if (theWordCountIs(businessName) > 1) {
- if (getCountry().equalsIgnoreCase("kenya")) {
- generatedDomainName =
- retrieveWordsOfnNumber(
- businessNameFormatted,
- theWordCountIs(businessNameFormatted))
- + "";
- } else {
- generatedDomainName =
- retrieveWordsOfnNumber(
- businessNameFormatted,
- theWordCountIs(businessNameFormatted))
- + "";
- }
- } else {
- if (getCountry().equalsIgnoreCase("kenya")) {
- generatedDomainName = businessName + "";
- } else {
- generatedDomainName = businessName + "";
- }
- }
- return generatedDomainName.toLowerCase().replace(" ", "");
- }
- public ArrayList<RecentPaymentsModel> loadSavedRecentPayments() {
- // method to load arraylist from shared prefs
- // initializing our shared prefs with name as
- // shared preferences.
- ArrayList<RecentPaymentsModel> activitylist;
- activitylist = new ArrayList<RecentPaymentsModel>();
- // creating a variable for gson.
- Gson gson = new Gson();
- // below line is to get to string present from our
- // shared prefs if not present setting it as null.
- String json = sharedPrefsXtreme.getData("recentsList");
- if (json != null) {
- if (json != "") {
- // below line is to get the type of our array list.
- Type type = new TypeToken<ArrayList<RecentPaymentsModel>>() {}.getType();
- // in below line we are getting data from gson
- // and saving it to our array list
- activitylist = gson.fromJson(json, type);
- // checking below if the array list is empty or not
- if (activitylist == null) {
- // if the array list is empty
- // creating a new array list.
- activitylist = new ArrayList<>();
- }
- }
- }
- return activitylist;
- }
- public void saveRecentPayments(ArrayList<RecentPaymentsModel> customerList) {
- // method for saving the data in array list.
- // creating a new variable for gson.
- Gson gson = new Gson();
- // getting data from gson and storing it in a string.
- String json = gson.toJson(customerList);
- // below line is to save data in shared
- // prefs in the form of string.
- sharedPrefsXtreme.saveData("recentsList", json);
- // after saving data we are displaying a toast message.
- }
- public void getAI_Description(
- String goal, String target_audience, String location, String age, String gender) {
- String url = BuildConfig.MAIN_ENDPOINT + "/ai/ad_copy/v2";
- String jsonOb =
- "{\n"
- + " \"goal\": \""
- + goal
- + "\",\n"
- + " \"target_audience\": \""
- + target_audience
- + "\",\n"
- + " \"location\": \""
- + location
- + "\",\n"
- + " \"age\": \""
- + age
- + "\",\n"
- + " \"gender\": \""
- + gender
- + "\"\n"
- + "}";
- Log.e("jsoNOb", "jsonOb " + jsonOb);
- RequestQueue requestQueue = Volley.newRequestQueue(getApplicationContext());
- StringRequest request =
- new StringRequest(
- Request.Method.POST,
- url,
- new Response.Listener<String>() {
- @Override
- public void onResponse(String response) {
- Log.e("responseAI", "responseAI " + response);
- try {
- setAd_AI_Description(
- new JSONObject(response).optString("ad_description"));
- } catch (JSONException e) {
- Log.e("e", "jsonException " + e.getMessage());
- }
- }
- },
- new Response.ErrorListener() {
- @Override
- public void onErrorResponse(VolleyError error) {
- Log.e("Error", "Error is " + error.networkResponse);
- NetworkResponse networkResponse = error.networkResponse;
- if (networkResponse != null) {
- if (error instanceof NetworkError
- || error instanceof ServerError
- || error instanceof AuthFailureError
- || error instanceof ParseError
- || error instanceof TimeoutError) {}
- String body = new String(networkResponse.data);
- Log.e("Error", "Error is " + body);
- }
- }
- }) {
- @Override
- public byte[] getBody() throws AuthFailureError {
- return jsonOb.getBytes();
- }
- @Override
- public String getBodyContentType() {
- return "application/json; charset=utf-8";
- }
- @Override
- public Map<String, String> getHeaders() {
- Map<String, String> headers = new HashMap<>();
- headers.put("Accept", "application/json");
- headers.put("Content-Type", "application/json");
- headers.put("Authorization", "Bearer " + getToken());
- return headers;
- }
- };
- requestQueue.add(request);
- }
- public void saveContacts(ArrayList<EngaugeActivityItem> customerList) {
- // method for saving the data in array list.
- // creating a new variable for gson.
- Gson gson = new Gson();
- // getting data from gson and storing it in a string.
- String json = gson.toJson(customerList);
- // below line is to save data in shared
- // prefs in the form of string.
- sharedPrefsXtreme.saveData("customerList", json);
- // after saving data we are displaying a toast message.
- }
- public String getDraftType() {
- return sharedPrefsXtreme.getData("typedraft");
- }
- public void saveDraftedAd(ArrayList<EngaugeOffersItem> offersList, String type) {
- // method for saving the data in array list.
- // creating a new variable for gson.
- Gson gson = new Gson();
- // getting data from gson and storing it in a string.
- String json = gson.toJson(offersList);
- // below line is to save data in shared
- // prefs in the form of string.
- sharedPrefsXtreme.saveData("draftedAd", json);
- sharedPrefsXtreme.saveData("typedraft", type);
- // after saving data we are displaying a toast message.
- }
- public String removeLastCharacter(String str) {
- if (str != null && str.length() > 0 && str.charAt(str.length() - 1) == 'x') {
- str = str.substring(0, str.length() - 1);
- }
- return str;
- }
- @SuppressWarnings("deprecation")
- public static Spanned fromHtml(String html) {
- if (html == null) {
- // return an empty spannable if the html is null
- return new SpannableString("");
- } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
- // FROM_HTML_MODE_LEGACY is the behaviour that was used for versions below android N
- // we are using this flag to give a consistent behaviour
- return Html.fromHtml(html, Html.FROM_HTML_MODE_LEGACY);
- } else {
- return Html.fromHtml(html);
- }
- }
- public ArrayList<RecentCall> loadRecentsList() {
- // method to load arraylist from shared prefs
- // initializing our shared prefs with name as
- // shared preferences.
- ArrayList<RecentCall> activitylist;
- activitylist = new ArrayList<RecentCall>();
- // creating a variable for gson.
- Gson gson = new Gson();
- // below line is to get to string present from our
- // shared prefs if not present setting it as null.
- String json = sharedPrefsXtreme.getData("recentsList");
- if (json != null) {
- if (json != "") {
- // below line is to get the type of our array list.
- Type type = new TypeToken<ArrayList<EngaugeOffersItem>>() {}.getType();
- // in below line we are getting data from gson
- // and saving it to our array list
- activitylist = gson.fromJson(json, type);
- // checking below if the array list is empty or not
- if (activitylist == null) {
- // if the array list is empty
- // creating a new array list.
- activitylist = new ArrayList<>();
- }
- }
- }
- return activitylist;
- }
- public ArrayList<EngaugeOffersItem> loadDraftedAds() {
- // method to load arraylist from shared prefs
- // initializing our shared prefs with name as
- // shared preferences.
- ArrayList<EngaugeOffersItem> activitylist;
- activitylist = new ArrayList<EngaugeOffersItem>();
- // creating a variable for gson.
- Gson gson = new Gson();
- // below line is to get to string present from our
- // shared prefs if not present setting it as null.
- String json = sharedPrefsXtreme.getData("draftedAd");
- if (json != null) {
- if (json != "") {
- // below line is to get the type of our array list.
- Type type = new TypeToken<ArrayList<EngaugeOffersItem>>() {}.getType();
- // in below line we are getting data from gson
- // and saving it to our array list
- activitylist = gson.fromJson(json, type);
- // checking below if the array list is empty or not
- if (activitylist == null) {
- // if the array list is empty
- // creating a new array list.
- activitylist = new ArrayList<>();
- }
- }
- }
- return activitylist;
- }
- public String formatePhoneNumber(String phonenum) {
- String phonen;
- phonen = phonenum.startsWith("+254") ? phonenum.substring(1) : phonenum;
- phonen = phonen.replaceAll("\\s+", "");
- phonen = phonen.replaceAll(" ", "");
- phonen = phonen.replaceAll("-", "");
- if (!phonenum.matches("")) {
- if ((phonenum.charAt(0) == '0')) {
- String newStr = phonenum.substring(1);
- String phonenew = phonenum.startsWith("0") ? "254" + newStr : phonen;
- phonen = phonenew;
- }
- if ((phonenum.charAt(0) == '9')) {
- String newStr = phonenum;
- String phonenew = phonenum.startsWith("9") ? "254" + newStr : phonen;
- phonen = phonenew;
- }
- if ((phonenum.charAt(0) == '8')) {
- String newStr = phonenum;
- String phonenew = phonenum.startsWith("8") ? "254" + newStr : phonen;
- phonen = phonenew;
- }
- if ((phonenum.charAt(0) == '7')) {
- String newStr = phonenum;
- String phonenew = phonenum.startsWith("7") ? "254" + newStr : phonen;
- phonen = phonenew;
- }
- if ((phonenum.charAt(0) == '1')) {
- String newStr = phonenum;
- String phonenew = phonenum.startsWith("1") ? "254" + newStr : phonen;
- phonen = phonenew;
- }
- if (phonenum.matches("")) {
- phonen = "";
- Log.e("phonenumberEmpt", "empty");
- } else {
- phonen = phonen.replaceAll("\\s", "");
- if (phonen.length() < 10 || phonen.length() > 13) {
- // Log.e("invalid", "invalid");
- Log.e("phonenum", "Phonenum is " + phonen);
- phonen = "";
- }
- }
- }
- return phonen.startsWith("254") ? phonen.replace("-", "") : "";
- }
- public ArrayList<EngaugeOffersItem> loadSavedOffers() {
- // method to load arraylist from shared prefs
- // initializing our shared prefs with name as
- // shared preferences.
- ArrayList<EngaugeOffersItem> activitylist;
- activitylist = new ArrayList<EngaugeOffersItem>();
- // creating a variable for gson.
- Gson gson = new Gson();
- // below line is to get to string present from our
- // shared prefs if not present setting it as null.
- String json = sharedPrefsXtreme.getData("offersList");
- if (json != null) {
- if (json != "") {
- // below line is to get the type of our array list.
- Type type = new TypeToken<ArrayList<EngaugeOffersItem>>() {}.getType();
- // in below line we are getting data from gson
- // and saving it to our array list
- activitylist = gson.fromJson(json, type);
- // checking below if the array list is empty or not
- if (activitylist == null) {
- // if the array list is empty
- // creating a new array list.
- activitylist = new ArrayList<>();
- }
- }
- }
- return activitylist;
- }
- public ArrayList<EngaugeOffersItem> loadOffers() {
- // method to load arraylist from shared prefs
- // initializing our shared prefs with name as
- // shared preferences.
- ArrayList<EngaugeOffersItem> activitylist;
- activitylist = new ArrayList<EngaugeOffersItem>();
- // creating a variable for gson.
- Gson gson = new Gson();
- // below line is to get to string present from our
- // shared prefs if not present setting it as null.
- String json = sharedPrefsXtreme.getData("offersList");
- if (json != null) {
- if (json != "") {
- // below line is to get the type of our array list.
- Type type = new TypeToken<ArrayList<EngaugeOffersItem>>() {}.getType();
- // in below line we are getting data from gson
- // and saving it to our array list
- activitylist = gson.fromJson(json, type);
- // checking below if the array list is empty or not
- if (activitylist == null) {
- // if the array list is empty
- // creating a new array list.
- activitylist = new ArrayList<>();
- }
- }
- }
- return activitylist;
- }
- public void saveOffers(ArrayList<EngaugeOffersItem> offersList) {
- // method for saving the data in array list.
- // creating a new variable for gson.
- Gson gson = new Gson();
- // getting data from gson and storing it in a string.
- String json = gson.toJson(offersList);
- // below line is to save data in shared
- // prefs in the form of string.
- sharedPrefsXtreme.saveData("offersList", json);
- // after saving data we are displaying a toast message.
- }
- public ArrayList<EngaugeActivityItem> loadNotifications() {
- // method to load arraylist from shared prefs
- // initializing our shared prefs with name as
- // shared preferences.
- ArrayList<EngaugeActivityItem> activitylist;
- activitylist = new ArrayList<EngaugeActivityItem>();
- // creating a variable for gson.
- Gson gson = new Gson();
- // below line is to get to string present from our
- // shared prefs if not present setting it as null.
- String json = sharedPrefsXtreme.getData("notifsList");
- if (json != null) {
- if (json != "") {
- // below line is to get the type of our array list.
- Type type = new TypeToken<ArrayList<EngaugeActivityItem>>() {}.getType();
- // in below line we are getting data from gson
- // and saving it to our array list
- activitylist = gson.fromJson(json, type);
- // checking below if the array list is empty or not
- if (activitylist == null) {
- // if the array list is empty
- // creating a new array list.
- activitylist = new ArrayList<>();
- }
- }
- }
- return activitylist;
- }
- public void saveMoreNotifications(ArrayList<EngaugeActivityItem> notifsList) {
- // method to load arraylist from shared prefs
- // initializing our shared prefs with name as
- // shared preferences.
- ArrayList<EngaugeActivityItem> activitylist;
- activitylist = new ArrayList<EngaugeActivityItem>();
- // creating a variable for gson.
- Gson gson = new Gson();
- // below line is to get to string present from our
- // shared prefs if not present setting it as null.
- String json = sharedPrefsXtreme.getData("notifsList");
- if (json != null) {
- if (json != "") {
- // below line is to get the type of our array list.
- Type type = new TypeToken<ArrayList<EngaugeActivityItem>>() {}.getType();
- // in below line we are getting data from gson
- // and saving it to our array list
- activitylist = gson.fromJson(json, type);
- activitylist.addAll(notifsList);
- String jsonnew = gson.toJson(activitylist);
- // below line is to save data in shared
- // prefs in the form of string.
- sharedPrefsXtreme.saveData("notifsList", jsonnew);
- // checking below if the array list is empty or not
- if (activitylist == null) {
- // if the array list is empty
- // creating a new array list.
- activitylist = new ArrayList<>();
- }
- }
- }
- }
- public void saveAdUri(String uri) {
- sharedPrefsXtreme.saveData("aduri", uri);
- }
- public void savePhotos(ArrayList<Uri> listme) {
- Gson gson = new Gson();
- ArrayList<String> list = new ArrayList<>();
- for (int i = 0; i < listme.size(); i++) {
- list.add(String.valueOf(listme.get(i)));
- }
- String json = gson.toJson(list);
- sharedPrefsXtreme.saveData("photosAdsLists", json);
- }
- public Uri getImageUri(Bitmap inImage) {
- ByteArrayOutputStream bytes = new ByteArrayOutputStream();
- inImage.compress(Bitmap.CompressFormat.JPEG, 100, bytes);
- String path =
- MediaStore.Images.Media.insertImage(
- this.getContentResolver(), inImage, "Title", null);
- return Uri.parse(path);
- }
- public ArrayList<Uri> getPhotos() {
- Gson gson = new Gson();
- String json = sharedPrefsXtreme.getData("photosAdsLists");
- Type type = new TypeToken<ArrayList<String>>() {}.getType();
- return gson.fromJson(json, type);
- }
- public String getAdUri() {
- return sharedPrefsXtreme.getData("aduri");
- }
- public void saveNotifications(ArrayList<EngaugeActivityItem> notifsList) {
- // method for saving the data in array list.
- // creating a new variable for gson.
- Gson gson = new Gson();
- // getting data from gson and storing it in a string.
- String json = gson.toJson(notifsList);
- // below line is to save data in shared
- // prefs in the form of string.
- sharedPrefsXtreme.saveData("notifsList", json);
- // after saving data we are displaying a toast message.
- }
- public void saveOTP(String otp) {
- sharedPrefsXtreme.saveData("otp", otp);
- }
- public String getOTP() {
- return sharedPrefsXtreme.getData("otp");
- }
- public void removeContacts() {
- sharedPrefsXtreme.saveData("customerList", "");
- }
- public void removeReviews() {
- sharedPrefsXtreme.saveData("totalreviewers", "");
- sharedPrefsXtreme.saveData("customerList", "");
- sharedPrefsXtreme.saveData("averagerating", "");
- }
- public void setOfferslist(ArrayList<EngaugeOffersItem> offerslist) {
- EngaugeItem item = new EngaugeItem();
- this.offerslist = offerslist;
- }
- public ArrayList<EngaugeOffersItem> getOfferslist() {
- return offerslist;
- }
- public void setAppLaunched(Boolean appLaunched) {
- this.appLaunched = appLaunched;
- }
- public Boolean getAppLaunched() {
- return appLaunched;
- }
- public String getNigerianStatesTwo() {
- return nigerianStatesTwo;
- }
- public String getNigerianStates() {
- return nigerianStates;
- }
- public void setToken() {
- String url = BuildConfig.MAIN_ENDPOINT + "/token";
- RequestQueue requestQueue = Volley.newRequestQueue(this);
- StringRequest request =
- new StringRequest(
- Request.Method.POST,
- url,
- new Response.Listener<String>() {
- @Override
- public void onResponse(String response) {
- try {
- JSONObject jsonObj = new JSONObject(response);
- String access_token = jsonObj.getString("access_token");
- String token_type = jsonObj.getString("token_type");
- Log.e("The Tolkien ", access_token);
- sharedPrefsXtreme.saveData("token", access_token);
- } catch (JSONException e) {
- Log.e("Error", "Error is " + e.getMessage());
- }
- }
- },
- new Response.ErrorListener() {
- @Override
- public void onErrorResponse(VolleyError error) {
- Log.e("error gettingtoken ", "" + error);
- if (error == null || error.networkResponse == null) {
- return;
- }
- String body;
- // get status code here
- final String statusCode =
- String.valueOf(error.networkResponse.statusCode);
- Log.e("error st_code ", "" + statusCode);
- // get response body and parse with appropriate encoding
- try {
- body = new String(error.networkResponse.data, "UTF-8");
- } catch (UnsupportedEncodingException e) {
- Log.e("encoding is ", "" + e.getMessage());
- // exception
- }
- }
- }) {
- @Override
- public String getBodyContentType() {
- return "application/x-www-form-urlencoded; charset=utf-8";
- }
- @Override
- public Map<String, String> getHeaders() {
- Map<String, String> headers = new HashMap<>();
- headers.put("Accept", "application/json");
- headers.put("Content-Type", "application/x-www-form-urlencoded");
- return headers;
- }
- @Override
- public Map<String, String> getParams() throws AuthFailureError {
- Map<String, String> params = new HashMap<>();
- params.put("username", getPhoneNumber());
- params.put("password", getOTP());
- return params;
- }
- };
- requestQueue.add(request);
- }
- // public void setToken() {
- // String url =
- //
- // "https://merchant-api.ajua.com/v0/token?username=android&password=e666d552-0785-41ca-8138-9109d9e9721e";
- //
- // RequestQueue requestQueue = Volley.newRequestQueue(this);
- // JsonObjectRequest jsonObjectRequest =
- // new JsonObjectRequest(
- // Request.Method.GET,
- // url,
- // null,
- // new Response.Listener<JSONObject>() {
- // @Override
- // public void onResponse(JSONObject response) {
- //
- // JSONObject jsonObj = null;
- // try {
- // jsonObj = new JSONObject(response.toString());
- //
- // String token = jsonObj.getString("token");
- // sharedPrefsXtreme.saveData("token", token);
- //
- // } catch (JSONException e) {
- // e.printStackTrace();
- // }
- // }
- // },
- // new Response.ErrorListener() {
- // @Override
- // public void onErrorResponse(VolleyError error) {
- // Log.e("error gettingtoken ", "" + error);
- // if (error == null || error.networkResponse == null) {
- // return;
- // }
- //
- // String body;
- // // get status code here
- // final String statusCode =
- // String.valueOf(error.networkResponse.statusCode);
- // Log.e("error st_code ", "" + statusCode);
- // // get response body and parse with appropriate encoding
- // try {
- // body = new String(error.networkResponse.data, "UTF-8");
- // } catch (UnsupportedEncodingException e) {
- // Log.e("encoding is ", "" + e.getMessage());
- // // exception
- // }
- // }
- // });
- // requestQueue.add(jsonObjectRequest);
- // }
- public void logOutPreliminaries() {
- sharedPrefsXtreme.deleteAllData(getApplicationContext());
- sharedPrefsXtreme.saveData("isLoggedin", "");
- sharedPrefsXtreme.saveData("phonenum", "");
- sharedPrefsXtreme.saveData("token", "");
- removeContacts();
- removeReviews();
- setAppLaunched(false);
- }
- public String getNumStaff() {
- return sharedPrefsXtreme.getData("stringnumstaff");
- }
- public void setLastOffer(String lastOffer) {
- sharedPrefsXtreme.saveData("lastOffer", lastOffer);
- }
- public String setMaskedNu() {
- return sharedPrefsXtreme.getData("waitinglist");
- }
- public void setAddress(String businessAddress) {
- sharedPrefsXtreme.saveData("businessAddress", businessAddress);
- }
- public void setAddedToWaitingList(String waitingList) {
- sharedPrefsXtreme.saveData("waitinglist", waitingList);
- }
- public String getBusinessAddress() {
- return sharedPrefsXtreme.getData("businessAddress");
- }
- public String getAddedToWaitingList() {
- return sharedPrefsXtreme.getData("waitinglist");
- }
- // public void setAddedToWaitingList(String waitingList)
- // {
- // sharedPrefsXtreme.saveData("waitinglist", waitingList);
- // }
- public String getCity() {
- return sharedPrefsXtreme.getData("city");
- }
- public String getProfilePic() {
- return sharedPrefsXtreme.getData("profile_photo");
- }
- public String getCoverPic() {
- return sharedPrefsXtreme.getData("cover_photo");
- }
- public String getState() {
- return sharedPrefsXtreme.getData("state");
- }
- public String getLastOffer() {
- return sharedPrefsXtreme.getData("lastOffer");
- }
- public String getFullName() {
- return sharedPrefsXtreme.getData("fullname");
- }
- public void setFullName(String s) {
- sharedPrefsXtreme.saveData("fullname", s);
- }
- public String getBusinessName() {
- return sharedPrefsXtreme.getData("businessname");
- }
- public void setDeviceToken(String deviceToken) {
- sharedPrefsXtreme.saveData("deviceToken", deviceToken);
- }
- public static void AddConstantTextInEditText(EditText edt, String text) {
- edt.setText(text);
- Selection.setSelection(edt.getText(), edt.getText().length());
- edt.addTextChangedListener(
- new TextWatcher() {
- @Override
- public void onTextChanged(CharSequence s, int start, int before, int count) {}
- @Override
- public void beforeTextChanged(
- CharSequence s, int start, int count, int after) {}
- @Override
- public void afterTextChanged(Editable s) {
- if (!s.toString().startsWith(text)) {
- edt.setText(text);
- Selection.setSelection(edt.getText(), edt.getText().length());
- }
- }
- });
- }
- public String getCreditEngineAccessToken() {
- String user_id_suffixed = "TAP-" + getPhoneLoc().substring(1);
- String platform = "TAP-019";
- String jwt_secret = "e925bb488d0d7e97070622f0e676e50d54f6ab8dae31f2acf1d294a16e587903";
- String jwt_token =
- Jwts.builder()
- .claim("userid", user_id_suffixed)
- .claim("platform", platform)
- .signWith(SignatureAlgorithm.HS256, jwt_secret.getBytes())
- .compact();
- Log.e("generatedToken", "generatedTokenJWT " + jwt_token);
- return jwt_token;
- }
- public String getDeviceToken() {
- return sharedPrefsXtreme.getData("deviceToken");
- }
- public void setBusinessName(String businessName) {
- sharedPrefsXtreme.saveData("businessname", businessName);
- }
- public void setBusinessDescription(String description) {
- sharedPrefsXtreme.saveData("businessdescription", description);
- }
- public String getCreditWalletCreatedAt() {
- return sharedPrefsXtreme.getData("credwalletcreatedat");
- }
- public String getCreditWalletUpdatedAt() {
- return sharedPrefsXtreme.getData("credwalletupdatedat");
- }
- public String getCreditWalletBalance() {
- return sharedPrefsXtreme.getData("creditWalletBalance");
- }
- public String getCreditWallePendingtBalance() {
- return sharedPrefsXtreme.getData("creditWalletPendingBalance");
- }
- public void setCreditWalletCreatedAt(String credwalletcreatedat) {
- sharedPrefsXtreme.saveData("credwalletcreatedat", credwalletcreatedat);
- }
- public void setCreditWalletUpdatedAt(String credwalletupdatedat) {
- sharedPrefsXtreme.saveData("industry", credwalletupdatedat);
- }
- public void setCreditWalletBalance(String creditWalletBalance) {
- sharedPrefsXtreme.saveData("creditWalletBalance", creditWalletBalance);
- }
- public void setVerifiedFeedbackCount(String verifiedFeedbackCount) {
- sharedPrefsXtreme.saveData("verifiedFeedbackCount", verifiedFeedbackCount);
- }
- public String getVerifiedFeedbackCount() {
- return sharedPrefsXtreme.getData("verifiedFeedbackCount");
- }
- public void setCreditWallePendingtBalance(String creditWallePendingtBalance) {
- sharedPrefsXtreme.saveData("creditWalletPendingBalance", creditWallePendingtBalance);
- }
- public void setState(String state) {
- sharedPrefsXtreme.saveData("state", state);
- }
- public String getSubScriptionExpiryDate() {
- return sharedPrefsXtreme.getData("subscriptionExpiryDate");
- }
- public void setIsLaunched(Boolean launched) {
- sharedPrefsXtreme.saveData("launchedOTPSession", String.valueOf(launched));
- }
- public String getIsLaunched() {
- return sharedPrefsXtreme.getData("launchedOTPSession");
- }
- public String getMerchantId() {
- return sharedPrefsXtreme.getData("id");
- }
- public void setMerchantId(String id) {
- sharedPrefsXtreme.saveData("id", id);
- }
- public String getIndustry_id() {
- return sharedPrefsXtreme.getData("industry_id");
- }
- public void setIndustry_id(String id) {
- sharedPrefsXtreme.saveData("industry_id", id);
- }
- public Integer getSelected_pos() {
- return sharedPrefsXtreme.getData("position_id").equals("")
- ? 0
- : Integer.parseInt(sharedPrefsXtreme.getData("position_id"));
- }
- public void setSelection_pos(String selectionPos) {
- sharedPrefsXtreme.saveData("position_id", selectionPos);
- }
- public String getOid() {
- return sharedPrefsXtreme.getData("oid");
- }
- public String getUSSD() {
- return sharedPrefsXtreme.getData("ussd");
- }
- public String getPhoneNumber() {
- return sharedPrefsXtreme.getData("phonenumberserver");
- }
- public String getPhoneLoc() {
- return sharedPrefsXtreme.getData("phonenum");
- }
- public String getDocumentName() {
- return sharedPrefsXtreme.getData("docname");
- }
- public void setDocname(String docname) {
- sharedPrefsXtreme.saveData("docname", docname);
- }
- public String getBusinessDescription() {
- return sharedPrefsXtreme.getData("businessdescription");
- }
- public String getSchema() {
- return sharedPrefsXtreme.getData("schema");
- }
- public String getIndustry() {
- return sharedPrefsXtreme.getData("industry");
- }
- public void setIndustry(String industry) {
- sharedPrefsXtreme.saveData("industry", industry);
- }
- public String getCountry() {
- return sharedPrefsXtreme.getData("country");
- }
- public String getSubscriptionStatus() {
- return sharedPrefsXtreme.getData("subscriptionstatus");
- }
- public String getSubscriptionPackage() {
- return sharedPrefsXtreme.getData("subscriptionpackage");
- }
- public String getSubscriptionAmount() {
- return sharedPrefsXtreme.getData("subscriptionamount");
- }
- public void disableEditText(EditText editText) {
- editText.setFocusable(false);
- editText.setEnabled(false);
- editText.setCursorVisible(false);
- editText.setKeyListener(null);
- editText.setBackgroundColor(Color.TRANSPARENT);
- }
- public String getAjuaAccountId() {
- return sharedPrefsXtreme.getData("ajuaaccountid");
- }
- public String getFirstCollabName() {
- return sharedPrefsXtreme.getData("firstcollabname");
- }
- public String getSecondCollabName() {
- return sharedPrefsXtreme.getData("secondcollabname");
- }
- public String getEmailCollab() {
- return sharedPrefsXtreme.getData("emailcollab").equals("")||sharedPrefsXtreme.getData("emailcollab").equals("null")
- ? getBusinessName().toLowerCase().replace(" ", "") + "@tappi.app"
- : sharedPrefsXtreme.getData("emailcollab");
- }
- public String getUserIdCollab() {
- return sharedPrefsXtreme.getData("userid");
- }
- public String getUserName() {
- return sharedPrefsXtreme.getData("username");
- }
- public Bitmap getBitmapFormUri(Context ac, Uri uri) throws FileNotFoundException, IOException {
- InputStream input = ac.getContentResolver().openInputStream(uri);
- BitmapFactory.Options onlyBoundsOptions = new BitmapFactory.Options();
- onlyBoundsOptions.inJustDecodeBounds = true;
- onlyBoundsOptions.inDither = true; // optional
- onlyBoundsOptions.inPreferredConfig = Bitmap.Config.ARGB_8888; // optional
- BitmapFactory.decodeStream(input, null, onlyBoundsOptions);
- input.close();
- int originalWidth = onlyBoundsOptions.outWidth;
- int originalHeight = onlyBoundsOptions.outHeight;
- if ((originalWidth == -1) || (originalHeight == -1)) return null;
- // Image resolution is based on 480x800
- float hh = 800f; // The height is set as 800f here
- float ww = 480f; // Set the width here to 480f
- // Zoom ratio. Because it is a fixed scale, only one data of height or width is used for
- // calculation
- int be = 1; // be=1 means no scaling
- if (originalWidth > originalHeight
- && originalWidth
- > ww) { // If the width is large, scale according to the fixed size of the
- // width
- be = (int) (originalWidth / ww);
- } else if (originalWidth < originalHeight
- && originalHeight
- > hh) { // If the height is high, scale according to the fixed size of the
- // width
- be = (int) (originalHeight / hh);
- }
- if (be <= 0) be = 1;
- // Proportional compression
- BitmapFactory.Options bitmapOptions = new BitmapFactory.Options();
- bitmapOptions.inSampleSize = be; // Set scaling
- bitmapOptions.inDither = true; // optional
- bitmapOptions.inPreferredConfig = Bitmap.Config.ARGB_8888; // optional
- input = ac.getContentResolver().openInputStream(uri);
- Bitmap bitmap = BitmapFactory.decodeStream(input, null, bitmapOptions);
- input.close();
- return compressImage(bitmap); // Mass compression again
- }
- public static Bitmap compressImage(Bitmap image) {
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- image.compress(
- Bitmap.CompressFormat.JPEG,
- 100,
- baos); // Quality compression method, here 100 means no compression, store the
- // compressed data in the BIOS
- int options = 100;
- while (baos.toByteArray().length / 1024
- > 100) { // Cycle to determine if the compressed image is greater than 100kb,
- // greater than continue compression
- baos.reset(); // Reset the BIOS to clear it
- // First parameter: picture format, second parameter: picture quality, 100 is the
- // highest, 0 is the worst, third parameter: save the compressed data stream
- image.compress(
- Bitmap.CompressFormat.JPEG,
- options,
- baos); // Here, the compression options are used to store the compressed data in
- // the BIOS
- options -= 10; // 10 less each time
- }
- ByteArrayInputStream isBm =
- new ByteArrayInputStream(
- baos.toByteArray()); // Store the compressed data in ByteArrayInputStream
- Bitmap bitmap =
- BitmapFactory.decodeStream(
- isBm, null, null); // Generate image from ByteArrayInputStream data
- return bitmap;
- }
- public void setTokenFunc() {
- FirebaseMessaging.getInstance()
- .getToken()
- .addOnCompleteListener(
- new com.google.android.gms.tasks.OnCompleteListener<String>() {
- @Override
- public void onComplete(
- @NonNull com.google.android.gms.tasks.Task<String> task) {
- if (!task.isSuccessful()) {
- Log.e(
- "tokenerr",
- "Fetching FCM registration token failed",
- task.getException());
- return;
- }
- // Get new FCM registration token
- token = task.getResult();
- setDeviceToken(token);
- }
- });
- }
- public String convertForAd(long time) {
- Calendar cal = Calendar.getInstance(Locale.ENGLISH);
- cal.setTimeInMillis(time * 1000);
- Date timeD = new Date(time);
- SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm'Z'");
- String Time = sdf.format(timeD);
- SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm'Z'");
- Date pasTime = null;
- try {
- pasTime = dateFormat.parse(String.valueOf(time));
- // Log.e("pastime", "pastime "+pasTime);
- } catch (ParseException e) {
- // Log.e("error", "error "+e.getMessage());
- }
- // Log.e("pastimedateo", "pastimedateo "+Time);
- return Time;
- }
- public String getDateString(long time) {
- Calendar cal = Calendar.getInstance(Locale.ENGLISH);
- cal.setTimeInMillis(time * 1000);
- Date timeD = new Date(time);
- SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm'Z'");
- String Time = sdf.format(timeD);
- SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm'Z'");
- Date pasTime = null;
- try {
- pasTime = dateFormat.parse(String.valueOf(time));
- // Log.e("pastime", "pastime "+pasTime);
- } catch (ParseException e) {
- // Log.e("error", "error "+e.getMessage());
- }
- // Log.e("pastimedateo", "pastimedateo "+Time);
- return Time;
- }
- public void setHoursOfOperation(String hoursOfOperation) {
- sharedPrefsXtreme.saveData("hoursOfOperation", hoursOfOperation);
- }
- public String getHoursOfOperationUnformatted() {
- return sharedPrefsXtreme.getData("hoursOfOperation");
- }
- public String getHoursOfOperation() {
- return sharedPrefsXtreme.getData("hoursOfOperation") != null
- && !sharedPrefsXtreme.getData("hoursOfOperation").equals("")
- ? sharedPrefsXtreme
- .getData("hoursOfOperation")
- .replace("[", "")
- .replace("]", "")
- .replace(",", "\n\n")
- : "";
- }
- public String reformatOpeningAndClosingHours(String formattedHours) {
- try {
- String[] elements = formattedHours.replaceFirst("\\[", "").replaceAll("\\]", "").split(",");
- List<String> fixedLenghtList = Arrays.asList(elements);
- ArrayList<String> listOfString = new ArrayList<String>(fixedLenghtList);
- JsonArray opening_closing_hrs = new JsonArray();
- for (int i = 0; i < listOfString.size(); i++) {
- String[] sp = listOfString.get(i).trim().replaceAll("-", " ").split(" ");
- String day_of_week = sp[0];
- String opening_time = sp[1] + " " + sp[2].toLowerCase();
- String closing_time = sp[3] + " " + sp[4].toLowerCase();
- String jsonObject =
- "{\n"
- + " \"day\": \""
- + day_of_week
- + "\",\n"
- + " \"open\": \""
- + opening_time
- + "\",\n"
- + " \"close\": \""
- + closing_time
- + "\"\n"
- + "}";
- JSONObject jsonObjectConv = new JSONObject();
- try {
- jsonObjectConv = new JSONObject(jsonObject);
- } catch (JSONException e) {
- Log.e("exceptionJson", "exce " + e.getMessage());
- }
- opening_closing_hrs.add(String.valueOf(jsonObjectConv));
- }
- // return opening_closing_hrs.toString();
- return removeLast(opening_closing_hrs.toString().replaceAll("\\\\", ""), "\"")
- .replaceFirst("\"", "")
- .toString()
- .replace("}\",", "},")
- .replace(",\"{", ",{");
- }
- catch (ArrayIndexOutOfBoundsException e)
- {
- Log.e("emptyOandC", "emptyOpeningAndClosing "+e.getMessage());
- return "";
- }
- }
- public static String removeLast(String s, String search) {
- int pos = s.lastIndexOf(search);
- if (pos > -1) {
- return s.substring(0, pos) + s.substring(pos + search.length(), s.length());
- }
- return s;
- }
- public String getReadableTimeAdDraft(String time_stamp_server) {
- SimpleDateFormat outputFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSSZ", Locale.US);
- // SimpleDateFormat outputFormat = new SimpleDateFormat("dd-MM-yyyy", Locale.US);
- SimpleDateFormat inputFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
- SimpleDateFormat formatter = new SimpleDateFormat("d/MMM/yyyy");
- Date date = null;
- try {
- date = inputFormat.parse(time_stamp_server);
- } catch (ParseException e) {
- try {
- date = inputFormat.parse("2022-02-04 19:45:05.036+0300");
- } catch (ParseException parseException) {
- parseException.printStackTrace();
- }
- }
- String outputText = outputFormat.format(date);
- // Log.e("date", "date "+outputText);
- return outputText;
- }
- public String getReadableTimeAd(String time_stamp_server, Boolean start) {
- SimpleDateFormat outputFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.US);
- // SimpleDateFormat outputFormat = new SimpleDateFormat("dd-MM-yyyy", Locale.US);
- SimpleDateFormat inputFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSSZ");
- SimpleDateFormat formatter = new SimpleDateFormat("d/MMM/yyyy");
- Date date = null;
- try {
- date = inputFormat.parse(time_stamp_server);
- } catch (ParseException e) {
- try {
- String timeStamp =
- new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")
- .format(Calendar.getInstance().getTime());
- date = inputFormat.parse(timeStamp);
- } catch (ParseException parseException) {
- Log.e("parseException", "parseExeption " + parseException.getMessage());
- }
- }
- String outputText = "";
- if (!start) {
- try {
- outputText = outputFormat.format(date);
- } catch (NullPointerException e) {
- Calendar c = Calendar.getInstance();
- c.add(Calendar.DATE, 1);
- outputText = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(c.getTime());
- }
- } else {
- try {
- outputText = outputFormat.format(date);
- } catch (NullPointerException e) {
- outputText =
- new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")
- .format(Calendar.getInstance().getTime());
- }
- }
- return outputText;
- }
- public String getReadableTime(String time_stamp_server) {
- SimpleDateFormat outputFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm'Z'", Locale.US);
- // SimpleDateFormat outputFormat = new SimpleDateFormat("dd-MM-yyyy", Locale.US);
- SimpleDateFormat inputFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSSZ");
- SimpleDateFormat formatter = new SimpleDateFormat("d/MMM/yyyy");
- Date date = null;
- try {
- date = inputFormat.parse(time_stamp_server);
- } catch (ParseException e) {
- try {
- date = inputFormat.parse("2022-02-04 19:45:05.036+0300");
- } catch (ParseException parseException) {
- parseException.printStackTrace();
- }
- }
- String outputText = outputFormat.format(date);
- // Log.e("date", "date "+outputText);
- return outputText;
- }
- public String getDateStringNew(long time) {
- Calendar cal = Calendar.getInstance(Locale.ENGLISH);
- cal.setTimeInMillis(time * 1000);
- Date timeD = new Date(time);
- SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm'Z'");
- String Time = sdf.format(timeD);
- SimpleDateFormat dateFormat = new SimpleDateFormat("MM-dd");
- Date pasTime = null;
- try {
- pasTime = dateFormat.parse(String.valueOf(time));
- // Log.e("pastime", "pastime "+pasTime);
- } catch (ParseException e) {
- // Log.e("error", "error "+e.getMessage());
- }
- // Log.e("pastimedateo", "pastimedateo "+Time);
- return Time;
- }
- protected void applyConfig(FirebaseRemoteConfig mFirebaseRemoteConfig) {
- ExperimentalFeatures.setEnableCreate_ads(
- mFirebaseRemoteConfig.getBoolean("create_ads_enabled"));
- ExperimentalFeatures.setEnableAirtime(
- mFirebaseRemoteConfig.getBoolean("airtime_payment_enabled"));
- ExperimentalFeatures.setEnable_FlutterWave_Payments(
- mFirebaseRemoteConfig.getBoolean("flutterwave_payment_enabled"));
- ExperimentalFeatures.setEnable_ussdPayments(
- mFirebaseRemoteConfig.getBoolean("ussd_payment_enabled"));
- ExperimentalFeatures.setEnableAdFeed(mFirebaseRemoteConfig.getBoolean("ad_feed"));
- ExperimentalFeatures.setEnable_requestPayments(
- mFirebaseRemoteConfig.getBoolean("request_payments"));
- }
- public FirebaseAnalytics getFirebaseAnalytics() {
- return mFirebaseAnalytics;
- }
- @SuppressLint("MissingPermission")
- @Override
- public void onCreate() {
- super.onCreate();
- instance = this;
- setDefaultLanguage(getApplicationContext(),"fr");
- registerActivityLifecycleCallbacks(this);
- prefs = initPrefs(); // Inicializing a Shared preferences(native android class) and Secure
- // Preferences(Secure Preferences lib)
- DatabaseCreator.INSTANCE.createDb(this); // Creating a database in new thread
- sharedPrefsXtreme_static = SharedPrefsXtreme.getInstance(getApplicationContext());
- networkChangeReceiver =
- new NetworkConnectionChecker(
- this); // Creating a network connection state changes receiver (like
- // BroadCastReceiver)
- FirebaseRemoteConfig mFirebaseRemoteConfig = FirebaseRemoteConfig.getInstance();
- FirebaseRemoteConfigSettings configSettings =
- new FirebaseRemoteConfigSettings.Builder()
- .setMinimumFetchIntervalInSeconds(3600)
- .build();
- mFirebaseRemoteConfig.setDefaultsAsync(R.xml.remote_config_defaults);
- mFirebaseRemoteConfig.setConfigSettingsAsync(configSettings);
- mFirebaseRemoteConfig
- .fetchAndActivate()
- .addOnCompleteListener(
- new com.google.android.gms.tasks.OnCompleteListener<Boolean>() {
- @Override
- public void onComplete(
- @NonNull com.google.android.gms.tasks.Task<Boolean> task) {
- if (task.isSuccessful()) {
- boolean updated = task.getResult();
- applyConfig(mFirebaseRemoteConfig);
- Log.e("remoteConf", "remoteConf ");
- } else {
- Log.e("remoteConfNot", "remoteConfNot ");
- }
- }
- });
- sharedPrefsXtreme = SharedPrefsXtreme.getInstance(this);
- if (!Places.isInitialized()) {
- Places.initialize(getApplicationContext(), Constants.API_KEY, Locale.US);
- }
- setToken();
- Amplitude.getInstance()
- .initialize(this, Constants.AMPLITUDE_API_KEY)
- .enableForegroundTracking(this);
- Amplitude.getInstance().enableForegroundTracking(this).trackSessionEvents(true);
- Amplitude.getInstance().setLogLevel(Log.VERBOSE);
- mFirebaseAnalytics = FirebaseAnalytics.getInstance(this);
- final SimpleDateFormat myDateFormat =
- new SimpleDateFormat("EEE, d MMM yyyy", Locale.ENGLISH);
- Calendar c = Calendar.getInstance();
- setReadableTimeStart(myDateFormat.format(c.getTime()));
- c.add(Calendar.DATE, 1);
- Date expDate = c.getTime();
- final int chunkSize = 2048;
- Long timestamp = TimeUnit.MILLISECONDS.toSeconds(System.currentTimeMillis());
- setReadableTimeEnd(myDateFormat.format(c.getTime()));
- setStartTimeStamp(String.valueOf(timestamp));
- setEndtimestamp(String.valueOf(expDate.getTime()));
- FirebaseMessaging.getInstance()
- .getToken()
- .addOnCompleteListener(
- new com.google.android.gms.tasks.OnCompleteListener<String>() {
- @Override
- public void onComplete(
- @NonNull com.google.android.gms.tasks.Task<String> task) {
- if (!task.isSuccessful()) {
- Log.e(
- "tokenerr",
- "Fetching FCM registration token failed",
- task.getException());
- return;
- }
- // Get new FCM registration token
- token = task.getResult();
- for (int i = 0; i < token.length(); i += chunkSize) {
- setDeviceToken(token);
- Log.e(
- "FirebaseTok",
- "firebasetokev"
- + token.substring(
- i,
- Math.min(
- token.length(),
- i + chunkSize)));
- }
- }
- });
- try {
- PackageInfo info =
- getPackageManager()
- .getPackageInfo(getPackageName(), PackageManager.GET_SIGNATURES);
- for (Signature signature : info.signatures) {
- MessageDigest md = MessageDigest.getInstance("SHA");
- md.update(signature.toByteArray());
- Log.e("KeyHash:", Base64.encodeToString(md.digest(), Base64.DEFAULT));
- }
- } catch (PackageManager.NameNotFoundException e) {
- e.printStackTrace();
- } catch (NoSuchAlgorithmException e) {
- e.printStackTrace();
- }
- loadSavedCustomersBackground();
- setAiDesc();
- }
- public void setAiDesc() {
- getAI_Description(
- getGoal(),
- getTargetAudience(),
- getLocation(),
- getMinAge() + "-" + getMaxAge(),
- getGender());
- }
- /**
- * Gets prefs.
- *
- * @return the prefs
- */
- public static SharedPreferences getPrefs() {
- return prefs;
- }
- /**
- * Gets instance.
- *
- * @return the instance
- */
- public static EngaugeApp getInstance() {
- return instance;
- }
- /**
- * Gets firebase analytics.
- *
- * @return the firebase analytics
- */
- /**
- * In app messaging initialization.
- *
- * @param context the context
- * @param setSuppressed the set suppressed
- * @param eventName the event name
- */
- @SuppressLint("MissingPermission")
- public static void inAppMessagingInitialization(
- Context context,
- boolean setSuppressed,
- String eventName) { // setSuppressed false means start getting message
- FirebaseInAppMessaging.getInstance()
- .setMessagesSuppressed(setSuppressed); // true==Stop inAppMessaging
- if (!eventName.equals("")) {
- FirebaseAnalytics.getInstance(context)
- .logEvent(
- eventName,
- null); // To Show InAppMessage in MainActivity. Need to add this event
- // name in Web console campaign
- FirebaseInAppMessaging.getInstance().triggerEvent(eventName);
- }
- }
- @Override
- public void onActivityCreated(@NonNull Activity activity, @Nullable Bundle bundle) {}
- @Override
- public void onActivityStarted(@NonNull Activity activity) {
- if (++activityReferences == 1 && !isActivityChangingConfigurations) {
- // App enters foreground
- }
- }
- @Override
- public void onActivityResumed(@NonNull Activity activity) {}
- @Override
- public void onActivityPaused(@NonNull Activity activity) {}
- @Override
- public void onActivityStopped(@NonNull Activity activity) {
- isActivityChangingConfigurations = activity.isChangingConfigurations();
- if (--activityReferences == 0 && !isActivityChangingConfigurations) {
- // App enters background
- Log.e("goesInto", "background");
- setIsLaunched(true);
- }
- }
- @Override
- public void onActivitySaveInstanceState(@NonNull Activity activity, @NonNull Bundle bundle) {}
- @Override
- public void onActivityDestroyed(@NonNull Activity activity) {
- // Log.e("removed", "removed");
- }
- public String getProfile_photo() {
- return sharedPrefsXtreme.getData("profile_photo_profile");
- }
- public void setProfile_photo(String profile_photo) {
- sharedPrefsXtreme.saveData("profile_photo_profile", profile_photo);
- }
- public String getCover_photo() {
- return sharedPrefsXtreme.getData("cover_photo_profile");
- }
- public void setCover_photo(String cover_photo) {
- sharedPrefsXtreme.saveData("cover_photo_profile", cover_photo);
- }
- public String getUssd_code() {
- return ussd_code;
- }
- public void setUssd_code(String ussd_code) {
- this.ussd_code = ussd_code;
- }
- public String getJoin_code() {
- return join_code;
- }
- public void setJoin_code(String join_code) {
- this.join_code = join_code;
- }
- public Boolean getIsViewVisible(View view) {
- Rect rect = new Rect();
- if (view.getGlobalVisibleRect(rect)
- && view.getHeight() == rect.height()
- && view.getWidth() == rect.width()) {
- return true;
- }
- return false;
- }
- public static void setDefaultLanguage(Context context, String lang) {
- Locale locale = new Locale(lang);
- Locale.setDefault(locale);
- Configuration config = new Configuration();
- config.locale = locale;
- context.getResources().updateConfiguration(config,
- context.getResources().getDisplayMetrics());
- }
- }
Add Comment
Please, Sign In to add comment