├── .gitignore ├── .idea ├── .gitignore ├── MuslimSabha V4.2 Source Code.iml ├── codeStyles │ └── codeStyleConfig.xml ├── misc.xml ├── modules.xml └── vcs.xml ├── .vscode └── settings.json ├── GoogleService-Info.plist ├── README.md ├── __tests__ └── App-test.js ├── android ├── .gradle │ ├── 7.5.1 │ │ ├── checksums │ │ │ ├── checksums.lock │ │ │ ├── md5-checksums.bin │ │ │ └── sha1-checksums.bin │ │ ├── fileChanges │ │ │ └── last-build.bin │ │ ├── fileHashes │ │ │ └── fileHashes.lock │ │ └── gc.properties │ ├── vcs-1 │ │ └── gc.properties │ ├── workspace-id.txt │ └── workspace-id.txt.lock ├── app │ ├── BUCK │ ├── build.gradle │ ├── build_defs.bzl │ ├── debug.keystore │ ├── proguard-rules.pro │ └── src │ │ ├── debug │ │ ├── AndroidManifest.xml │ │ └── java │ │ │ └── com │ │ │ └── muslimsabha │ │ │ └── ReactNativeFlipper.java │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ └── com │ │ │ └── muslimsabha │ │ │ ├── MainActivity.java │ │ │ ├── MainApplication.java │ │ │ └── newarchitecture │ │ │ ├── MainApplicationReactNativeHost.java │ │ │ ├── components │ │ │ └── MainComponentsRegistry.java │ │ │ └── modules │ │ │ └── MainApplicationTurboModuleManagerDelegate.java │ │ ├── jni │ │ ├── CMakeLists.txt │ │ ├── MainApplicationModuleProvider.cpp │ │ ├── MainApplicationModuleProvider.h │ │ ├── MainApplicationTurboModuleManagerDelegate.cpp │ │ ├── MainApplicationTurboModuleManagerDelegate.h │ │ ├── MainComponentsRegistry.cpp │ │ ├── MainComponentsRegistry.h │ │ └── OnLoad.cpp │ │ └── res │ │ ├── drawable │ │ └── rn_edit_text_material.xml │ │ ├── mipmap-hdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-mdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ └── values │ │ ├── strings.xml │ │ └── styles.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── settings.gradle ├── app.json ├── babel.config.js ├── firebase.json ├── icons ├── add-a-text.png ├── add-color.png ├── align-center.png ├── align-left.png ├── align-right.png ├── close.png ├── color.png ├── compass-1.png ├── divider.png ├── fontsize.png ├── form100.png ├── rotate100.png ├── split-vertical.png └── water.png ├── index.js ├── ios ├── MuslimSabha.xcodeproj │ ├── project.pbxproj │ └── xcshareddata │ │ └── xcschemes │ │ └── MuslimSabha.xcscheme ├── MuslimSabha │ ├── AppDelegate.h │ ├── AppDelegate.mm │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── Contents.json │ ├── Info.plist │ ├── LaunchScreen.storyboard │ └── main.m ├── MuslimSabhaTests │ ├── Info.plist │ └── MuslimSabhaTests.m ├── Podfile └── _xcode.env ├── metro.config.js ├── package.json ├── patches └── .gitkeep ├── react-native.config.js ├── src ├── App.js ├── TabNavigation.js ├── assets │ ├── 1.png │ ├── 123.png │ ├── 2.png │ ├── 3.png │ ├── 4.png │ ├── 5.png │ ├── 6.png │ ├── BG123.png │ ├── Dua │ │ ├── AfterprayersDua.jpg │ │ ├── DailyDhikrDua.jpg │ │ ├── Faithdua.jpg │ │ ├── FamilyDua.jpg │ │ ├── Garmentdua.jpg │ │ ├── Healthdua.jpg │ │ ├── HomeEnteringandLeavingdua.jpg │ │ ├── Knowledgedua.jpg │ │ ├── MosqueEnteringDua.jpg │ │ ├── MosqueExitingDua.jpg │ │ ├── Sleepingdua.jpg │ │ ├── ToiletDu(Entering).jpg │ │ └── toiletdua(leaving).jpg │ ├── Path1.png │ ├── Path2.png │ ├── Path3.png │ ├── Path4.png │ ├── advertising.mp3 │ ├── audio │ │ └── fajr.mp3 │ ├── back.png │ ├── colors.js │ ├── compass.png │ ├── diamond.png │ ├── fonts │ │ ├── JannaLT-Regular.ttf │ │ ├── MeQuran.ttf │ │ ├── NotoSans-Medium.ttf │ │ └── NotoSans-Regular.ttf │ ├── frog.wav │ ├── icon.png │ ├── icon1.png │ ├── icon2.png │ ├── icon3.png │ ├── icon4.png │ ├── icon5.png │ ├── icon6.png │ ├── images │ │ ├── Splash.png │ │ ├── SplashIcon.png │ │ ├── back.png │ │ ├── bg.png │ │ ├── circle.png │ │ ├── diamond.png │ │ ├── icons │ │ │ ├── event.png │ │ │ ├── kaaba.png │ │ │ ├── live-streaming.png │ │ │ ├── mosque.png │ │ │ ├── praying-mat.png │ │ │ └── quran.png │ │ ├── location.png │ │ ├── locationicon.png │ │ ├── locationmosque.png │ │ ├── logo.png │ │ ├── masjid-home.png │ │ ├── masjid-home_.png │ │ └── round.png │ ├── iosStyles.js │ ├── pew2.aac │ ├── play.png │ ├── qibla.png │ ├── quran-verses.png │ ├── quranic-ayah-min.png │ ├── right.png │ ├── share.png │ └── styles.js ├── components │ ├── ArchHeader.js │ ├── ArchHero.js │ ├── ArchInput.js │ ├── ArchMenuButton.js │ ├── ArchRoundedButton.js │ └── Category.js ├── mst │ ├── actions │ │ └── userActions.js │ ├── models │ │ ├── index.js │ │ └── user.js │ └── stores │ │ └── index.js ├── routes.js ├── screens │ ├── BroadcastPlayer │ │ └── index.js │ ├── Broadcasting │ │ ├── index.js │ │ └── tabs │ │ │ ├── ListBroadcast.js │ │ │ └── LiveBroadcast.js │ ├── Dua │ │ ├── AllItems.js │ │ ├── FoodandDrink.js │ │ ├── HomeandFamily.js │ │ ├── MorningandEvening.js │ │ ├── ShowItem.js │ │ └── index.js │ ├── Event │ │ └── index.js │ ├── EventDetail │ │ └── index.js │ ├── Loading │ │ └── index.js │ ├── Login │ │ └── index.js │ ├── Masjid │ │ └── index.js │ ├── More │ │ └── index.js │ ├── Prayer │ │ ├── azan.mp3 │ │ └── index.js │ ├── PrayerTimmings │ │ └── PrayerTimes.js │ ├── Qibla │ │ └── index.js │ ├── Quran │ │ ├── index.js │ │ └── tabs │ │ │ ├── Juz.js │ │ │ └── Surah.js │ ├── QuranDetail │ │ └── index.js │ ├── Register │ │ └── index.js │ ├── Welcome │ │ └── index.js │ ├── editor │ │ └── Editor.js │ ├── image │ │ ├── Image.js │ │ └── ShareImage.js │ ├── location │ │ └── index.js │ ├── qurancopy │ │ └── index.js │ └── saeetings │ │ └── Settings.js └── services │ ├── calendar.js │ ├── init.js │ ├── location.js │ └── quran.js └── yarn.lock /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # next.js 12 | /.next/ 13 | /out/ 14 | 15 | # production 16 | /build 17 | 18 | # misc 19 | .DS_Store 20 | *.pem 21 | 22 | # debug 23 | npm-debug.log* 24 | yarn-debug.log* 25 | yarn-error.log* 26 | .pnpm-debug.log* 27 | 28 | # local env files 29 | .env*.local 30 | 31 | # vercel 32 | .vercel 33 | 34 | # typescript 35 | *.tsbuildinfo 36 | next-env.d.ts 37 | -------------------------------------------------------------------------------- /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | # Editor-based HTTP Client requests 5 | /httpRequests/ 6 | -------------------------------------------------------------------------------- /.idea/MuslimSabha V4.2 Source Code.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/codeStyles/codeStyleConfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "java.configuration.updateBuildConfiguration": "disabled" 3 | } 4 | -------------------------------------------------------------------------------- /GoogleService-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CLIENT_ID 6 | 605681006081-hvn7ef9948ssml9gca98od3vn3on1nn3.apps.googleusercontent.com 7 | REVERSED_CLIENT_ID 8 | com.googleusercontent.apps.605681006081-hvn7ef9948ssml9gca98od3vn3on1nn3 9 | API_KEY 10 | AIzaSyDvS6K-cFe5VtsGIhH-xIt4Ep7GzCRDTlo 11 | GCM_SENDER_ID 12 | 605681006081 13 | PLIST_VERSION 14 | 1 15 | BUNDLE_ID 16 | com.arch.masjidSuba 17 | PROJECT_ID 18 | masjid-speaker 19 | STORAGE_BUCKET 20 | masjid-speaker.appspot.com 21 | IS_ADS_ENABLED 22 | 23 | IS_ANALYTICS_ENABLED 24 | 25 | IS_APPINVITE_ENABLED 26 | 27 | IS_GCM_ENABLED 28 | 29 | IS_SIGNIN_ENABLED 30 | 31 | GOOGLE_APP_ID 32 | 1:605681006081:ios:0a91808a441450b58f3200 33 | DATABASE_URL 34 | https://masjid-speaker.firebaseio.com 35 | 36 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # README # 2 | 3 | React Native Development for Masjid Speaker. -------------------------------------------------------------------------------- /__tests__/App-test.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @format 3 | */ 4 | 5 | import 'react-native'; 6 | import React from 'react'; 7 | import App from '../App'; 8 | 9 | // Note: test renderer must be required after react-native. 10 | import renderer from 'react-test-renderer'; 11 | 12 | it('renders correctly', () => { 13 | renderer.create(); 14 | }); 15 | -------------------------------------------------------------------------------- /android/.gradle/7.5.1/checksums/checksums.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/android/.gradle/7.5.1/checksums/checksums.lock -------------------------------------------------------------------------------- /android/.gradle/7.5.1/checksums/md5-checksums.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/android/.gradle/7.5.1/checksums/md5-checksums.bin -------------------------------------------------------------------------------- /android/.gradle/7.5.1/checksums/sha1-checksums.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/android/.gradle/7.5.1/checksums/sha1-checksums.bin -------------------------------------------------------------------------------- /android/.gradle/7.5.1/fileChanges/last-build.bin: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /android/.gradle/7.5.1/fileHashes/fileHashes.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/android/.gradle/7.5.1/fileHashes/fileHashes.lock -------------------------------------------------------------------------------- /android/.gradle/7.5.1/gc.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/android/.gradle/7.5.1/gc.properties -------------------------------------------------------------------------------- /android/.gradle/vcs-1/gc.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/android/.gradle/vcs-1/gc.properties -------------------------------------------------------------------------------- /android/.gradle/workspace-id.txt: -------------------------------------------------------------------------------- 1 | qtb2pqcuhzgh7pdyo3m5i3fdwi -------------------------------------------------------------------------------- /android/.gradle/workspace-id.txt.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/android/.gradle/workspace-id.txt.lock -------------------------------------------------------------------------------- /android/app/BUCK: -------------------------------------------------------------------------------- 1 | # To learn about Buck see [Docs](https://buckbuild.com/). 2 | # To run your application with Buck: 3 | # - install Buck 4 | # - `npm start` - to start the packager 5 | # - `cd android` 6 | # - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"` 7 | # - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck 8 | # - `buck install -r android/app` - compile, install and run application 9 | # 10 | 11 | load(":build_defs.bzl", "create_aar_targets", "create_jar_targets") 12 | 13 | lib_deps = [] 14 | 15 | create_aar_targets(glob(["libs/*.aar"])) 16 | 17 | create_jar_targets(glob(["libs/*.jar"])) 18 | 19 | android_library( 20 | name = "all-libs", 21 | exported_deps = lib_deps, 22 | ) 23 | 24 | android_library( 25 | name = "app-code", 26 | srcs = glob([ 27 | "src/main/java/**/*.java", 28 | ]), 29 | deps = [ 30 | ":all-libs", 31 | ":build_config", 32 | ":res", 33 | ], 34 | ) 35 | 36 | android_build_config( 37 | name = "build_config", 38 | package = "com.muslimsabha", 39 | ) 40 | 41 | android_resource( 42 | name = "res", 43 | package = "com.muslimsabha", 44 | res = "src/main/res", 45 | ) 46 | 47 | android_binary( 48 | name = "app", 49 | keystore = "//android/keystores:debug", 50 | manifest = "src/main/AndroidManifest.xml", 51 | package_type = "debug", 52 | deps = [ 53 | ":app-code", 54 | ], 55 | ) 56 | -------------------------------------------------------------------------------- /android/app/build_defs.bzl: -------------------------------------------------------------------------------- 1 | """Helper definitions to glob .aar and .jar targets""" 2 | 3 | def create_aar_targets(aarfiles): 4 | for aarfile in aarfiles: 5 | name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")] 6 | lib_deps.append(":" + name) 7 | android_prebuilt_aar( 8 | name = name, 9 | aar = aarfile, 10 | ) 11 | 12 | def create_jar_targets(jarfiles): 13 | for jarfile in jarfiles: 14 | name = "jars__" + jarfile[jarfile.rindex("/") + 1:jarfile.rindex(".jar")] 15 | lib_deps.append(":" + name) 16 | prebuilt_jar( 17 | name = name, 18 | binary_jar = jarfile, 19 | ) 20 | -------------------------------------------------------------------------------- /android/app/debug.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/android/app/debug.keystore -------------------------------------------------------------------------------- /android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /android/app/src/debug/java/com/muslimsabha/ReactNativeFlipper.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | *

This source code is licensed under the MIT license found in the LICENSE file in the root 5 | * directory of this source tree. 6 | */ 7 | package com.muslimsabha; 8 | 9 | import android.content.Context; 10 | import com.facebook.flipper.android.AndroidFlipperClient; 11 | import com.facebook.flipper.android.utils.FlipperUtils; 12 | import com.facebook.flipper.core.FlipperClient; 13 | import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin; 14 | import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin; 15 | import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin; 16 | import com.facebook.flipper.plugins.inspector.DescriptorMapping; 17 | import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin; 18 | import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor; 19 | import com.facebook.flipper.plugins.network.NetworkFlipperPlugin; 20 | import com.facebook.flipper.plugins.react.ReactFlipperPlugin; 21 | import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin; 22 | import com.facebook.react.ReactInstanceEventListener; 23 | import com.facebook.react.ReactInstanceManager; 24 | import com.facebook.react.bridge.ReactContext; 25 | import com.facebook.react.modules.network.NetworkingModule; 26 | import okhttp3.OkHttpClient; 27 | 28 | public class ReactNativeFlipper { 29 | public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) { 30 | if (FlipperUtils.shouldEnableFlipper(context)) { 31 | final FlipperClient client = AndroidFlipperClient.getInstance(context); 32 | 33 | client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults())); 34 | client.addPlugin(new ReactFlipperPlugin()); 35 | client.addPlugin(new DatabasesFlipperPlugin(context)); 36 | client.addPlugin(new SharedPreferencesFlipperPlugin(context)); 37 | client.addPlugin(CrashReporterPlugin.getInstance()); 38 | 39 | NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin(); 40 | NetworkingModule.setCustomClientBuilder( 41 | new NetworkingModule.CustomClientBuilder() { 42 | @Override 43 | public void apply(OkHttpClient.Builder builder) { 44 | builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin)); 45 | } 46 | }); 47 | client.addPlugin(networkFlipperPlugin); 48 | client.start(); 49 | 50 | // Fresco Plugin needs to ensure that ImagePipelineFactory is initialized 51 | // Hence we run if after all native modules have been initialized 52 | ReactContext reactContext = reactInstanceManager.getCurrentReactContext(); 53 | if (reactContext == null) { 54 | reactInstanceManager.addReactInstanceEventListener( 55 | new ReactInstanceEventListener() { 56 | @Override 57 | public void onReactContextInitialized(ReactContext reactContext) { 58 | reactInstanceManager.removeReactInstanceEventListener(this); 59 | reactContext.runOnNativeModulesQueueThread( 60 | new Runnable() { 61 | @Override 62 | public void run() { 63 | client.addPlugin(new FrescoFlipperPlugin()); 64 | } 65 | }); 66 | } 67 | }); 68 | } else { 69 | client.addPlugin(new FrescoFlipperPlugin()); 70 | } 71 | } 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 13 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/muslimsabha/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.muslimsabha; 2 | 3 | import com.facebook.react.ReactActivity; 4 | import com.facebook.react.ReactActivityDelegate; 5 | import com.facebook.react.ReactRootView; 6 | 7 | public class MainActivity extends ReactActivity { 8 | 9 | /** 10 | * Returns the name of the main component registered from JavaScript. This is used to schedule 11 | * rendering of the component. 12 | */ 13 | @Override 14 | protected String getMainComponentName() { 15 | return "MuslimSabha"; 16 | } 17 | 18 | /** 19 | * Returns the instance of the {@link ReactActivityDelegate}. There the RootView is created and 20 | * you can specify the renderer you wish to use - the new renderer (Fabric) or the old renderer 21 | * (Paper). 22 | */ 23 | @Override 24 | protected ReactActivityDelegate createReactActivityDelegate() { 25 | return new MainActivityDelegate(this, getMainComponentName()); 26 | } 27 | 28 | public static class MainActivityDelegate extends ReactActivityDelegate { 29 | public MainActivityDelegate(ReactActivity activity, String mainComponentName) { 30 | super(activity, mainComponentName); 31 | } 32 | 33 | @Override 34 | protected ReactRootView createRootView() { 35 | ReactRootView reactRootView = new ReactRootView(getContext()); 36 | // If you opted-in for the New Architecture, we enable the Fabric Renderer. 37 | reactRootView.setIsFabric(BuildConfig.IS_NEW_ARCHITECTURE_ENABLED); 38 | return reactRootView; 39 | } 40 | 41 | @Override 42 | protected boolean isConcurrentRootEnabled() { 43 | // If you opted-in for the New Architecture, we enable Concurrent Root (i.e. React 18). 44 | // More on this on https://reactjs.org/blog/2022/03/29/react-v18.html 45 | return BuildConfig.IS_NEW_ARCHITECTURE_ENABLED; 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/muslimsabha/MainApplication.java: -------------------------------------------------------------------------------- 1 | package com.muslimsabha; 2 | 3 | import android.app.Application; 4 | import android.content.Context; 5 | import com.facebook.react.PackageList; 6 | import com.facebook.react.ReactApplication; 7 | import com.facebook.react.ReactInstanceManager; 8 | import com.facebook.react.ReactNativeHost; 9 | import com.facebook.react.ReactPackage; 10 | import com.facebook.react.config.ReactFeatureFlags; 11 | import com.facebook.soloader.SoLoader; 12 | import com.muslimsabha.newarchitecture.MainApplicationReactNativeHost; 13 | import java.lang.reflect.InvocationTargetException; 14 | import java.util.List; 15 | 16 | public class MainApplication extends Application implements ReactApplication { 17 | 18 | private final ReactNativeHost mReactNativeHost = 19 | new ReactNativeHost(this) { 20 | @Override 21 | public boolean getUseDeveloperSupport() { 22 | return BuildConfig.DEBUG; 23 | } 24 | 25 | @Override 26 | protected List getPackages() { 27 | @SuppressWarnings("UnnecessaryLocalVariable") 28 | List packages = new PackageList(this).getPackages(); 29 | // Packages that cannot be autolinked yet can be added manually here, for example: 30 | // packages.add(new MyReactNativePackage()); 31 | return packages; 32 | } 33 | 34 | @Override 35 | protected String getJSMainModuleName() { 36 | return "index"; 37 | } 38 | }; 39 | 40 | private final ReactNativeHost mNewArchitectureNativeHost = 41 | new MainApplicationReactNativeHost(this); 42 | 43 | @Override 44 | public ReactNativeHost getReactNativeHost() { 45 | if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) { 46 | return mNewArchitectureNativeHost; 47 | } else { 48 | return mReactNativeHost; 49 | } 50 | } 51 | 52 | @Override 53 | public void onCreate() { 54 | super.onCreate(); 55 | // If you opted-in for the New Architecture, we enable the TurboModule system 56 | ReactFeatureFlags.useTurboModules = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED; 57 | SoLoader.init(this, /* native exopackage */ false); 58 | initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); 59 | } 60 | 61 | /** 62 | * Loads Flipper in React Native templates. Call this in the onCreate method with something like 63 | * initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); 64 | * 65 | * @param context 66 | * @param reactInstanceManager 67 | */ 68 | private static void initializeFlipper( 69 | Context context, ReactInstanceManager reactInstanceManager) { 70 | if (BuildConfig.DEBUG) { 71 | try { 72 | /* 73 | We use reflection here to pick up the class that initializes Flipper, 74 | since Flipper library is not available in release mode 75 | */ 76 | Class aClass = Class.forName("com.muslimsabha.ReactNativeFlipper"); 77 | aClass 78 | .getMethod("initializeFlipper", Context.class, ReactInstanceManager.class) 79 | .invoke(null, context, reactInstanceManager); 80 | } catch (ClassNotFoundException e) { 81 | e.printStackTrace(); 82 | } catch (NoSuchMethodException e) { 83 | e.printStackTrace(); 84 | } catch (IllegalAccessException e) { 85 | e.printStackTrace(); 86 | } catch (InvocationTargetException e) { 87 | e.printStackTrace(); 88 | } 89 | } 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/muslimsabha/newarchitecture/MainApplicationReactNativeHost.java: -------------------------------------------------------------------------------- 1 | package com.muslimsabha.newarchitecture; 2 | 3 | import android.app.Application; 4 | import androidx.annotation.NonNull; 5 | import com.facebook.react.PackageList; 6 | import com.facebook.react.ReactInstanceManager; 7 | import com.facebook.react.ReactNativeHost; 8 | import com.facebook.react.ReactPackage; 9 | import com.facebook.react.ReactPackageTurboModuleManagerDelegate; 10 | import com.facebook.react.bridge.JSIModulePackage; 11 | import com.facebook.react.bridge.JSIModuleProvider; 12 | import com.facebook.react.bridge.JSIModuleSpec; 13 | import com.facebook.react.bridge.JSIModuleType; 14 | import com.facebook.react.bridge.JavaScriptContextHolder; 15 | import com.facebook.react.bridge.ReactApplicationContext; 16 | import com.facebook.react.bridge.UIManager; 17 | import com.facebook.react.fabric.ComponentFactory; 18 | import com.facebook.react.fabric.CoreComponentsRegistry; 19 | import com.facebook.react.fabric.FabricJSIModuleProvider; 20 | import com.facebook.react.fabric.ReactNativeConfig; 21 | import com.facebook.react.uimanager.ViewManagerRegistry; 22 | import com.muslimsabha.BuildConfig; 23 | import com.muslimsabha.newarchitecture.components.MainComponentsRegistry; 24 | import com.muslimsabha.newarchitecture.modules.MainApplicationTurboModuleManagerDelegate; 25 | import java.util.ArrayList; 26 | import java.util.List; 27 | 28 | /** 29 | * A {@link ReactNativeHost} that helps you load everything needed for the New Architecture, both 30 | * TurboModule delegates and the Fabric Renderer. 31 | * 32 | *

Please note that this class is used ONLY if you opt-in for the New Architecture (see the 33 | * `newArchEnabled` property). Is ignored otherwise. 34 | */ 35 | public class MainApplicationReactNativeHost extends ReactNativeHost { 36 | public MainApplicationReactNativeHost(Application application) { 37 | super(application); 38 | } 39 | 40 | @Override 41 | public boolean getUseDeveloperSupport() { 42 | return BuildConfig.DEBUG; 43 | } 44 | 45 | @Override 46 | protected List getPackages() { 47 | List packages = new PackageList(this).getPackages(); 48 | // Packages that cannot be autolinked yet can be added manually here, for example: 49 | // packages.add(new MyReactNativePackage()); 50 | // TurboModules must also be loaded here providing a valid TurboReactPackage implementation: 51 | // packages.add(new TurboReactPackage() { ... }); 52 | // If you have custom Fabric Components, their ViewManagers should also be loaded here 53 | // inside a ReactPackage. 54 | return packages; 55 | } 56 | 57 | @Override 58 | protected String getJSMainModuleName() { 59 | return "index"; 60 | } 61 | 62 | @NonNull 63 | @Override 64 | protected ReactPackageTurboModuleManagerDelegate.Builder 65 | getReactPackageTurboModuleManagerDelegateBuilder() { 66 | // Here we provide the ReactPackageTurboModuleManagerDelegate Builder. This is necessary 67 | // for the new architecture and to use TurboModules correctly. 68 | return new MainApplicationTurboModuleManagerDelegate.Builder(); 69 | } 70 | 71 | @Override 72 | protected JSIModulePackage getJSIModulePackage() { 73 | return new JSIModulePackage() { 74 | @Override 75 | public List getJSIModules( 76 | final ReactApplicationContext reactApplicationContext, 77 | final JavaScriptContextHolder jsContext) { 78 | final List specs = new ArrayList<>(); 79 | 80 | // Here we provide a new JSIModuleSpec that will be responsible of providing the 81 | // custom Fabric Components. 82 | specs.add( 83 | new JSIModuleSpec() { 84 | @Override 85 | public JSIModuleType getJSIModuleType() { 86 | return JSIModuleType.UIManager; 87 | } 88 | 89 | @Override 90 | public JSIModuleProvider getJSIModuleProvider() { 91 | final ComponentFactory componentFactory = new ComponentFactory(); 92 | CoreComponentsRegistry.register(componentFactory); 93 | 94 | // Here we register a Components Registry. 95 | // The one that is generated with the template contains no components 96 | // and just provides you the one from React Native core. 97 | MainComponentsRegistry.register(componentFactory); 98 | 99 | final ReactInstanceManager reactInstanceManager = getReactInstanceManager(); 100 | 101 | ViewManagerRegistry viewManagerRegistry = 102 | new ViewManagerRegistry( 103 | reactInstanceManager.getOrCreateViewManagers(reactApplicationContext)); 104 | 105 | return new FabricJSIModuleProvider( 106 | reactApplicationContext, 107 | componentFactory, 108 | ReactNativeConfig.DEFAULT_CONFIG, 109 | viewManagerRegistry); 110 | } 111 | }); 112 | return specs; 113 | } 114 | }; 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/muslimsabha/newarchitecture/components/MainComponentsRegistry.java: -------------------------------------------------------------------------------- 1 | package com.muslimsabha.newarchitecture.components; 2 | 3 | import com.facebook.jni.HybridData; 4 | import com.facebook.proguard.annotations.DoNotStrip; 5 | import com.facebook.react.fabric.ComponentFactory; 6 | import com.facebook.soloader.SoLoader; 7 | 8 | /** 9 | * Class responsible to load the custom Fabric Components. This class has native methods and needs a 10 | * corresponding C++ implementation/header file to work correctly (already placed inside the jni/ 11 | * folder for you). 12 | * 13 | *

Please note that this class is used ONLY if you opt-in for the New Architecture (see the 14 | * `newArchEnabled` property). Is ignored otherwise. 15 | */ 16 | @DoNotStrip 17 | public class MainComponentsRegistry { 18 | static { 19 | SoLoader.loadLibrary("fabricjni"); 20 | } 21 | 22 | @DoNotStrip private final HybridData mHybridData; 23 | 24 | @DoNotStrip 25 | private native HybridData initHybrid(ComponentFactory componentFactory); 26 | 27 | @DoNotStrip 28 | private MainComponentsRegistry(ComponentFactory componentFactory) { 29 | mHybridData = initHybrid(componentFactory); 30 | } 31 | 32 | @DoNotStrip 33 | public static MainComponentsRegistry register(ComponentFactory componentFactory) { 34 | return new MainComponentsRegistry(componentFactory); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/muslimsabha/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate.java: -------------------------------------------------------------------------------- 1 | package com.muslimsabha.newarchitecture.modules; 2 | 3 | import com.facebook.jni.HybridData; 4 | import com.facebook.react.ReactPackage; 5 | import com.facebook.react.ReactPackageTurboModuleManagerDelegate; 6 | import com.facebook.react.bridge.ReactApplicationContext; 7 | import com.facebook.soloader.SoLoader; 8 | import java.util.List; 9 | 10 | /** 11 | * Class responsible to load the TurboModules. This class has native methods and needs a 12 | * corresponding C++ implementation/header file to work correctly (already placed inside the jni/ 13 | * folder for you). 14 | * 15 | *

Please note that this class is used ONLY if you opt-in for the New Architecture (see the 16 | * `newArchEnabled` property). Is ignored otherwise. 17 | */ 18 | public class MainApplicationTurboModuleManagerDelegate 19 | extends ReactPackageTurboModuleManagerDelegate { 20 | 21 | private static volatile boolean sIsSoLibraryLoaded; 22 | 23 | protected MainApplicationTurboModuleManagerDelegate( 24 | ReactApplicationContext reactApplicationContext, List packages) { 25 | super(reactApplicationContext, packages); 26 | } 27 | 28 | protected native HybridData initHybrid(); 29 | 30 | native boolean canCreateTurboModule(String moduleName); 31 | 32 | public static class Builder extends ReactPackageTurboModuleManagerDelegate.Builder { 33 | protected MainApplicationTurboModuleManagerDelegate build( 34 | ReactApplicationContext context, List packages) { 35 | return new MainApplicationTurboModuleManagerDelegate(context, packages); 36 | } 37 | } 38 | 39 | @Override 40 | protected synchronized void maybeLoadOtherSoLibraries() { 41 | if (!sIsSoLibraryLoaded) { 42 | // If you change the name of your application .so file in the Android.mk file, 43 | // make sure you update the name here as well. 44 | SoLoader.loadLibrary("muslimsabha_appmodules"); 45 | sIsSoLibraryLoaded = true; 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /android/app/src/main/jni/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.13) 2 | 3 | # Define the library name here. 4 | project(muslimsabha_appmodules) 5 | 6 | # This file includes all the necessary to let you build your application with the New Architecture. 7 | include(${REACT_ANDROID_DIR}/cmake-utils/ReactNative-application.cmake) 8 | -------------------------------------------------------------------------------- /android/app/src/main/jni/MainApplicationModuleProvider.cpp: -------------------------------------------------------------------------------- 1 | #include "MainApplicationModuleProvider.h" 2 | 3 | #include 4 | #include 5 | 6 | namespace facebook { 7 | namespace react { 8 | 9 | std::shared_ptr MainApplicationModuleProvider( 10 | const std::string &moduleName, 11 | const JavaTurboModule::InitParams ¶ms) { 12 | // Here you can provide your own module provider for TurboModules coming from 13 | // either your application or from external libraries. The approach to follow 14 | // is similar to the following (for a library called `samplelibrary`: 15 | // 16 | // auto module = samplelibrary_ModuleProvider(moduleName, params); 17 | // if (module != nullptr) { 18 | // return module; 19 | // } 20 | // return rncore_ModuleProvider(moduleName, params); 21 | 22 | // Module providers autolinked by RN CLI 23 | auto rncli_module = rncli_ModuleProvider(moduleName, params); 24 | if (rncli_module != nullptr) { 25 | return rncli_module; 26 | } 27 | 28 | return rncore_ModuleProvider(moduleName, params); 29 | } 30 | 31 | } // namespace react 32 | } // namespace facebook 33 | -------------------------------------------------------------------------------- /android/app/src/main/jni/MainApplicationModuleProvider.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | #include 7 | 8 | namespace facebook { 9 | namespace react { 10 | 11 | std::shared_ptr MainApplicationModuleProvider( 12 | const std::string &moduleName, 13 | const JavaTurboModule::InitParams ¶ms); 14 | 15 | } // namespace react 16 | } // namespace facebook 17 | -------------------------------------------------------------------------------- /android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.cpp: -------------------------------------------------------------------------------- 1 | #include "MainApplicationTurboModuleManagerDelegate.h" 2 | #include "MainApplicationModuleProvider.h" 3 | 4 | namespace facebook { 5 | namespace react { 6 | 7 | jni::local_ref 8 | MainApplicationTurboModuleManagerDelegate::initHybrid( 9 | jni::alias_ref) { 10 | return makeCxxInstance(); 11 | } 12 | 13 | void MainApplicationTurboModuleManagerDelegate::registerNatives() { 14 | registerHybrid({ 15 | makeNativeMethod( 16 | "initHybrid", MainApplicationTurboModuleManagerDelegate::initHybrid), 17 | makeNativeMethod( 18 | "canCreateTurboModule", 19 | MainApplicationTurboModuleManagerDelegate::canCreateTurboModule), 20 | }); 21 | } 22 | 23 | std::shared_ptr 24 | MainApplicationTurboModuleManagerDelegate::getTurboModule( 25 | const std::string &name, 26 | const std::shared_ptr &jsInvoker) { 27 | // Not implemented yet: provide pure-C++ NativeModules here. 28 | return nullptr; 29 | } 30 | 31 | std::shared_ptr 32 | MainApplicationTurboModuleManagerDelegate::getTurboModule( 33 | const std::string &name, 34 | const JavaTurboModule::InitParams ¶ms) { 35 | return MainApplicationModuleProvider(name, params); 36 | } 37 | 38 | bool MainApplicationTurboModuleManagerDelegate::canCreateTurboModule( 39 | const std::string &name) { 40 | return getTurboModule(name, nullptr) != nullptr || 41 | getTurboModule(name, {.moduleName = name}) != nullptr; 42 | } 43 | 44 | } // namespace react 45 | } // namespace facebook 46 | -------------------------------------------------------------------------------- /android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include 5 | #include 6 | 7 | namespace facebook { 8 | namespace react { 9 | 10 | class MainApplicationTurboModuleManagerDelegate 11 | : public jni::HybridClass< 12 | MainApplicationTurboModuleManagerDelegate, 13 | TurboModuleManagerDelegate> { 14 | public: 15 | // Adapt it to the package you used for your Java class. 16 | static constexpr auto kJavaDescriptor = 17 | "Lcom/muslimsabha/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate;"; 18 | 19 | static jni::local_ref initHybrid(jni::alias_ref); 20 | 21 | static void registerNatives(); 22 | 23 | std::shared_ptr getTurboModule( 24 | const std::string &name, 25 | const std::shared_ptr &jsInvoker) override; 26 | std::shared_ptr getTurboModule( 27 | const std::string &name, 28 | const JavaTurboModule::InitParams ¶ms) override; 29 | 30 | /** 31 | * Test-only method. Allows user to verify whether a TurboModule can be 32 | * created by instances of this class. 33 | */ 34 | bool canCreateTurboModule(const std::string &name); 35 | }; 36 | 37 | } // namespace react 38 | } // namespace facebook 39 | -------------------------------------------------------------------------------- /android/app/src/main/jni/MainComponentsRegistry.cpp: -------------------------------------------------------------------------------- 1 | #include "MainComponentsRegistry.h" 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | namespace facebook { 10 | namespace react { 11 | 12 | MainComponentsRegistry::MainComponentsRegistry(ComponentFactory *delegate) {} 13 | 14 | std::shared_ptr 15 | MainComponentsRegistry::sharedProviderRegistry() { 16 | auto providerRegistry = CoreComponentsRegistry::sharedProviderRegistry(); 17 | 18 | // Autolinked providers registered by RN CLI 19 | rncli_registerProviders(providerRegistry); 20 | 21 | // Custom Fabric Components go here. You can register custom 22 | // components coming from your App or from 3rd party libraries here. 23 | // 24 | // providerRegistry->add(concreteComponentDescriptorProvider< 25 | // AocViewerComponentDescriptor>()); 26 | return providerRegistry; 27 | } 28 | 29 | jni::local_ref 30 | MainComponentsRegistry::initHybrid( 31 | jni::alias_ref, 32 | ComponentFactory *delegate) { 33 | auto instance = makeCxxInstance(delegate); 34 | 35 | auto buildRegistryFunction = 36 | [](EventDispatcher::Weak const &eventDispatcher, 37 | ContextContainer::Shared const &contextContainer) 38 | -> ComponentDescriptorRegistry::Shared { 39 | auto registry = MainComponentsRegistry::sharedProviderRegistry() 40 | ->createComponentDescriptorRegistry( 41 | {eventDispatcher, contextContainer}); 42 | 43 | auto mutableRegistry = 44 | std::const_pointer_cast(registry); 45 | 46 | mutableRegistry->setFallbackComponentDescriptor( 47 | std::make_shared( 48 | ComponentDescriptorParameters{ 49 | eventDispatcher, contextContainer, nullptr})); 50 | 51 | return registry; 52 | }; 53 | 54 | delegate->buildRegistryFunction = buildRegistryFunction; 55 | return instance; 56 | } 57 | 58 | void MainComponentsRegistry::registerNatives() { 59 | registerHybrid({ 60 | makeNativeMethod("initHybrid", MainComponentsRegistry::initHybrid), 61 | }); 62 | } 63 | 64 | } // namespace react 65 | } // namespace facebook 66 | -------------------------------------------------------------------------------- /android/app/src/main/jni/MainComponentsRegistry.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | namespace facebook { 9 | namespace react { 10 | 11 | class MainComponentsRegistry 12 | : public facebook::jni::HybridClass { 13 | public: 14 | // Adapt it to the package you used for your Java class. 15 | constexpr static auto kJavaDescriptor = 16 | "Lcom/muslimsabha/newarchitecture/components/MainComponentsRegistry;"; 17 | 18 | static void registerNatives(); 19 | 20 | MainComponentsRegistry(ComponentFactory *delegate); 21 | 22 | private: 23 | static std::shared_ptr 24 | sharedProviderRegistry(); 25 | 26 | static jni::local_ref initHybrid( 27 | jni::alias_ref, 28 | ComponentFactory *delegate); 29 | }; 30 | 31 | } // namespace react 32 | } // namespace facebook 33 | -------------------------------------------------------------------------------- /android/app/src/main/jni/OnLoad.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "MainApplicationTurboModuleManagerDelegate.h" 3 | #include "MainComponentsRegistry.h" 4 | 5 | JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *) { 6 | return facebook::jni::initialize(vm, [] { 7 | facebook::react::MainApplicationTurboModuleManagerDelegate:: 8 | registerNatives(); 9 | facebook::react::MainComponentsRegistry::registerNatives(); 10 | }); 11 | } 12 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/rn_edit_text_material.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 21 | 22 | 23 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | MuslimSabha 3 | 4 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | ext { 5 | buildToolsVersion = "31.0.0" 6 | minSdkVersion = 21 7 | compileSdkVersion = 31 8 | targetSdkVersion = 31 9 | 10 | if (System.properties['os.arch'] == "aarch64") { 11 | // For M1 Users we need to use the NDK 24 which added support for aarch64 12 | ndkVersion = "24.0.8215888" 13 | } else { 14 | // Otherwise we default to the side-by-side NDK version from AGP. 15 | ndkVersion = "21.4.7075529" 16 | } 17 | } 18 | repositories { 19 | google() 20 | mavenCentral() 21 | } 22 | dependencies { 23 | classpath("com.android.tools.build:gradle:7.2.1") 24 | classpath("com.facebook.react:react-native-gradle-plugin") 25 | classpath("de.undercouch:gradle-download-task:5.0.1") 26 | // NOTE: Do not place your application dependencies here; they belong 27 | // in the individual module build.gradle files 28 | } 29 | } 30 | 31 | allprojects { 32 | repositories { 33 | maven { 34 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm 35 | url("$rootDir/../node_modules/react-native/android") 36 | } 37 | maven { 38 | // Android JSC is installed from npm 39 | url("$rootDir/../node_modules/jsc-android/dist") 40 | } 41 | mavenCentral { 42 | // We don't want to fetch react-native from Maven Central as there are 43 | // older versions over there. 44 | content { 45 | excludeGroup "com.facebook.react" 46 | } 47 | } 48 | google() 49 | maven { url 'https://www.jitpack.io' } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx512m -XX:MaxMetaspaceSize=256m 13 | org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true 19 | 20 | # AndroidX package structure to make it clearer which packages are bundled with the 21 | # Android operating system, and which are packaged with your app's APK 22 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 23 | android.useAndroidX=true 24 | # Automatically convert third-party libraries to use AndroidX 25 | android.enableJetifier=true 26 | 27 | # Version of flipper SDK to use with React Native 28 | FLIPPER_VERSION=0.125.0 29 | 30 | # Use this property to specify which architecture you want to build. 31 | # You can also override it from the CLI using 32 | # ./gradlew -PreactNativeArchitectures=x86_64 33 | reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64 34 | 35 | # Use this property to enable support to the new architecture. 36 | # This will allow you to use TurboModules and the Fabric render in 37 | # your application. You should enable this flag either if you want 38 | # to write custom TurboModules/Fabric components OR use libraries that 39 | # are providing them. 40 | newArchEnabled=false 41 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem https://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | 17 | @if "%DEBUG%" == "" @echo off 18 | @rem ########################################################################## 19 | @rem 20 | @rem Gradle startup script for Windows 21 | @rem 22 | @rem ########################################################################## 23 | 24 | @rem Set local scope for the variables with windows NT shell 25 | if "%OS%"=="Windows_NT" setlocal 26 | 27 | set DIRNAME=%~dp0 28 | if "%DIRNAME%" == "" set DIRNAME=. 29 | set APP_BASE_NAME=%~n0 30 | set APP_HOME=%DIRNAME% 31 | 32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter. 33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 34 | 35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 37 | 38 | @rem Find java.exe 39 | if defined JAVA_HOME goto findJavaFromJavaHome 40 | 41 | set JAVA_EXE=java.exe 42 | %JAVA_EXE% -version >NUL 2>&1 43 | if "%ERRORLEVEL%" == "0" goto execute 44 | 45 | echo. 46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 47 | echo. 48 | echo Please set the JAVA_HOME variable in your environment to match the 49 | echo location of your Java installation. 50 | 51 | goto fail 52 | 53 | :findJavaFromJavaHome 54 | set JAVA_HOME=%JAVA_HOME:"=% 55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 56 | 57 | if exist "%JAVA_EXE%" goto execute 58 | 59 | echo. 60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 61 | echo. 62 | echo Please set the JAVA_HOME variable in your environment to match the 63 | echo location of your Java installation. 64 | 65 | goto fail 66 | 67 | :execute 68 | @rem Setup the command line 69 | 70 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 71 | 72 | 73 | @rem Execute Gradle 74 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* 75 | 76 | :end 77 | @rem End local scope for the variables with windows NT shell 78 | if "%ERRORLEVEL%"=="0" goto mainEnd 79 | 80 | :fail 81 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 82 | rem the _cmd.exe /c_ return code! 83 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 84 | exit /b 1 85 | 86 | :mainEnd 87 | if "%OS%"=="Windows_NT" endlocal 88 | 89 | :omega 90 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'MuslimSabha' 2 | apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) 3 | include ':app' 4 | includeBuild('../node_modules/react-native-gradle-plugin') 5 | 6 | if (settings.hasProperty("newArchEnabled") && settings.newArchEnabled == "true") { 7 | include(":ReactAndroid") 8 | project(":ReactAndroid").projectDir = file('../node_modules/react-native/ReactAndroid') 9 | include(":ReactAndroid:hermes-engine") 10 | project(":ReactAndroid:hermes-engine").projectDir = file('../node_modules/react-native/ReactAndroid/hermes-engine') 11 | } 12 | -------------------------------------------------------------------------------- /app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "MuslimSabha", 3 | "displayName": "MuslimSabha" 4 | } 5 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['module:metro-react-native-babel-preset'], 3 | }; 4 | -------------------------------------------------------------------------------- /firebase.json: -------------------------------------------------------------------------------- 1 | { 2 | "react-native": { 3 | "ml_vision_face_model": true, 4 | "ml_vision_ocr_model": true, 5 | "ml_vision_barcode_model": true, 6 | "ml_vision_label_model": true, 7 | "ml_vision_image_label_model": true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /icons/add-a-text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/icons/add-a-text.png -------------------------------------------------------------------------------- /icons/add-color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/icons/add-color.png -------------------------------------------------------------------------------- /icons/align-center.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/icons/align-center.png -------------------------------------------------------------------------------- /icons/align-left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/icons/align-left.png -------------------------------------------------------------------------------- /icons/align-right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/icons/align-right.png -------------------------------------------------------------------------------- /icons/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/icons/close.png -------------------------------------------------------------------------------- /icons/color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/icons/color.png -------------------------------------------------------------------------------- /icons/compass-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/icons/compass-1.png -------------------------------------------------------------------------------- /icons/divider.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/icons/divider.png -------------------------------------------------------------------------------- /icons/fontsize.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/icons/fontsize.png -------------------------------------------------------------------------------- /icons/form100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/icons/form100.png -------------------------------------------------------------------------------- /icons/rotate100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/icons/rotate100.png -------------------------------------------------------------------------------- /icons/split-vertical.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/icons/split-vertical.png -------------------------------------------------------------------------------- /icons/water.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/icons/water.png -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable prettier/prettier */ 2 | /** 3 | * @format 4 | */ 5 | import React from 'react'; 6 | import { AppRegistry } from 'react-native'; 7 | import { Provider } from 'mobx-react'; 8 | import App from './src/App'; 9 | import store from './src/mst/stores'; 10 | import { name as appName } from './app.json'; 11 | 12 | const masjidSuba = () => ( 13 | 14 | 15 | 16 | ); 17 | 18 | AppRegistry.registerComponent(appName, () => masjidSuba); 19 | -------------------------------------------------------------------------------- /ios/MuslimSabha.xcodeproj/xcshareddata/xcschemes/MuslimSabha.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 53 | 55 | 61 | 62 | 63 | 64 | 70 | 72 | 78 | 79 | 80 | 81 | 83 | 84 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /ios/MuslimSabha/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface AppDelegate : UIResponder 5 | 6 | @property (nonatomic, strong) UIWindow *window; 7 | 8 | @end 9 | -------------------------------------------------------------------------------- /ios/MuslimSabha/AppDelegate.mm: -------------------------------------------------------------------------------- 1 | #import "AppDelegate.h" 2 | 3 | #import 4 | #import 5 | #import 6 | 7 | #import 8 | 9 | #if RCT_NEW_ARCH_ENABLED 10 | #import 11 | #import 12 | #import 13 | #import 14 | #import 15 | #import 16 | 17 | #import 18 | 19 | static NSString *const kRNConcurrentRoot = @"concurrentRoot"; 20 | 21 | @interface AppDelegate () { 22 | RCTTurboModuleManager *_turboModuleManager; 23 | RCTSurfacePresenterBridgeAdapter *_bridgeAdapter; 24 | std::shared_ptr _reactNativeConfig; 25 | facebook::react::ContextContainer::Shared _contextContainer; 26 | } 27 | @end 28 | #endif 29 | 30 | @implementation AppDelegate 31 | 32 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 33 | { 34 | RCTAppSetupPrepareApp(application); 35 | 36 | RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions]; 37 | 38 | #if RCT_NEW_ARCH_ENABLED 39 | _contextContainer = std::make_shared(); 40 | _reactNativeConfig = std::make_shared(); 41 | _contextContainer->insert("ReactNativeConfig", _reactNativeConfig); 42 | _bridgeAdapter = [[RCTSurfacePresenterBridgeAdapter alloc] initWithBridge:bridge contextContainer:_contextContainer]; 43 | bridge.surfacePresenter = _bridgeAdapter.surfacePresenter; 44 | #endif 45 | 46 | NSDictionary *initProps = [self prepareInitialProps]; 47 | UIView *rootView = RCTAppSetupDefaultRootView(bridge, @"MuslimSabha", initProps); 48 | 49 | if (@available(iOS 13.0, *)) { 50 | rootView.backgroundColor = [UIColor systemBackgroundColor]; 51 | } else { 52 | rootView.backgroundColor = [UIColor whiteColor]; 53 | } 54 | 55 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; 56 | UIViewController *rootViewController = [UIViewController new]; 57 | rootViewController.view = rootView; 58 | self.window.rootViewController = rootViewController; 59 | [self.window makeKeyAndVisible]; 60 | return YES; 61 | } 62 | 63 | /// This method controls whether the `concurrentRoot`feature of React18 is turned on or off. 64 | /// 65 | /// @see: https://reactjs.org/blog/2022/03/29/react-v18.html 66 | /// @note: This requires to be rendering on Fabric (i.e. on the New Architecture). 67 | /// @return: `true` if the `concurrentRoot` feture is enabled. Otherwise, it returns `false`. 68 | - (BOOL)concurrentRootEnabled 69 | { 70 | // Switch this bool to turn on and off the concurrent root 71 | return true; 72 | } 73 | 74 | - (NSDictionary *)prepareInitialProps 75 | { 76 | NSMutableDictionary *initProps = [NSMutableDictionary new]; 77 | 78 | #ifdef RCT_NEW_ARCH_ENABLED 79 | initProps[kRNConcurrentRoot] = @([self concurrentRootEnabled]); 80 | #endif 81 | 82 | return initProps; 83 | } 84 | 85 | - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge 86 | { 87 | #if DEBUG 88 | return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"]; 89 | #else 90 | return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; 91 | #endif 92 | } 93 | 94 | #if RCT_NEW_ARCH_ENABLED 95 | 96 | #pragma mark - RCTCxxBridgeDelegate 97 | 98 | - (std::unique_ptr)jsExecutorFactoryForBridge:(RCTBridge *)bridge 99 | { 100 | _turboModuleManager = [[RCTTurboModuleManager alloc] initWithBridge:bridge 101 | delegate:self 102 | jsInvoker:bridge.jsCallInvoker]; 103 | return RCTAppSetupDefaultJsExecutorFactory(bridge, _turboModuleManager); 104 | } 105 | 106 | #pragma mark RCTTurboModuleManagerDelegate 107 | 108 | - (Class)getModuleClassFromName:(const char *)name 109 | { 110 | return RCTCoreModulesClassProvider(name); 111 | } 112 | 113 | - (std::shared_ptr)getTurboModule:(const std::string &)name 114 | jsInvoker:(std::shared_ptr)jsInvoker 115 | { 116 | return nullptr; 117 | } 118 | 119 | - (std::shared_ptr)getTurboModule:(const std::string &)name 120 | initParams: 121 | (const facebook::react::ObjCTurboModule::InitParams &)params 122 | { 123 | return nullptr; 124 | } 125 | 126 | - (id)getModuleInstanceFromClass:(Class)moduleClass 127 | { 128 | return RCTAppSetupDefaultModuleFromClass(moduleClass); 129 | } 130 | 131 | #endif 132 | 133 | @end 134 | -------------------------------------------------------------------------------- /ios/MuslimSabha/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "scale" : "2x", 6 | "size" : "20x20" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "scale" : "3x", 11 | "size" : "20x20" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "2x", 16 | "size" : "29x29" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "scale" : "3x", 21 | "size" : "29x29" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "scale" : "2x", 26 | "size" : "40x40" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "scale" : "3x", 31 | "size" : "40x40" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "scale" : "2x", 36 | "size" : "60x60" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "scale" : "3x", 41 | "size" : "60x60" 42 | }, 43 | { 44 | "idiom" : "ios-marketing", 45 | "scale" : "1x", 46 | "size" : "1024x1024" 47 | } 48 | ], 49 | "info" : { 50 | "author" : "xcode", 51 | "version" : 1 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /ios/MuslimSabha/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /ios/MuslimSabha/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | MuslimSabha 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | LSRequiresIPhoneOS 26 | 27 | NSAppTransportSecurity 28 | 29 | NSExceptionDomains 30 | 31 | localhost 32 | 33 | NSExceptionAllowsInsecureHTTPLoads 34 | 35 | 36 | 37 | 38 | NSLocationWhenInUseUsageDescription 39 | 40 | UILaunchStoryboardName 41 | LaunchScreen 42 | UIRequiredDeviceCapabilities 43 | 44 | armv7 45 | 46 | UISupportedInterfaceOrientations 47 | 48 | UIInterfaceOrientationPortrait 49 | UIInterfaceOrientationLandscapeLeft 50 | UIInterfaceOrientationLandscapeRight 51 | 52 | UIViewControllerBasedStatusBarAppearance 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /ios/MuslimSabha/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 24 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /ios/MuslimSabha/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char *argv[]) 6 | { 7 | @autoreleasepool { 8 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /ios/MuslimSabhaTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /ios/MuslimSabhaTests/MuslimSabhaTests.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | #import 5 | #import 6 | 7 | #define TIMEOUT_SECONDS 600 8 | #define TEXT_TO_LOOK_FOR @"Welcome to React" 9 | 10 | @interface MuslimSabhaTests : XCTestCase 11 | 12 | @end 13 | 14 | @implementation MuslimSabhaTests 15 | 16 | - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL (^)(UIView *view))test 17 | { 18 | if (test(view)) { 19 | return YES; 20 | } 21 | for (UIView *subview in [view subviews]) { 22 | if ([self findSubviewInView:subview matching:test]) { 23 | return YES; 24 | } 25 | } 26 | return NO; 27 | } 28 | 29 | - (void)testRendersWelcomeScreen 30 | { 31 | UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController]; 32 | NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS]; 33 | BOOL foundElement = NO; 34 | 35 | __block NSString *redboxError = nil; 36 | #ifdef DEBUG 37 | RCTSetLogFunction( 38 | ^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) { 39 | if (level >= RCTLogLevelError) { 40 | redboxError = message; 41 | } 42 | }); 43 | #endif 44 | 45 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) { 46 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 47 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 48 | 49 | foundElement = [self findSubviewInView:vc.view 50 | matching:^BOOL(UIView *view) { 51 | if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { 52 | return YES; 53 | } 54 | return NO; 55 | }]; 56 | } 57 | 58 | #ifdef DEBUG 59 | RCTSetLogFunction(RCTDefaultLogFunction); 60 | #endif 61 | 62 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError); 63 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS); 64 | } 65 | 66 | @end 67 | -------------------------------------------------------------------------------- /ios/Podfile: -------------------------------------------------------------------------------- 1 | require_relative '../node_modules/react-native/scripts/react_native_pods' 2 | require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules' 3 | 4 | platform :ios, '12.4' 5 | install! 'cocoapods', :deterministic_uuids => false 6 | 7 | target 'MuslimSabha' do 8 | config = use_native_modules! 9 | 10 | # Flags change depending on the env values. 11 | flags = get_default_flags() 12 | 13 | use_react_native!( 14 | :path => config[:reactNativePath], 15 | # Hermes is now enabled by default. Disable by setting this flag to false. 16 | # Upcoming versions of React Native may rely on get_default_flags(), but 17 | # we make it explicit here to aid in the React Native upgrade process. 18 | :hermes_enabled => true, 19 | :fabric_enabled => flags[:fabric_enabled], 20 | # Enables Flipper. 21 | # 22 | # Note that if you have use_frameworks! enabled, Flipper will not work and 23 | # you should disable the next line. 24 | :flipper_configuration => FlipperConfiguration.enabled, 25 | # An absolute path to your application root. 26 | :app_path => "#{Pod::Config.instance.installation_root}/.." 27 | ) 28 | 29 | target 'MuslimSabhaTests' do 30 | inherit! :complete 31 | # Pods for testing 32 | end 33 | 34 | post_install do |installer| 35 | react_native_post_install( 36 | installer, 37 | # Set `mac_catalyst_enabled` to `true` in order to apply patches 38 | # necessary for Mac Catalyst builds 39 | :mac_catalyst_enabled => false 40 | ) 41 | __apply_Xcode_12_5_M1_post_install_workaround(installer) 42 | end 43 | end 44 | -------------------------------------------------------------------------------- /ios/_xcode.env: -------------------------------------------------------------------------------- 1 | # This `.xcode.env` file is versioned and is used to source the environment 2 | # used when running script phases inside Xcode. 3 | # To customize your local environment, you can create an `.xcode.env.local` 4 | # file that is not versioned. 5 | 6 | # NODE_BINARY variable contains the PATH to the node executable. 7 | # 8 | # Customize the NODE_BINARY variable here. 9 | # For example, to use nvm with brew, add the following line 10 | # . "$(brew --prefix nvm)/nvm.sh" --no-use 11 | export NODE_BINARY=$(command -v node) 12 | -------------------------------------------------------------------------------- /metro.config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Metro configuration for React Native 3 | * https://github.com/facebook/react-native 4 | * 5 | * @format 6 | */ 7 | 8 | module.exports = { 9 | transformer: { 10 | getTransformOptions: async () => ({ 11 | transform: { 12 | experimentalImportSupport: false, 13 | inlineRequires: false, 14 | }, 15 | }), 16 | }, 17 | }; 18 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "masjid_speaker", 3 | "version": "6.0.1", 4 | "private": true, 5 | "scripts": { 6 | "start": "react-native start", 7 | "run:android": "react-native run-android", 8 | "run:ios": "react-native run-ios --simulator=\"iPhone 8\"", 9 | "build:apk": "cd android && ./gradlew assembleRelease", 10 | "test": "jest", 11 | "prepare": "patch-package" 12 | }, 13 | "resolutions": { 14 | "glob": "7.2.0" 15 | }, 16 | "dependencies": { 17 | "@react-native-community/cameraroll": "^4.0.4", 18 | "@react-native-community/cli-platform-android": "^9.1.0", 19 | "@react-native-community/geolocation": "^2.0.2", 20 | "@react-native-community/masked-view": "^0.1.10", 21 | "@react-native-community/slider": "^3.0.3", 22 | "@react-native-firebase/app": "^6.0.2", 23 | "@react-native-firebase/auth": "^6.0.2", 24 | "@react-native-firebase/database": "^6.0.2", 25 | "@react-native-firebase/firestore": "6.0.2", 26 | "axios": "^0.19.0", 27 | "fbjs": "^3.0.0", 28 | "geolib": "^3.0.4", 29 | "glob": "7.2.0", 30 | "metro-core": "^0.73.1", 31 | "mobx": "^5.14.0", 32 | "mobx-react": "^6.1.4", 33 | "mobx-state-tree": "^3.14.1", 34 | "moment": "^2.29.1", 35 | "native-base": "^2.13.8", 36 | "react": "18.1.0", 37 | "react-native": "^0.70.2", 38 | "react-native-admob": "^1.3.2", 39 | "react-native-camera": "^3.7.2", 40 | "react-native-circular-progress": "^1.3.3", 41 | "react-native-cn-quill": "^0.7.0", 42 | "react-native-cn-richtext-editor": "^1.0.43", 43 | "react-native-compass-heading": "^1.0.2", 44 | "react-native-drag-text-editor": "^0.0.7", 45 | "react-native-easy-grid": "^0.2.2", 46 | "react-native-eject": "^0.1.2", 47 | "react-native-elements": "^1.2.6", 48 | "react-native-fs": "^2.14.1", 49 | "react-native-geocoding": "^0.4.0", 50 | "react-native-gesture-handler": "^1.10.3", 51 | "react-native-image-slider-box": "^1.0.12", 52 | "react-native-linear-gradient": "^2.5.6", 53 | "react-native-maps": "^0.26.1", 54 | "react-native-open-maps": "^0.3.4", 55 | "react-native-paper": "^4.9.2", 56 | "react-native-pell-rich-editor": "^1.8.5", 57 | "react-native-popup-menu": "^0.15.10", 58 | "react-native-reanimated": "^1.13.3", 59 | "react-native-responsive-screen": "^1.4.2", 60 | "react-native-safe-area-context": "^3.2.0", 61 | "react-native-screens": "^1.0.0-alpha.23", 62 | "react-native-share": "^6.3.0", 63 | "react-native-snap-carousel": "^3.9.1", 64 | "react-native-sound": "^0.11.0", 65 | "react-native-svg": "^9.13.3", 66 | "react-native-vector-icons": "9.2.0", 67 | "react-native-view-shot": "^3.1.2", 68 | "react-native-web": "^0.18.9", 69 | "react-native-webview": "^11.6.2", 70 | "react-navigation": "^4.0.10", 71 | "react-navigation-stack": "^1.9.4", 72 | "react-navigation-tabs": "^2.11.1", 73 | "utf8": "^3.0.0" 74 | }, 75 | "devDependencies": { 76 | "@babel/core": "^7.6.2", 77 | "@babel/runtime": "^7.6.2", 78 | "@react-native-community/cli": "^2.9.0", 79 | "@react-native-community/eslint-config": "^0.0.5", 80 | "babel-jest": "^24.9.0", 81 | "eslint": "^6.4.0", 82 | "eslint-config-prettier": "^6.4.0", 83 | "eslint-plugin-prettier": "^3.1.1", 84 | "jest": "^24.8.0", 85 | "metro-react-native-babel-preset": "^0.56.0", 86 | "patch-package": "^6.1.4", 87 | "react-test-renderer": "16.9.0" 88 | }, 89 | "jest": { 90 | "preset": "react-native" 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /patches/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/patches/.gitkeep -------------------------------------------------------------------------------- /react-native.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | project: { 3 | ios: {}, 4 | android: {}, 5 | }, 6 | assets: ['./src/assets/fonts/'], 7 | }; -------------------------------------------------------------------------------- /src/App.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable prettier/prettier */ 2 | import Routes from "./routes"; 3 | 4 | const App = Routes; 5 | 6 | export default App; 7 | -------------------------------------------------------------------------------- /src/TabNavigation.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { Text, View } from "react-native"; 3 | import { createAppContainer } from "react-navigation"; 4 | import { createBottomTabNavigator } from "react-navigation-tabs"; 5 | import PrayerScreen from "./screens/Prayer"; 6 | import QiblaScreen from "./screens/Qibla"; 7 | import QuranScreen from "./screens/Quran"; 8 | import WelcomeScreen from "./screens/Welcome"; 9 | 10 | import Ionicons from "react-native-vector-icons/Ionicons"; 11 | import Ionicons1 from "react-native-vector-icons/Fontisto"; 12 | import Ionicons2 from "react-native-vector-icons/Feather"; 13 | import Ionicons3 from "react-native-vector-icons/FontAwesome5"; 14 | import Ionicons4 from "react-native-vector-icons/Entypo"; 15 | import { Dua } from "./screens/Dua"; 16 | 17 | class HomeScreen extends React.Component { 18 | render() { 19 | return ( 20 | 21 | Home! 22 | 23 | ); 24 | } 25 | } 26 | 27 | class SettingsScreen extends React.Component { 28 | render() { 29 | return ( 30 | 31 | Settings! 32 | 33 | ); 34 | } 35 | } 36 | 37 | const TabNavigator = createBottomTabNavigator( 38 | { 39 | Home: PrayerScreen, 40 | Qibla: QiblaScreen, 41 | AlQuran: QuranScreen, 42 | Dua: Dua, 43 | More: WelcomeScreen, 44 | }, 45 | { 46 | defaultNavigationOptions: ({ navigation }) => ({ 47 | tabBarIcon: ({ focused, horizontal, tintColor }) => { 48 | const { routeName } = navigation.state; 49 | let IconComponent = Ionicons; 50 | let IconComponent1 = Ionicons1; 51 | let IconComponent2 = Ionicons2; 52 | let IconComponent3 = Ionicons3; 53 | let IconComponent4 = Ionicons4; 54 | let iconName; 55 | if (routeName === "Home") { 56 | return ( 57 | 58 | ); 59 | // iconName = focused 60 | // ? 'ios-home' 61 | // : 'ios-home'; 62 | // // Sometimes we want to add badges to some icons. 63 | // // You can check the implementation below. 64 | // // IconComponent = HomeIconWithBadge; 65 | } else if (routeName === "Qibla") { 66 | // iconName = focused ? 'compass-outline' : 'compass-outline'; 67 | return ( 68 | 69 | ); 70 | } else if (routeName === "AlQuran") { 71 | // iconName = focused ? 'compass-outline' : 'compass-outline'; 72 | return ( 73 | 74 | ); 75 | } else if (routeName === "Dua") { 76 | // iconName = focused ? 'compass-outline' : 'compass-outline'; 77 | return ( 78 | 79 | ); 80 | } else if (routeName === "More") { 81 | // iconName = focused ? 'compass-outline' : 'compass-outline'; 82 | return ( 83 | 88 | ); 89 | } 90 | 91 | // You can return any component that you like here! 92 | }, 93 | }), 94 | tabBarOptions: { 95 | activeTintColor: "#07A851", 96 | inactiveTintColor: "gray", 97 | }, 98 | } 99 | ); 100 | 101 | export default createAppContainer(TabNavigator); 102 | -------------------------------------------------------------------------------- /src/assets/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/1.png -------------------------------------------------------------------------------- /src/assets/123.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/123.png -------------------------------------------------------------------------------- /src/assets/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/2.png -------------------------------------------------------------------------------- /src/assets/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/3.png -------------------------------------------------------------------------------- /src/assets/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/4.png -------------------------------------------------------------------------------- /src/assets/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/5.png -------------------------------------------------------------------------------- /src/assets/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/6.png -------------------------------------------------------------------------------- /src/assets/BG123.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/BG123.png -------------------------------------------------------------------------------- /src/assets/Dua/AfterprayersDua.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/Dua/AfterprayersDua.jpg -------------------------------------------------------------------------------- /src/assets/Dua/DailyDhikrDua.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/Dua/DailyDhikrDua.jpg -------------------------------------------------------------------------------- /src/assets/Dua/Faithdua.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/Dua/Faithdua.jpg -------------------------------------------------------------------------------- /src/assets/Dua/FamilyDua.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/Dua/FamilyDua.jpg -------------------------------------------------------------------------------- /src/assets/Dua/Garmentdua.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/Dua/Garmentdua.jpg -------------------------------------------------------------------------------- /src/assets/Dua/Healthdua.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/Dua/Healthdua.jpg -------------------------------------------------------------------------------- /src/assets/Dua/HomeEnteringandLeavingdua.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/Dua/HomeEnteringandLeavingdua.jpg -------------------------------------------------------------------------------- /src/assets/Dua/Knowledgedua.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/Dua/Knowledgedua.jpg -------------------------------------------------------------------------------- /src/assets/Dua/MosqueEnteringDua.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/Dua/MosqueEnteringDua.jpg -------------------------------------------------------------------------------- /src/assets/Dua/MosqueExitingDua.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/Dua/MosqueExitingDua.jpg -------------------------------------------------------------------------------- /src/assets/Dua/Sleepingdua.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/Dua/Sleepingdua.jpg -------------------------------------------------------------------------------- /src/assets/Dua/ToiletDu(Entering).jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/Dua/ToiletDu(Entering).jpg -------------------------------------------------------------------------------- /src/assets/Dua/toiletdua(leaving).jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/Dua/toiletdua(leaving).jpg -------------------------------------------------------------------------------- /src/assets/Path1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/Path1.png -------------------------------------------------------------------------------- /src/assets/Path2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/Path2.png -------------------------------------------------------------------------------- /src/assets/Path3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/Path3.png -------------------------------------------------------------------------------- /src/assets/Path4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/Path4.png -------------------------------------------------------------------------------- /src/assets/advertising.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/advertising.mp3 -------------------------------------------------------------------------------- /src/assets/audio/fajr.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/audio/fajr.mp3 -------------------------------------------------------------------------------- /src/assets/back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/back.png -------------------------------------------------------------------------------- /src/assets/colors.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable prettier/prettier */ 2 | const colors = { 3 | primaryColor: '#0ad48b', 4 | secondaryColor: '#13eba2', 5 | thirdColor: '#3bfeb8', 6 | backgroundColor: '#ffffff', 7 | homeButtonBgColor: '#e5e5e5', 8 | grey: '#979797' 9 | }; 10 | 11 | export default colors; 12 | -------------------------------------------------------------------------------- /src/assets/compass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/compass.png -------------------------------------------------------------------------------- /src/assets/diamond.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/diamond.png -------------------------------------------------------------------------------- /src/assets/fonts/JannaLT-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/fonts/JannaLT-Regular.ttf -------------------------------------------------------------------------------- /src/assets/fonts/MeQuran.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/fonts/MeQuran.ttf -------------------------------------------------------------------------------- /src/assets/fonts/NotoSans-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/fonts/NotoSans-Medium.ttf -------------------------------------------------------------------------------- /src/assets/fonts/NotoSans-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/fonts/NotoSans-Regular.ttf -------------------------------------------------------------------------------- /src/assets/frog.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/frog.wav -------------------------------------------------------------------------------- /src/assets/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/icon.png -------------------------------------------------------------------------------- /src/assets/icon1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/icon1.png -------------------------------------------------------------------------------- /src/assets/icon2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/icon2.png -------------------------------------------------------------------------------- /src/assets/icon3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/icon3.png -------------------------------------------------------------------------------- /src/assets/icon4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/icon4.png -------------------------------------------------------------------------------- /src/assets/icon5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/icon5.png -------------------------------------------------------------------------------- /src/assets/icon6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/icon6.png -------------------------------------------------------------------------------- /src/assets/images/Splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/images/Splash.png -------------------------------------------------------------------------------- /src/assets/images/SplashIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/images/SplashIcon.png -------------------------------------------------------------------------------- /src/assets/images/back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/images/back.png -------------------------------------------------------------------------------- /src/assets/images/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/images/bg.png -------------------------------------------------------------------------------- /src/assets/images/circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/images/circle.png -------------------------------------------------------------------------------- /src/assets/images/diamond.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/images/diamond.png -------------------------------------------------------------------------------- /src/assets/images/icons/event.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/images/icons/event.png -------------------------------------------------------------------------------- /src/assets/images/icons/kaaba.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/images/icons/kaaba.png -------------------------------------------------------------------------------- /src/assets/images/icons/live-streaming.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/images/icons/live-streaming.png -------------------------------------------------------------------------------- /src/assets/images/icons/mosque.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/images/icons/mosque.png -------------------------------------------------------------------------------- /src/assets/images/icons/praying-mat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/images/icons/praying-mat.png -------------------------------------------------------------------------------- /src/assets/images/icons/quran.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/images/icons/quran.png -------------------------------------------------------------------------------- /src/assets/images/location.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/images/location.png -------------------------------------------------------------------------------- /src/assets/images/locationicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/images/locationicon.png -------------------------------------------------------------------------------- /src/assets/images/locationmosque.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/images/locationmosque.png -------------------------------------------------------------------------------- /src/assets/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/images/logo.png -------------------------------------------------------------------------------- /src/assets/images/masjid-home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/images/masjid-home.png -------------------------------------------------------------------------------- /src/assets/images/masjid-home_.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/images/masjid-home_.png -------------------------------------------------------------------------------- /src/assets/images/round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/images/round.png -------------------------------------------------------------------------------- /src/assets/iosStyles.js: -------------------------------------------------------------------------------- 1 | import { StyleSheet } from 'react-native' 2 | import colors from './colors' 3 | const iosStyles = { 4 | btnView: { 5 | alignSelf: 'stretch', 6 | marginLeft: 10, 7 | marginRight: 10, 8 | }, 9 | btnRounded: { 10 | height:50, 11 | flexDirection: 'row', 12 | justifyContent: 'center', 13 | alignItems: 'center' 14 | } 15 | } 16 | 17 | export default iosStyles -------------------------------------------------------------------------------- /src/assets/pew2.aac: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/pew2.aac -------------------------------------------------------------------------------- /src/assets/play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/play.png -------------------------------------------------------------------------------- /src/assets/qibla.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/qibla.png -------------------------------------------------------------------------------- /src/assets/quran-verses.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/quran-verses.png -------------------------------------------------------------------------------- /src/assets/quranic-ayah-min.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/quranic-ayah-min.png -------------------------------------------------------------------------------- /src/assets/right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/right.png -------------------------------------------------------------------------------- /src/assets/share.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sailingdev/MuslimSabha_reactnative/3ae472c38cd83ec11c1f0ea13b1eb61ee4a823be/src/assets/share.png -------------------------------------------------------------------------------- /src/assets/styles.js: -------------------------------------------------------------------------------- 1 | import { StyleSheet, Platform } from "react-native"; 2 | import colors from "./colors"; 3 | const styles = { 4 | headerBar: { 5 | flex: 1, 6 | backgroundColor: colors.primaryColor, 7 | marginTop: 0, 8 | }, 9 | centerTitle: { 10 | flex: 3, 11 | justifyContent: "center", 12 | alignItems: "center", 13 | borderBottom: 0, 14 | }, 15 | cardHero: { 16 | flex: 1, 17 | marginTop: -1, 18 | marginLeft: 0, 19 | marginRight: 0, 20 | }, 21 | cardItemHero: { 22 | flex: 1, 23 | marginTop: 0, 24 | paddingTop: 0, 25 | }, 26 | imageHero: { 27 | flex: 1, 28 | height: 250, 29 | width: null, 30 | alignItems: "center", 31 | justifyContent: "center", 32 | }, 33 | menuCol: { 34 | padding: 5, 35 | justifyContent: "center", 36 | alignItems: "center", 37 | }, 38 | menuRow: { marginTop: 20 }, 39 | timeTitle: { 40 | color: "#ffffff", 41 | fontSize: 50, 42 | }, 43 | dateTitle: { 44 | color: "#ffffff", 45 | fontSize: 30, 46 | marginTop: 15, 47 | }, 48 | dateSubTitle: { 49 | color: "#ffffff", 50 | fontSize: 20, 51 | marginTop: 15, 52 | }, 53 | errorTextStyle: { 54 | fontSize: 20, 55 | alignSelf: "center", 56 | color: "red", 57 | }, 58 | cardStyle: { 59 | flex: 1, 60 | flexDirection: "row", 61 | }, 62 | buttonStyle: { 63 | padding: 30, 64 | backgroundColor: colors.primaryColor, 65 | borderRadius: 5, 66 | }, 67 | overlay: { 68 | ...StyleSheet.absoluteFillObject, 69 | backgroundColor: "rgba(0,0,0,0.3)", 70 | }, 71 | overlayWhite: { 72 | ...StyleSheet.absoluteFillObject, 73 | backgroundColor: "rgba(255,255,255,0.4)", 74 | }, 75 | heroText: { 76 | ...StyleSheet.absoluteFillObject, 77 | alignItems: "center", 78 | justifyContent: "center", 79 | }, 80 | heroTextEvent: { 81 | ...StyleSheet.absoluteFillObject, 82 | alignItems: "flex-start", 83 | justifyContent: "center", 84 | paddingLeft: 10, 85 | }, 86 | headerTitle: { 87 | fontSize: 25, 88 | fontWeight: "bold", 89 | }, 90 | tabs: { 91 | backgroundColor: colors.primaryColor, 92 | }, 93 | tab: { 94 | backgroundColor: colors.backgroundColor, 95 | }, 96 | tabActive: { 97 | backgroundColor: colors.backgroundColor, 98 | color: colors.primaryColor, 99 | }, 100 | avaNumber: { 101 | fontWeight: "bold", 102 | fontSize: 20, 103 | }, 104 | txtBold: { fontSize: 15, fontWeight: "bold" }, 105 | txtBoldPrimary: { 106 | fontSize: 16, 107 | // fontWeight: "bold", 108 | color: "black", 109 | }, 110 | txtArabicBoldPrimary: { 111 | fontFamily: "MeQuran", 112 | fontSize: 14, 113 | // fontWeight: "bold", 114 | color: colors.primaryColor, 115 | }, 116 | txtBoldLarge: { fontSize: 20, fontWeight: "bold", color: colors.grey }, 117 | txtLarge: { fontSize: 20, color: colors.grey }, 118 | leftNumber: { 119 | flex: 1, 120 | width: 50, 121 | }, 122 | txtArabicBold: { 123 | fontSize: 30, 124 | color: "black", 125 | fontFamily: "MeQuran", 126 | }, 127 | listAyah: { 128 | flex: 1, 129 | height: null, 130 | marginTop: 10, 131 | }, 132 | bismillah: { 133 | borderBottom: 0, 134 | marginBottom: 10, 135 | }, 136 | viewInput: { 137 | backgroundColor: colors.primaryColor, 138 | paddingTop: 5, 139 | paddingBottom: 10, 140 | paddingLeft: 5, 141 | paddingRight: 5, 142 | }, 143 | itemInput: { 144 | borderRadius: 10, 145 | borderTopWidth: 0, 146 | borderBottomWidth: 0, 147 | borderLeftWidth: 0, 148 | borderRightWidth: 0, 149 | backgroundColor: "rgba(255, 255, 255, 0.2)", 150 | }, 151 | centerView: { 152 | flex: 1, 153 | alignItems: "center", 154 | }, 155 | contentForm: { 156 | flex: 1, 157 | marginTop: Platform.OS === "ios" ? 80 : 35, 158 | marginBottom: 35, 159 | alignItems: "center", 160 | marginLeft: 0, 161 | marginRight: 0, 162 | }, 163 | contentFormScroll: { 164 | flex: 1, 165 | marginTop: 10, 166 | marginBottom: 35, 167 | width: "100%", 168 | height: undefined, 169 | }, 170 | logoImage: { 171 | width: 150, 172 | height: 150, 173 | }, 174 | separator: { 175 | marginTop: 35, 176 | marginBottom: 10, 177 | }, 178 | loginInput: { 179 | marginBottom: 10, 180 | marginLeft: 10, 181 | marginRight: 10, 182 | borderColor: "white", 183 | }, 184 | btnRounded: { 185 | height: 50, 186 | flexDirection: "row", 187 | justifyContent: "center", 188 | alignItems: "center", 189 | backgroundColor: "white", 190 | borderRadius: 25, 191 | }, 192 | }; 193 | 194 | export default styles; 195 | -------------------------------------------------------------------------------- /src/components/ArchHeader.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react' 2 | import { 3 | Header, 4 | Body, 5 | Title, 6 | Left, 7 | Right, 8 | Spinner 9 | } from 'native-base' 10 | import st from './../assets/styles' 11 | import colors from './../assets/colors' 12 | 13 | class ArchHeader extends Component { 14 | render() { 15 | return ( 16 |

21 | 22 | 23 | {this.props.title} 24 | 25 | 26 | {this.props.isLoading && } 27 | 28 |
29 | ); 30 | } 31 | } 32 | 33 | export default ArchHeader 34 | -------------------------------------------------------------------------------- /src/components/ArchHero.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react' 2 | import { View, Image, StyleSheet } from 'react-native' 3 | import { 4 | Text, 5 | Icon 6 | } from 'native-base' 7 | import moment from 'moment' 8 | import { Col, Row, Grid } from 'react-native-easy-grid' 9 | 10 | import { AnimatedCircularProgress } from 'react-native-circular-progress' 11 | 12 | import st from './../assets/styles' 13 | import colors from './../assets/colors' 14 | 15 | class ArchHero extends Component { 16 | render() { 17 | const { currentTime, currentDate, timings } = this.props 18 | 19 | let fill = 0 20 | if (timings) { 21 | let now = moment(Date.now()).format('DD/MM/YYYY HH:mm') 22 | let dateNow = moment(Date.now()).format('DD/MM/YYYY') 23 | 24 | if ((moment(now, 'DD/MM/YYYY HH:mm') >= moment(dateNow + ' ' + timings.Fajr, 'DD/MM/YYYY HH:mm')) && 25 | (moment(now, 'DD/MM/YYYY HH:mm') < moment(dateNow + ' ' + timings.Sunrise, 'DD/MM/YYYY HH:mm'))) { 26 | fill = 15 27 | } 28 | 29 | if ((moment(now, 'DD/MM/YYYY HH:mm') >= moment(dateNow + ' ' + timings.Sunrise, 'DD/MM/YYYY HH:mm')) && 30 | (moment(now, 'DD/MM/YYYY HH:mm') < moment(dateNow + ' ' + timings.Dhuhr, 'DD/MM/YYYY HH:mm'))) { 31 | fill = 30 32 | } 33 | 34 | if ((moment(now, 'DD/MM/YYYY HH:mm') >= moment(dateNow + ' ' + timings.Dhuhr, 'DD/MM/YYYY HH:mm')) && 35 | (moment(now, 'DD/MM/YYYY HH:mm') < moment(dateNow + ' ' + timings.Asr, 'DD/MM/YYYY HH:mm'))) { 36 | fill = 45 37 | } 38 | 39 | if ((moment(now, 'DD/MM/YYYY HH:mm') >= moment(dateNow + ' ' + timings.Asr, 'DD/MM/YYYY HH:mm')) && 40 | (moment(now, 'DD/MM/YYYY HH:mm') < moment(dateNow + ' ' + timings.Maghrib, 'DD/MM/YYYY HH:mm'))) { 41 | fill = 60 42 | } 43 | 44 | if ((moment(now, 'DD/MM/YYYY HH:mm') >= moment(dateNow + ' ' + timings.Maghrib, 'DD/MM/YYYY HH:mm')) && 45 | (moment(now, 'DD/MM/YYYY HH:mm') < moment(dateNow + ' ' + timings.Isha, 'DD/MM/YYYY HH:mm'))) { 46 | fill = 75 47 | } 48 | 49 | if ((moment(now, 'DD/MM/YYYY HH:mm') >= moment(dateNow + ' ' + timings.Isha, 'DD/MM/YYYY HH:mm')) && 50 | (moment(now, 'DD/MM/YYYY HH:mm') < moment(dateNow + ' 24:00', 'DD/MM/YYYY HH:mm'))) { 51 | fill = 90 52 | } 53 | 54 | if ((moment(now, 'DD/MM/YYYY HH:mm') >= moment(dateNow + ' 01:00', 'DD/MM/YYYY HH:mm')) && 55 | (moment(now, 'DD/MM/YYYY HH:mm') < moment(dateNow + ' ' + timings.Imsak, 'DD/MM/YYYY HH:mm'))) { 56 | fill = 100 57 | } 58 | } 59 | 60 | return ( 61 | 62 | {this.props.for == 'welcome' && 63 | 66 | } 67 | 68 | {this.props.for == 'event' && 69 | 72 | } 73 | 74 | {this.props.for == 'prayer' && 75 | 78 | } 79 | 80 | {this.props.for == 'event' && 81 | 82 | } 83 | 84 | {this.props.for == 'welcome' && 85 | 86 | {currentTime} 87 | {currentDate} 88 | 89 | } 90 | 91 | {this.props.for == 'event' && 92 | 93 | {this.props.event.title} 98 | 99 | 100 | Monday, 7th Oct 7:45pm 101 | 102 | 103 | 104 | Jl. Manunggal 2, Jakarta, Jakarta Raya 105 | 106 | 107 | } 108 | 109 | {this.props.for == 'prayer' && 110 | 111 | 112 | 113 | 114 | console.log('onAnimationComplete')} 122 | backgroundColor={colors.backgroundColor} 123 | /> 124 | 125 | 126 | 127 | 128 | {currentDate} 129 | 130 | 131 | {this.props.cityName} 132 | 133 | 134 | 135 | 136 | 137 | } 138 | 139 | ); 140 | } 141 | } 142 | 143 | export default ArchHero 144 | -------------------------------------------------------------------------------- /src/components/ArchInput.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react' 2 | import st from './../assets/styles' 3 | 4 | import { 5 | Input, 6 | Item, 7 | } from 'native-base' 8 | 9 | class ArchInput extends Component { 10 | constructor(props) { 11 | super(props) 12 | this.state = { 13 | backgroundColor: 'transparent' 14 | } 15 | } 16 | 17 | componentDidMount() { 18 | this.getPlaceholder(this.props.name) 19 | } 20 | 21 | getPlaceholder = (name) => { 22 | switch (name) { 23 | case 'email': 24 | this.setState({ 25 | placeholder: 'Email Address' 26 | }) 27 | break; 28 | case 'password': 29 | this.setState({ 30 | placeholder: 'Password' 31 | }) 32 | break; 33 | case 'repeatPassword': 34 | this.setState({ 35 | placeholder: 'Repeat Password' 36 | }) 37 | break; 38 | case 'mobile': 39 | this.setState({ 40 | placeholder: 'Mobile' 41 | }) 42 | break; 43 | case 'location': 44 | this.setState({ 45 | placeholder: 'Location' 46 | }) 47 | break; 48 | case 'address': 49 | this.setState({ 50 | placeholder: 'Address' 51 | }) 52 | break; 53 | default: 54 | this.setState({ 55 | placeholder: 'Username' 56 | }) 57 | } 58 | } 59 | 60 | onFocus = () => { 61 | this.setState({ 62 | backgroundColor: '#fff' 63 | }) 64 | } 65 | 66 | onBlur = () => { 67 | this.setState({ 68 | backgroundColor: 'transparent' 69 | }) 70 | } 71 | 72 | render() { 73 | const getContentType = (name) => { 74 | switch (name) { 75 | case 'email': 76 | return 'emailAddress' 77 | break; 78 | case 'password': 79 | return 'password' 80 | break; 81 | case 'repeatPassword': 82 | return 'password' 83 | break; 84 | case 'mobile': 85 | return 'telephoneNumber' 86 | break; 87 | case 'location': 88 | return 'addressCity' 89 | break; 90 | case 'address': 91 | return 'fullStreetAddress' 92 | break; 93 | default: 94 | return 'none' 95 | break; 96 | } 97 | } 98 | 99 | return ( 100 | 101 | this.onFocus()} 108 | onFocus={() => this.onBlur()} 109 | /> 110 | 111 | ) 112 | } 113 | } 114 | 115 | export default ArchInput -------------------------------------------------------------------------------- /src/components/ArchMenuButton.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from "react"; 2 | import { 3 | View, 4 | Image, 5 | TouchableHighlight, 6 | Text, 7 | StyleSheet, 8 | } from "react-native"; 9 | import { Card, CardItem, Title } from "native-base"; 10 | import st from "./../assets/styles"; 11 | import colors from "./../assets/colors"; 12 | 13 | class ArchMenuButton extends Component { 14 | getIcon = (icon) => { 15 | switch (icon) { 16 | case "broadcast": 17 | return ( 18 | 23 | ); 24 | break; 25 | case "prayer": 26 | return ( 27 | 32 | ); 33 | break; 34 | case "qibla": 35 | return ( 36 | 41 | ); 42 | break; 43 | case "masjid": 44 | return ( 45 | 50 | ); 51 | break; 52 | case "quran": 53 | return ( 54 | 59 | ); 60 | break; 61 | default: 62 | return ( 63 | 68 | ); 69 | } 70 | }; 71 | 72 | getText = (icon) => { 73 | switch (icon) { 74 | case "broadcast": 75 | return "Prayer Time"; 76 | break; 77 | case "prayer": 78 | return "My Quran"; 79 | break; 80 | case "qibla": 81 | return "My Dua"; 82 | break; 83 | case "masjid": 84 | return "Setting"; 85 | break; 86 | case "quran": 87 | return "Help"; 88 | break; 89 | default: 90 | return "App Setting"; 91 | } 92 | }; 93 | 94 | render() { 95 | return ( 96 | this.props.onPress(this.props.icon)} 99 | underlayColor="transparent" 100 | backgroundColor="transparent" 101 | > 102 | 103 | {this.getIcon(this.props.icon)} 104 | 105 | {this.getText(this.props.icon)} 106 | 107 | 108 | 109 | ); 110 | } 111 | } 112 | 113 | const style = { 114 | highButton: { 115 | flex: 1, 116 | }, 117 | iconButton: { 118 | flex: 1, 119 | alignItems: "center", 120 | justifyContent: "center", 121 | // backgroundColor: '#0002', 122 | // width:100, 123 | // height:100, 124 | padding: 15, 125 | borderRadius: 50, 126 | borderwidth: 10, 127 | }, 128 | icon: { 129 | flex: 1, 130 | height: 60, 131 | width: 60, 132 | // height: undefined, 133 | }, 134 | menuText: { 135 | alignSelf: "center", 136 | fontSize: 15, 137 | marginTop: 10, 138 | color: "#1aae72", 139 | }, 140 | }; 141 | 142 | export default ArchMenuButton; 143 | -------------------------------------------------------------------------------- /src/components/ArchRoundedButton.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react' 2 | import { View, Text, Platform, TouchableOpacity } from 'react-native' 3 | import { 4 | Button, 5 | } from 'native-base' 6 | import st from './../assets/styles' 7 | import iosStyle from './../assets/iosStyles' 8 | import colors from './../assets/colors' 9 | 10 | class ArchRoundedButton extends Component { 11 | render() { 12 | const { navigation, text } = this.props 13 | 14 | if (Platform.OS === 'ios') { 15 | return ( 16 | 17 | 20 | 21 | ) 22 | } 23 | 24 | // return ( 25 | // 26 | // 29 | // 30 | // ) 31 | return ( 32 | 33 | navigation.navigate('MainStack')}> 34 | {text} 35 | 36 | 37 | ) 38 | } 39 | } 40 | 41 | export default ArchRoundedButton 42 | -------------------------------------------------------------------------------- /src/components/Category.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import LinearGradient from "react-native-linear-gradient"; 3 | import { View, Text, StyleSheet, TouchableOpacity } from "react-native"; 4 | import { 5 | widthPercentageToDP as w, 6 | heightPercentageToDP as h, 7 | } from "react-native-responsive-screen"; 8 | import colors from "../assets/colors"; 9 | 10 | const CategoryButton = ({ title, OnPress }) => { 11 | return ( 12 | 13 | 17 | 18 | {title} 19 | 20 | 21 | 22 | ); 23 | }; 24 | const styles = StyleSheet.create({ 25 | mainContainer: { 26 | color: "white", 27 | paddingVertical: h("1%"), 28 | fontSize: 18, 29 | marginHorizontal: w("6%"), 30 | }, 31 | primaryContainer: { marginTop: h("3%"), marginLeft: w("5%") }, 32 | gradientStyle: { borderRadius: 5 }, 33 | secondaryContainer: { justifyContent: "center", alignItems: "center" }, 34 | }); 35 | export default CategoryButton; 36 | -------------------------------------------------------------------------------- /src/mst/actions/userActions.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable prettier/prettier */ 2 | import auth from '@react-native-firebase/auth'; 3 | import database from '@react-native-firebase/database'; 4 | // import { getParent } from 'mobx-state-tree'; 5 | // import { Toast } from 'native-base'; 6 | 7 | const userActions = self => ({ 8 | setEmail(email) { 9 | self.email_text = email; 10 | }, 11 | setPassword(password) { 12 | self.password = password; 13 | }, 14 | setUid() { 15 | self.uid = auth().currentUser.uid; 16 | }, 17 | onLoginPress() { 18 | self.error = ''; 19 | self.loading1 = true; 20 | 21 | auth() 22 | .signInWithEmailAndPassword(self.email_text, self.password) 23 | .then(() => this.onLoginSuccess()) 24 | .catch(() => this.onLoginFailFirst()); 25 | }, 26 | onLoginFailFirst() { 27 | self.error = 'Wrong credentials or User does not exist'; 28 | self.loading1 = false; 29 | self.loading2 = false; 30 | }, 31 | onDupLoginFail() { 32 | self.error = 'User Already Exists'; 33 | self.loading1 = false; 34 | self.loading2 = false; 35 | }, 36 | onLoginFail() { 37 | self.error = 'Authentication Failed'; 38 | self.loading1 = false; 39 | self.loading2 = false; 40 | }, 41 | onLoginSuccess() { 42 | self.email_text = ''; 43 | self.password = ''; 44 | self.loading1 = false; 45 | self.loading2 = false; 46 | self.error = ''; 47 | self.uid = auth().currentUser.uid; 48 | }, 49 | onSignUpPress() { 50 | self.error = ''; 51 | self.loading2 = true; 52 | auth() 53 | .createUserWithEmailAndPassword(self.email_text, self.password) 54 | .then(() => 55 | database() 56 | .ref(`user/client/${auth().currentUser.uid}`) 57 | .set({ email: `${auth().currentUser.email}` }) 58 | ) 59 | .then(() => this.onLoginSuccess()) 60 | .catch(() => this.onDupLoginFail()); 61 | }, 62 | resetUser() { 63 | self.uid = self.email = self.email_text = self.password = self.error = ''; 64 | self.loading1 = self.loading2 = false; 65 | }, 66 | 67 | signoutUser() { 68 | // Empty store 69 | this.resetUser(); 70 | auth().signOut(); 71 | }, 72 | }); 73 | 74 | export default userActions; 75 | -------------------------------------------------------------------------------- /src/mst/models/index.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable prettier/prettier */ 2 | import { types } from 'mobx-state-tree'; 3 | 4 | import userStore from './user'; 5 | 6 | const storeModel = types.model('Store', { 7 | userStore: userStore, 8 | }); 9 | 10 | export default storeModel; 11 | -------------------------------------------------------------------------------- /src/mst/models/user.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable prettier/prettier */ 2 | import { types } from 'mobx-state-tree'; 3 | 4 | import userActions from './../actions/userActions'; 5 | 6 | const userModel = types 7 | .model('User', { 8 | uid: types.string, 9 | email: types.string, 10 | username: types.string, 11 | password: types.string, 12 | error: types.string, 13 | loading1: types.boolean, 14 | loading2: types.boolean, 15 | }) 16 | .views(self => ({ 17 | get uId() { 18 | return self.uid; 19 | }, 20 | get currentUser() { 21 | return { 22 | uid: self.uid, 23 | email: self.email, 24 | }; 25 | }, 26 | get getFormSubmit() { 27 | return self.formSubmit; 28 | }, 29 | })) 30 | .actions(userActions); 31 | 32 | export default userModel; 33 | -------------------------------------------------------------------------------- /src/mst/stores/index.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable prettier/prettier */ 2 | import storeModel from './../models'; 3 | 4 | const store = storeModel.create({ 5 | userStore: { 6 | uid: '', 7 | email: '', 8 | username: '', 9 | password: '', 10 | error: '', 11 | loading1: false, 12 | loading2: false, 13 | }, 14 | }); 15 | 16 | export default store; 17 | -------------------------------------------------------------------------------- /src/routes.js: -------------------------------------------------------------------------------- 1 | import { createAppContainer, createSwitchNavigator } from "react-navigation"; 2 | import { createStackNavigator } from "react-navigation-stack"; 3 | 4 | import LoadingScreen from "./screens/Loading"; 5 | import LoginScreen from "./screens/Login"; 6 | import RegisterScreen from "./screens/Register"; 7 | import WelcomeScreen from "./screens/Welcome"; 8 | import QuranScreen from "./screens/Quran"; 9 | import QuranDetailScreen from "./screens/QuranDetail"; 10 | import PrayerScreen from "./screens/Prayer"; 11 | import MasjidScreen from "./screens/Masjid"; 12 | import QiblaScreen from "./screens/Qibla"; 13 | import BroadcastingScreen from "./screens/Broadcasting"; 14 | import BroadcastPlayerScreen from "./screens/BroadcastPlayer"; 15 | import EventScreen from "./screens/Event"; 16 | import EventDetailScreen from "./screens/EventDetail"; 17 | import Location from "./screens/location"; 18 | import TabNavigator from "./TabNavigation"; 19 | import More from "./screens/More"; 20 | import ShowItem from "./screens/Dua/ShowItem"; 21 | import QuranCopy from "./screens/qurancopy"; 22 | import Editor from "./screens/editor/Editor"; 23 | import ImageScreen from "./screens/image/Image"; 24 | import ShareImage from "./screens/image/ShareImage"; 25 | import Settings from "./screens/saeetings/Settings"; 26 | import PrayerTime from "./screens/PrayerTimmings/PrayerTimes"; 27 | 28 | const LoginStack = createSwitchNavigator( 29 | { 30 | Login: LoginScreen, 31 | Register: RegisterScreen, 32 | }, 33 | { 34 | headerMode: "none", 35 | } 36 | ); 37 | 38 | const MainStack = createStackNavigator( 39 | { 40 | TabNavigator: TabNavigator, 41 | ImageScreen: ImageScreen, 42 | ShareImage: ShareImage, 43 | QuranCopy: QuranCopy, 44 | PrayerTime: PrayerTime, 45 | Editor: Editor, 46 | More: More, 47 | ShowItem: ShowItem, 48 | Welcome: WelcomeScreen, 49 | Location: Location, 50 | Quran: QuranScreen, 51 | QuranDetail: QuranDetailScreen, 52 | Prayer: PrayerScreen, 53 | Masjid: MasjidScreen, 54 | Qibla: QiblaScreen, 55 | Broadcasting: BroadcastingScreen, 56 | BroadcastPlayer: BroadcastPlayerScreen, 57 | Event: EventScreen, 58 | EventDetail: EventDetailScreen, 59 | Setting: Settings, 60 | }, 61 | { 62 | headerMode: "none", 63 | } 64 | ); 65 | 66 | const Routes = createAppContainer( 67 | createSwitchNavigator( 68 | { 69 | LoadingScreen, 70 | LoginStack, 71 | MainStack, 72 | }, 73 | { 74 | initialRouteName: "LoadingScreen", 75 | } 76 | ) 77 | ); 78 | 79 | export default Routes; 80 | -------------------------------------------------------------------------------- /src/screens/BroadcastPlayer/index.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from "react"; 2 | import { View, Text, Alert } from "react-native"; 3 | import colors from "./../../assets/colors"; 4 | import st from "./../../assets/styles"; 5 | 6 | import { Container, Content } from "native-base"; 7 | // import WaveForm from 'react-native-audiowaveform' 8 | 9 | import ArchHeader from "./../../components/ArchHeader"; 10 | 11 | class Event extends Component { 12 | constructor(props) { 13 | super(props); 14 | this.state = { 15 | isLoading: false, 16 | }; 17 | } 18 | render() { 19 | return ( 20 | 21 | 22 | 23 | {/* 27 | */} 28 | 29 | 30 | ); 31 | } 32 | } 33 | 34 | export default Event; 35 | -------------------------------------------------------------------------------- /src/screens/Broadcasting/index.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react' 2 | import { Text } from 'react-native' 3 | import colors from './../../assets/colors' 4 | import st from './../../assets/styles' 5 | import moment from 'moment' 6 | import Geolocation from '@react-native-community/geolocation' 7 | import Geocoder from 'react-native-geocoding' 8 | 9 | import { 10 | Container, 11 | Content, 12 | List, 13 | ListItem, 14 | Left, 15 | Right, 16 | Body, 17 | Button, 18 | Tabs, 19 | Tab, 20 | TabHeading 21 | } from 'native-base' 22 | 23 | import ArchHeader from './../../components/ArchHeader' 24 | 25 | import LiveBroadcast from './tabs/LiveBroadcast' 26 | import ListBroadcast from './tabs/ListBroadcast' 27 | 28 | class Broadcasting extends Component { 29 | constructor(props) { 30 | super(props) 31 | this.state = { 32 | isLoading: false, 33 | } 34 | } 35 | 36 | render() { 37 | return ( 38 | 39 | 40 | 41 | 46 | Start 47 | 48 | } 49 | > 50 | 51 | 52 | 57 | List 58 | 59 | } 60 | > 61 | 62 | 63 | 64 | 65 | ); 66 | } 67 | } 68 | 69 | export default Broadcasting 70 | -------------------------------------------------------------------------------- /src/screens/Broadcasting/tabs/ListBroadcast.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react' 2 | import { Text, Alert } from 'react-native' 3 | import st from './../../../assets/styles' 4 | import colors from './../../../assets/colors' 5 | 6 | import { 7 | Content, 8 | List, 9 | ListItem, 10 | Left, 11 | Thumbnail, 12 | Right, 13 | Body, 14 | Button, 15 | Icon 16 | } from 'native-base' 17 | 18 | class ListBroadcast extends Component { 19 | constructor(props) { 20 | super(props) 21 | this.state = { 22 | numbers: [1, 2, 3, 4, 5, 6] 23 | } 24 | } 25 | 26 | playBroadcast = () => { 27 | this.props.navigation.navigate('BroadcastPlayer') 28 | } 29 | 30 | render() { 31 | // const getListofBroadcast = () => { 32 | // this.state.numbers.maps(index => ( 33 | // 34 | // 35 | // 36 | // 37 | // 38 | // Masjid Name 39 | // 10 40 | // 41 | // 42 | // 45 | // 46 | // 47 | // )) 48 | // } 49 | 50 | return ( 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | Masjid Name 59 | 10 60 | 61 | 62 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | Masjid Name 73 | 10 74 | 75 | 76 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | Masjid Name 87 | 10 88 | 89 | 90 | 93 | 94 | 95 | 96 | 97 | ); 98 | } 99 | } 100 | 101 | export default ListBroadcast -------------------------------------------------------------------------------- /src/screens/Broadcasting/tabs/LiveBroadcast.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react' 2 | import { View, Text, Alert, TouchableHighlight } from 'react-native' 3 | import colors from './../../../assets/colors' 4 | 5 | import { 6 | Content, 7 | Icon, 8 | Item, 9 | Input 10 | } from 'native-base' 11 | 12 | class LiveBroadcast extends Component { 13 | render() { 14 | return ( 15 | 16 | 24 | Enter Broadcast Name 29 | 30 | 31 | 32 | 33 | 39 | 43 | 44 | 45 | 46 | 47 | Start Broadcast 51 | 52 | 53 | 54 | 55 | ); 56 | } 57 | } 58 | 59 | const style = { 60 | highButton: { 61 | flex: 1, 62 | }, 63 | iconButton: { 64 | flex: 1, 65 | alignItems: 'center', 66 | justifyContent: 'center', 67 | backgroundColor: colors.primaryColor, 68 | width:120, 69 | height:120, 70 | padding: 15, 71 | borderRadius:60, 72 | }, 73 | icon: { 74 | flex: 1, 75 | width: 45, 76 | height: undefined, 77 | }, 78 | menuText: { 79 | alignSelf: 'center', 80 | fontSize: 15, 81 | marginTop: 10 82 | } 83 | } 84 | 85 | export default LiveBroadcast -------------------------------------------------------------------------------- /src/screens/Dua/AllItems.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from "react"; 2 | import { View, Text, FlatList, TouchableOpacity, Image } from "react-native"; 3 | import colors from "../../assets/colors"; 4 | import { 5 | widthPercentageToDP as w, 6 | heightPercentageToDP as h, 7 | } from "react-native-responsive-screen"; 8 | import firestore from "@react-native-firebase/firestore"; 9 | 10 | class AllItems extends Component { 11 | constructor(props) { 12 | super(props); 13 | } 14 | state = { 15 | verticalData: [], 16 | cart: [], 17 | selected: "First", 18 | refreshing: false, 19 | }; 20 | componentDidMount() { 21 | this.getData(); 22 | } 23 | getData = async () => { 24 | await firestore() 25 | .collection("Duas") 26 | .onSnapshot((d) => { 27 | this.setState({ verticalData: d._docs }); 28 | // setResponseArray(data); 29 | return; 30 | }); 31 | }; 32 | // renderItemDesign = (item, index) => ( 33 | // this.navToShow(item)} 36 | // style={{ 37 | // backgroundColor: "#fff", 38 | // height: h("7%"), 39 | // marginBottom: h("1%"), 40 | // borderBottomWidth: 0.2, 41 | // borderBottomColor: colors.primaryColor, 42 | // borderRadius: h("1"), 43 | // flexDirection: "row", 44 | // }} 45 | // > 46 | // {/* Center view */} 47 | // 59 | // 65 | // {item["_data"].nameOfDua} 66 | // 67 | // 71 | // 72 | // 73 | // ); 74 | 75 | // navigate to show screen 76 | // navToShow = (item) => { 77 | // this.props.navigation.navigate("ShowItem", { 78 | // navProps: item, 79 | // }); 80 | // }; 81 | 82 | refresh = () => { 83 | this.setState({ refreshing: true }); 84 | 85 | setTimeout(() => { 86 | this.setState({ refreshing: false }, () => { 87 | console.warn("All done"); 88 | }); 89 | }, 3000); 90 | }; 91 | render() { 92 | return ( 93 | 99 | item.id} 104 | renderItem={({ item }) => ( 105 | 106 | this.props.navigation.navigate("ShowItems")} 109 | style={{ 110 | backgroundColor: "#fff", 111 | height: h("7%"), 112 | marginBottom: h("1%"), 113 | borderBottomWidth: 0.2, 114 | borderBottomColor: colors.primaryColor, 115 | borderRadius: h("1"), 116 | flexDirection: "row", 117 | }} 118 | > 119 | {/* Center view */} 120 | 132 | 138 | {item["_data"].nameOfDua} 139 | 140 | 144 | 145 | 146 | 147 | )} 148 | /> 149 | 150 | ); 151 | } 152 | } 153 | export default AllItems; 154 | -------------------------------------------------------------------------------- /src/screens/Dua/FoodandDrink.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from "react"; 2 | import { View, Text, FlatList, TouchableOpacity, Image } from "react-native"; 3 | import colors from "../../assets/colors"; 4 | import { 5 | widthPercentageToDP as w, 6 | heightPercentageToDP as h, 7 | } from "react-native-responsive-screen"; 8 | import firestore from "@react-native-firebase/firestore"; 9 | class FoodAndDrink extends Component { 10 | constructor(props) { 11 | super(props); 12 | } 13 | 14 | state = { 15 | verticalData: [], 16 | screenCondition: "FD", 17 | cart: [], 18 | selected: "First", 19 | 20 | refreshing: false, 21 | }; 22 | componentDidMount() { 23 | this.getData(); 24 | } 25 | getData = async () => { 26 | await firestore() 27 | .collection("Duas") 28 | .where("category", "==", this.state.screenCondition) 29 | .onSnapshot((d) => { 30 | console.log("The data is ", d._docs); 31 | this.setState({ verticalData: d._docs }); 32 | // setResponseArray(data); 33 | return; 34 | }); 35 | }; 36 | renderItemDesign = (item, index) => ( 37 | this.navToShow(item)} 40 | style={{ 41 | backgroundColor: "#fff", 42 | height: h("7%"), 43 | marginBottom: h("1%"), 44 | 45 | borderBottomWidth: 0.2, 46 | borderBottomColor: colors.primaryColor, 47 | borderRadius: h("1"), 48 | flexDirection: "row", 49 | }} 50 | > 51 | {/* Center view */} 52 | 64 | 70 | {item["_data"].nameOfDua} 71 | 72 | 76 | 77 | 78 | ); 79 | 80 | // navigate to show screen 81 | navToShow = (item) => { 82 | this.props.navigation.navigate("ShowItem", { 83 | navProps: item, 84 | }); 85 | }; 86 | 87 | refresh = () => { 88 | this.setState({ refreshing: true }); 89 | 90 | setTimeout(() => { 91 | this.setState({ refreshing: false }, () => { 92 | console.warn("All done"); 93 | }); 94 | }, 3000); 95 | }; 96 | render() { 97 | return ( 98 | 104 | this.renderItemDesign(item, index)} 107 | keyExtractor={(item) => item.name} 108 | showsVerticalScrollIndicator={false} 109 | refreshing={this.state.refreshing} 110 | onRefresh={() => this.refresh()} 111 | /> 112 | 113 | ); 114 | } 115 | } 116 | export default FoodAndDrink; 117 | -------------------------------------------------------------------------------- /src/screens/Dua/HomeandFamily.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from "react"; 2 | import { View, Text, FlatList, TouchableOpacity, Image } from "react-native"; 3 | import colors from "../../assets/colors"; 4 | import { 5 | widthPercentageToDP as w, 6 | heightPercentageToDP as h, 7 | } from "react-native-responsive-screen"; 8 | import firestore from "@react-native-firebase/firestore"; 9 | class HomeAndFamily extends Component { 10 | constructor(props) { 11 | super(props); 12 | } 13 | 14 | state = { 15 | verticalData: [], 16 | screenCondition: "HF", 17 | cart: [], 18 | selected: "First", 19 | 20 | refreshing: false, 21 | }; 22 | componentDidMount() { 23 | this.getData(); 24 | } 25 | getData = async () => { 26 | await firestore() 27 | .collection("Duas") 28 | .where("category", "==", this.state.screenCondition) 29 | .onSnapshot((d) => { 30 | console.log("The data is ", d._docs); 31 | this.setState({ verticalData: d._docs }); 32 | // setResponseArray(data); 33 | return; 34 | }); 35 | }; 36 | renderItemDesign = (item, index) => ( 37 | this.navToShow(item)} 40 | style={{ 41 | backgroundColor: "#fff", 42 | height: h("7%"), 43 | marginBottom: h("1%"), 44 | 45 | borderBottomWidth: 0.2, 46 | borderBottomColor: colors.primaryColor, 47 | borderRadius: h("1"), 48 | flexDirection: "row", 49 | }} 50 | > 51 | {/* Center view */} 52 | 64 | 70 | {item["_data"].nameOfDua} 71 | 72 | 76 | 77 | 78 | ); 79 | 80 | // navigate to show screen 81 | navToShow = (item) => { 82 | this.props.navigation.navigate("ShowItem", { 83 | navProps: item, 84 | }); 85 | }; 86 | 87 | refresh = () => { 88 | this.setState({ refreshing: true }); 89 | 90 | setTimeout(() => { 91 | this.setState({ refreshing: false }, () => { 92 | console.warn("All done"); 93 | }); 94 | }, 3000); 95 | }; 96 | render() { 97 | return ( 98 | 104 | this.renderItemDesign(item, index)} 107 | keyExtractor={(item) => item.name} 108 | showsVerticalScrollIndicator={false} 109 | refreshing={this.state.refreshing} 110 | onRefresh={() => this.refresh()} 111 | /> 112 | 113 | ); 114 | } 115 | } 116 | export default HomeAndFamily; 117 | -------------------------------------------------------------------------------- /src/screens/Dua/MorningandEvening.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from "react"; 2 | import { View, Text, FlatList, TouchableOpacity, Image } from "react-native"; 3 | import colors from "../../assets/colors"; 4 | import { 5 | widthPercentageToDP as w, 6 | heightPercentageToDP as h, 7 | } from "react-native-responsive-screen"; 8 | import firestore from "@react-native-firebase/firestore"; 9 | class MorningandEvening extends Component { 10 | constructor(props) { 11 | super(props); 12 | } 13 | 14 | state = { 15 | verticalData: [], 16 | screenCondition: "ME", 17 | cart: [], 18 | selected: "First", 19 | 20 | refreshing: false, 21 | }; 22 | componentDidMount() { 23 | this.getData(); 24 | } 25 | getData = async () => { 26 | await firestore() 27 | .collection("Duas") 28 | .where("category", "==", this.state.screenCondition) 29 | .onSnapshot((d) => { 30 | console.log("The data is ", d._docs); 31 | this.setState({ verticalData: d._docs }); 32 | // setResponseArray(data); 33 | return; 34 | }); 35 | }; 36 | renderItemDesign = (item, index) => ( 37 | this.navToShow(item)} 40 | style={{ 41 | backgroundColor: "#fff", 42 | height: h("7%"), 43 | marginBottom: h("1%"), 44 | 45 | borderBottomWidth: 0.2, 46 | borderBottomColor: colors.primaryColor, 47 | borderRadius: h("1"), 48 | flexDirection: "row", 49 | }} 50 | > 51 | {/* Center view */} 52 | 64 | 70 | {item["_data"].nameOfDua} 71 | 72 | 76 | 77 | 78 | ); 79 | 80 | // navigate to show screen 81 | navToShow = (item) => { 82 | this.props.navigation.navigate("ShowItem", { 83 | navProps: item, 84 | }); 85 | }; 86 | 87 | refresh = () => { 88 | this.setState({ refreshing: true }); 89 | 90 | setTimeout(() => { 91 | this.setState({ refreshing: false }, () => { 92 | console.warn("All done"); 93 | }); 94 | }, 3000); 95 | }; 96 | render() { 97 | return ( 98 | 104 | this.renderItemDesign(item, index)} 107 | keyExtractor={(item) => item.name} 108 | showsVerticalScrollIndicator={false} 109 | refreshing={this.state.refreshing} 110 | onRefresh={() => this.refresh()} 111 | /> 112 | 113 | ); 114 | } 115 | } 116 | export default MorningandEvening; 117 | -------------------------------------------------------------------------------- /src/screens/Dua/ShowItem.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from "react"; 2 | import { View, Text, SafeAreaView, FlatList, Image } from "react-native"; 3 | 4 | import { 5 | widthPercentageToDP as w, 6 | heightPercentageToDP as h, 7 | } from "react-native-responsive-screen"; 8 | import LinearGradient from "react-native-linear-gradient"; 9 | import { TouchableOpacity } from "react-native"; 10 | import { AdMobInterstitial } from "react-native-admob"; 11 | 12 | export default class ShowItem extends Component { 13 | state = { 14 | user: {}, 15 | show: false, 16 | data: {}, 17 | }; 18 | 19 | componentDidMount = () => { 20 | AdMobInterstitial.requestAd(AdMobInterstitial.showAd); 21 | 22 | const incomingData = this.props.navigation.getParam("navProps"); 23 | this.setState({ user: incomingData._data }); 24 | }; 25 | 26 | render() { 27 | const incomingData = this.props.navigation.getParam("navProps"); 28 | 29 | return ( 30 | 37 | 38 | 47 | 55 | Duas 56 | 57 | 58 | 66 | 74 | 75 | {this.state.user.nameOfDua} 76 | 77 | 78 | { 80 | this.setState({ show: true }); 81 | }} 82 | style={{ 83 | height: h("8%"), 84 | justifyContent: "center", 85 | marginLeft: -h("3%"), 86 | width: "20%", 87 | }} 88 | > 89 | 97 | 98 | 99 | 107 | 108 | {this.state.user.arabicDua} 109 | 110 | 111 | 118 | 119 | {this.state.user.translation} 120 | 121 | 122 | {this.state.show === true ? ( 123 | 130 | { 132 | this.props.navigation.navigate("ImageScreen", { 133 | item: this.state.user.translation, 134 | arabic: this.state.user.arabicDua, 135 | }); 136 | }} 137 | style={{ 138 | height: h("7%"), 139 | width: "90%", 140 | backgroundColor: "#07A851", 141 | alignItems: "center", 142 | justifyContent: "center", 143 | marginTop: h("5%"), 144 | borderRadius: h("1%"), 145 | }} 146 | > 147 | Share Image 148 | 149 | { 151 | this.props.navigation.navigate("Editor", { 152 | item: this.state.user.translation, 153 | arabic: this.state.user.arabicDua, 154 | }); 155 | }} 156 | style={{ 157 | height: h("7%"), 158 | width: "90%", 159 | backgroundColor: "#07A851", 160 | alignItems: "center", 161 | justifyContent: "center", 162 | marginTop: h("1%"), 163 | borderRadius: h("1%"), 164 | }} 165 | > 166 | Share Text 167 | 168 | 169 | ) : null} 170 | 171 | ); 172 | } 173 | } 174 | -------------------------------------------------------------------------------- /src/screens/Event/index.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react' 2 | import { Image, Text, View } from 'react-native' 3 | import colors from './../../assets/colors' 4 | import st from './../../assets/styles' 5 | import moment from 'moment' 6 | import Geolocation from '@react-native-community/geolocation' 7 | import Geocoder from 'react-native-geocoding' 8 | 9 | import { 10 | Container, 11 | Content, 12 | Card, 13 | CardItem, 14 | Icon, 15 | Body 16 | } from 'native-base' 17 | 18 | import ArchHeader from './../../components/ArchHeader' 19 | 20 | class Event extends Component { 21 | constructor(props) { 22 | super(props) 23 | this.state = { 24 | isLoading: false, 25 | } 26 | } 27 | 28 | render() { 29 | return ( 30 | 31 | 32 | 33 | 34 | this.props.navigation.navigate('EventDetail')}> 35 | 36 | 37 | this.props.navigation.navigate('EventDetail')}> 38 | 39 | Upgrad.ID Event 44 | 45 | 46 | Monday, 7th Oct 7:45pm 47 | 48 | 49 | 50 | Jl. Manunggal 2, Jakarta, Jakarta Raya 51 | 52 | 53 | 54 | 55 | 56 | this.props.navigation.navigate('EventDetail')}> 57 | 58 | 59 | this.props.navigation.navigate('EventDetail')}> 60 | 61 | Upgrad.ID Event 66 | 67 | 68 | Monday, 7th Oct 7:45pm 69 | 70 | 71 | 72 | Jl. Manunggal 2, Jakarta, Jakarta Raya 73 | 74 | 75 | 76 | 77 | 78 | 79 | ); 80 | } 81 | } 82 | 83 | export default Event 84 | -------------------------------------------------------------------------------- /src/screens/EventDetail/index.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react' 2 | import { View, Text } from 'react-native' 3 | import colors from './../../assets/colors' 4 | import st from './../../assets/styles' 5 | 6 | import { 7 | Container, 8 | Content, 9 | } from 'native-base' 10 | 11 | import ArchHeader from './../../components/ArchHeader' 12 | import ArchHero from './../../components/ArchHero' 13 | 14 | class Qibla extends Component { 15 | constructor(props) { 16 | super(props) 17 | this.state = { 18 | isLoading: false, 19 | } 20 | } 21 | 22 | render() { 23 | const event = { 24 | title: 'Upgrad.ID Event', 25 | time: 'Monday, 7th Oct 7:45pm', 26 | location: 'Jl. Manunggal 2, Jakarta, Jakarta Raya', 27 | } 28 | 29 | return ( 30 | 31 | 32 | 33 | 34 | 35 | 38 | In the following example, the nested title and body text will inherit the fontFamily from styles.baseText, but the title provides its own additional styles. The title and body will stack on top of each other on account of the literal newlines. 41 | 42 | In the following example, the nested title and body text will inherit the fontFamily from styles.baseText, but the title provides its own additional styles. The title and body will stack on top of each other on account of the literal newlines. 46 | 47 | 48 | 49 | ); 50 | } 51 | } 52 | 53 | export default Qibla 54 | -------------------------------------------------------------------------------- /src/screens/Loading/index.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react' 2 | import { Container, Content, Spinner } from 'native-base' 3 | import Geocoder from 'react-native-geocoding' 4 | import auth from '@react-native-firebase/auth' 5 | import {View,Text, ImageBackground, StatusBar, Image} from 'react-native'; 6 | import colors from '../../assets/colors' 7 | 8 | class LoadingScreen extends Component { 9 | // check if user is already logged in 10 | componentDidMount() { 11 | Geocoder.init('AIzaSyBC0KVa-UF8wZMv9JRMUmbflqVAVP4BktI', {language : 'en'}) 12 | 13 | const surah = { 14 | number: 2, 15 | name: 'سورة البقرة', 16 | englishName: 'Al-Baqara', 17 | englishNameTranslation: 'The Cow', 18 | numberOfAyahs: 286, 19 | revelationType: 'Medinan' 20 | } 21 | 22 | // auth().onAuthStateChanged(user => { 23 | this.props.navigation.navigate('MainStack'); 24 | // this.props.navigation.navigate(user ? 'LoginStack' : 'MainStack'); //-- MainStack 25 | // }); 26 | } 27 | 28 | render() { 29 | return ( 30 | 40 | 41 | 49 | 50 | // 51 | // 52 | // 53 | ); 54 | } 55 | } 56 | 57 | export default LoadingScreen 58 | -------------------------------------------------------------------------------- /src/screens/Login/index.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react' 2 | import { View, Text, Alert, StatusBar, Image, Platform } from 'react-native' 3 | import LinearGradient from 'react-native-linear-gradient' 4 | import colors from './../../assets/colors' 5 | import st from './../../assets/styles' 6 | 7 | import { observer, inject } from 'mobx-react' 8 | import { 9 | Button, 10 | } from 'native-base' 11 | 12 | import ArchRoundedButton from './../../components/ArchRoundedButton' 13 | import ArchInput from './../../components/ArchInput' 14 | 15 | class LoginScreen extends Component { 16 | componentDidMount() {} 17 | 18 | render() { 19 | const { userStore } = this.props.store; 20 | return ( 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 35 | 38 | 39 | 40 | 41 | 42 | 43 | 46 | 49 | 50 | 51 | 52 | ); 53 | } 54 | } 55 | 56 | export default inject('store')(observer(LoginScreen)) 57 | -------------------------------------------------------------------------------- /src/screens/More/index.js: -------------------------------------------------------------------------------- 1 | import React, {Component} from 'react'; 2 | 3 | import {StyleSheet, Text, TouchableOpacity, View, ScrollView, Alert,Image} from 'react-native'; 4 | import Sound from 'react-native-sound'; 5 | 6 | const styles = StyleSheet.create({ 7 | container: { 8 | flex: 1, 9 | }, 10 | scrollContainer: {}, 11 | title: { 12 | fontSize: 20, 13 | fontWeight: 'bold', 14 | paddingTop: 30, 15 | padding: 20, 16 | textAlign: 'center', 17 | backgroundColor: 'rgba(240,240,240,1)', 18 | }, 19 | button: { 20 | fontSize: 20, 21 | backgroundColor: 'rgba(220,220,220,1)', 22 | borderRadius: 4, 23 | borderWidth: 1, 24 | borderColor: 'rgba(80,80,80,0.5)', 25 | overflow: 'hidden', 26 | padding: 7, 27 | }, 28 | header: { 29 | textAlign: 'left', 30 | }, 31 | feature: { 32 | flexDirection: 'row', 33 | padding: 10, 34 | alignSelf: 'stretch', 35 | alignItems: 'center', 36 | borderTopWidth: 1, 37 | borderTopColor: 'rgb(180,180,180)', 38 | borderBottomWidth: 1, 39 | borderBottomColor: 'rgb(230,230,230)', 40 | }, 41 | }); 42 | 43 | const Button = ({title, onPress}) => ( 44 | 45 | {title} 46 | 47 | ); 48 | 49 | const Header = ({children, style}) => {children}; 50 | const Images = ({children, style}) => ; 51 | 52 | const Feature = ({title, onPress,img, buttonLabel = 'PLAY', status}) => ( 53 | 54 | {img} 55 | {status ? {resultIcons[status] || ''} : null} 56 | 26 | 27 | 28 | Juz {i} 29 | 30 | 31 | جُزْءْ 32 | 33 | 34 | )) 35 | } 36 | 37 | return ( 38 | 39 | 40 | {!this.props.isLoading && 41 | getListOfJuz() 42 | } 43 | 44 | 45 | ); 46 | } 47 | } 48 | 49 | export default Juz -------------------------------------------------------------------------------- /src/screens/Register/index.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from "react"; 2 | import { 3 | View, 4 | Text, 5 | Alert, 6 | StatusBar, 7 | Image, 8 | ScrollView, 9 | Platform, 10 | } from "react-native"; 11 | import LinearGradient from "react-native-linear-gradient"; 12 | import colors from "./../../assets/colors"; 13 | import st from "./../../assets/styles"; 14 | 15 | import { observer, inject } from "mobx-react"; 16 | import { 17 | Spinner, 18 | Button, 19 | Card, 20 | CardItem, 21 | Input, 22 | Left, 23 | Right, 24 | Container, 25 | Content, 26 | Body, 27 | Title, 28 | Header, 29 | } from "native-base"; 30 | import { 31 | AdMobBanner, 32 | PublisherBanner, 33 | AdMobInterstitial, 34 | AdMobRewarded, 35 | } from "react-native-admob"; 36 | import ArchRoundedButton from "./../../components/ArchRoundedButton"; 37 | import ArchInput from "./../../components/ArchInput"; 38 | 39 | class RegisterScreen extends Component { 40 | componentDidMount() {} 41 | 42 | render() { 43 | const { userStore } = this.props.store; 44 | return ( 45 | 46 | 50 | 58 | 59 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 80 | 81 | 82 | 88 | 91 | 100 | 101 | 102 | 103 | ); 104 | } 105 | } 106 | 107 | export default inject("store")(observer(RegisterScreen)); 108 | -------------------------------------------------------------------------------- /src/screens/editor/Editor.js: -------------------------------------------------------------------------------- 1 | import React, { Component, useRef } from "react"; 2 | import { TouchableOpacity } from "react-native"; 3 | import { SafeAreaView, StyleSheet, StatusBar, Text, View } from "react-native"; 4 | import QuillEditor, { QuillToolbar } from "react-native-cn-quill"; 5 | import { 6 | widthPercentageToDP as w, 7 | heightPercentageToDP as h, 8 | } from "react-native-responsive-screen"; 9 | import LinearGradient from "react-native-linear-gradient"; 10 | import { captureRef } from "react-native-view-shot"; 11 | import CameraRoll from "@react-native-community/cameraroll"; 12 | import Share from "react-native-share"; 13 | import ViewShot from "react-native-view-shot"; 14 | 15 | class Editor extends Component { 16 | constructor(props: any) { 17 | super(props); 18 | this._editor = React.createRef(); 19 | this.viewRef = React.createRef(); 20 | this.state = { 21 | disabled: false, 22 | title: "react-native-cn-quill", 23 | uri: null, 24 | }; 25 | } 26 | 27 | shareImage = async () => { 28 | const uri = await this.refs.viewShot.capture().then((uri) => { 29 | console.log("do something with ", uri); 30 | this.setState({ uri: uri }); 31 | }); 32 | const shareResponse = await Share.open({ url: this.state.uri }); 33 | console.log("shareResponse", shareResponse); 34 | }; 35 | 36 | render() { 37 | return ( 38 | 39 | 40 | 50 | 58 | Share Text 59 | 60 | 61 | 68 | ${this.props.navigation.getParam( 72 | "arabic" 73 | )}

${this.props.navigation.getParam( 74 | "item" 75 | )}


76 | 77 |

${this.props.navigation.getParam("translation")}

`} 78 | /> 79 |
80 | 81 | 90 | this.shareImage()} 92 | // onPress={()=> {this.props.navigation.navigate('ImageScreen',{item:this.state.user.translation})}} 93 | style={{ 94 | height: h("7%"), 95 | width: "90%", 96 | backgroundColor: "#07A851", 97 | alignItems: "center", 98 | justifyContent: "center", 99 | borderRadius: h("1%"), 100 | }} 101 | > 102 | Share Text 103 | 104 | 105 |
106 | ); 107 | } 108 | } 109 | 110 | const styles = StyleSheet.create({ 111 | title: { 112 | fontWeight: "bold", 113 | alignSelf: "center", 114 | paddingVertical: 10, 115 | }, 116 | root: { 117 | flex: 1, 118 | height: h("100%"), 119 | width: "100%", 120 | // marginTop: StatusBar.currentHeight || 0, 121 | backgroundColor: "#eaeaea", 122 | }, 123 | editor: { 124 | flex: 1, 125 | padding: 0, 126 | borderColor: "gray", 127 | borderWidth: 1, 128 | marginHorizontal: 30, 129 | marginVertical: 5, 130 | backgroundColor: "white", 131 | }, 132 | }); 133 | 134 | export default Editor; 135 | -------------------------------------------------------------------------------- /src/screens/image/ShareImage.js: -------------------------------------------------------------------------------- 1 | import React, { useRef } from "react"; 2 | import { 3 | SafeAreaView, 4 | StyleSheet, 5 | ScrollView, 6 | View, 7 | Text, 8 | StatusBar, 9 | Image, 10 | TouchableOpacity, 11 | PermissionsAndroid, 12 | Alert, 13 | Platform, 14 | } from "react-native"; 15 | import { captureRef } from "react-native-view-shot"; 16 | import CameraRoll from "@react-native-community/cameraroll"; 17 | import Share from "react-native-share"; 18 | 19 | const ShareImage = () => { 20 | // create a ref 21 | const viewRef = useRef(); 22 | // get permission on android 23 | const getPermissionAndroid = async () => { 24 | try { 25 | const granted = await PermissionsAndroid.request( 26 | PermissionsAndroid.PERMISSIONS.WRITE_EXTERNAL_STORAGE, 27 | { 28 | title: "Image Download Permission", 29 | message: "Your permission is required to save images to your device", 30 | buttonNegative: "Cancel", 31 | buttonPositive: "OK", 32 | } 33 | ); 34 | if (granted === PermissionsAndroid.RESULTS.GRANTED) { 35 | return true; 36 | } 37 | Alert.alert( 38 | "", 39 | "Your permission is required to save images to your device", 40 | [{ text: "OK", onPress: () => {} }], 41 | { cancelable: false } 42 | ); 43 | } catch (err) { 44 | // handle error as you please 45 | console.log("err", err); 46 | } 47 | }; 48 | 49 | // download image 50 | const downloadImage = async () => { 51 | try { 52 | // react-native-view-shot caputures component 53 | const uri = await captureRef(viewRef, { 54 | format: "png", 55 | quality: 0.8, 56 | }); 57 | 58 | if (Platform.OS === "android") { 59 | const granted = await getPermissionAndroid(); 60 | if (!granted) { 61 | return; 62 | } 63 | } 64 | 65 | // cameraroll saves image 66 | const image = CameraRoll.save(uri, "photo"); 67 | if (image) { 68 | Alert.alert( 69 | "", 70 | "Image saved successfully.", 71 | [{ text: "OK", onPress: () => {} }], 72 | { cancelable: false } 73 | ); 74 | } 75 | } catch (error) { 76 | console.log("error", error); 77 | } 78 | }; 79 | 80 | const shareImage = async () => { 81 | try { 82 | const uri = await captureRef(viewRef, { 83 | format: "png", 84 | quality: 0.8, 85 | }); 86 | console.log("uri", uri); 87 | const shareResponse = await Share.open({ url: uri }); 88 | console.log("shareResponse", shareResponse); 89 | } catch (error) { 90 | console.log("error", error); 91 | } 92 | }; 93 | 94 | return ( 95 | <> 96 | 97 | 98 | 102 | 103 | 104 | Component to be saved 105 | 112 | Some random text saved 113 | 114 | 115 | 116 | 117 | Share 118 | 119 | 120 | Save 121 | 122 | 123 | 124 | 125 | 126 | 127 | ); 128 | }; 129 | 130 | const styles = StyleSheet.create({ 131 | scrollView: { 132 | backgroundColor: "white", 133 | }, 134 | body: { 135 | marginTop: 100, 136 | alignItems: "center", 137 | }, 138 | savedComponent: { 139 | backgroundColor: "white", 140 | marginBottom: 30, 141 | }, 142 | text: { 143 | textAlign: "center", 144 | }, 145 | image: { 146 | width: 252, 147 | height: 150, 148 | alignSelf: "center", 149 | marginTop: 30, 150 | marginBottom: 5, 151 | }, 152 | row: { 153 | alignSelf: "center", 154 | flexDirection: "row", 155 | justifyContent: "space-around", 156 | width: "75%", 157 | }, 158 | button: { 159 | backgroundColor: "#ad4fcc", 160 | padding: 15, 161 | paddingHorizontal: 35, 162 | borderRadius: 5, 163 | }, 164 | }); 165 | 166 | export default ShareImage; 167 | -------------------------------------------------------------------------------- /src/screens/location/index.js: -------------------------------------------------------------------------------- 1 | import React,{Component} from 'react'; 2 | import {View,Text, ImageBackground, StatusBar,Image, TouchableOpacity} from 'react-native'; 3 | 4 | class Location extends Component{ 5 | render (){ 6 | return( 7 | 15 | 16 | 25 | 33 | 34 | 44 | Set Your Location 45 | 46 | 55 | Get accurate prayer times of 56 | your location 57 | 58 | 65 | 74 | 84 | Set youe Location 85 | 86 | 87 | 97 | 104 | 105 | 106 | ); 107 | } 108 | }; 109 | 110 | export default Location; -------------------------------------------------------------------------------- /src/screens/qurancopy/index.js: -------------------------------------------------------------------------------- 1 | import React,{Component} from 'react'; 2 | import {View,Text} from 'react-native'; 3 | 4 | export default class QuranCopy extends Component { 5 | render(){ 6 | return( 7 | 8 | Hello 9 | 10 | ); 11 | } 12 | }; -------------------------------------------------------------------------------- /src/screens/saeetings/Settings.js: -------------------------------------------------------------------------------- 1 | import React, { useState, useEffect, useRef } from "react"; 2 | import { 3 | View, 4 | Text, 5 | StyleSheet, 6 | Switch, 7 | Picker, 8 | AsyncStorage, 9 | } from "react-native"; 10 | import ArchHeader from "../../components/ArchHeader"; 11 | import LinearGradient from "react-native-linear-gradient"; 12 | import { 13 | widthPercentageToDP as w, 14 | heightPercentageToDP as h, 15 | } from "react-native-responsive-screen"; 16 | import { AdMobInterstitial } from "react-native-admob"; 17 | 18 | const Settings = () => { 19 | const nativeAdViewRef = useRef(); 20 | useEffect(() => { 21 | AdMobInterstitial.requestAd(AdMobInterstitial.showAd); 22 | 23 | nativeAdViewRef.current?.loadAd(); 24 | setTajweed(); 25 | setTranslate(); 26 | setTrans(); 27 | // console.log("===================================="); 28 | // console.log(selectedValue); 29 | // console.log("===================================="); 30 | }, []); 31 | 32 | const [name, setName] = useState(false); 33 | const [translation, setTranslation] = useState(false); 34 | const [selectedValue, setSelectedValue] = useState("English"); 35 | 36 | const toggleSwitch = async (n) => { 37 | setName(n); 38 | await AsyncStorage.setItem("tajweed", JSON.stringify({ tajweed: n })); 39 | }; 40 | 41 | const toggleSwitch1 = async (p) => { 42 | setTranslation(p); 43 | await AsyncStorage.setItem("translate", JSON.stringify({ translate: p })); 44 | }; 45 | 46 | const setTrans = async () => { 47 | const tra = await AsyncStorage.getItem("value"); 48 | setSelectedValue(tra); 49 | }; 50 | 51 | const setTranslate = async () => { 52 | const tra = await AsyncStorage.getItem("translate"); 53 | const aa = JSON.parse(tra); 54 | setTranslation(aa.translate); 55 | // console.log(translation); 56 | }; 57 | const setTajweed = async () => { 58 | const taj = await AsyncStorage.getItem("tajweed"); 59 | const aaa = JSON.parse(taj); 60 | setName(aaa.tajweed); 61 | }; 62 | 63 | return ( 64 | 65 | 75 | 83 | Quran 84 | 85 | 86 | 87 | 88 | Tajweed 89 | toggleSwitch(!name)} 94 | // onValueChange={toggleSwitch} 95 | value={name} 96 | /> 97 | 98 | 99 | Translation 100 | toggleSwitch1(!translation)} 105 | value={translation} 106 | /> 107 | 108 | {translation == true ? ( 109 | 110 | Select Translation Language 111 | 112 | { 117 | (async () => { 118 | await AsyncStorage.setItem(`value`, itemValue); 119 | })(); 120 | setSelectedValue(itemValue); 121 | }} 122 | > 123 | 124 | 125 | 126 | 127 | 128 | 129 | ) : ( 130 | 131 | )} 132 | 133 | 134 | ); 135 | }; 136 | const styles = StyleSheet.create({ 137 | main: { 138 | flex: 1, 139 | backgroundColor: "#f5f5f5", 140 | }, 141 | main1: { 142 | padding: 15, 143 | }, 144 | whiteView: { 145 | backgroundColor: "white", 146 | flexDirection: "row", 147 | justifyContent: "space-between", 148 | padding: 15, 149 | borderRadius: 6, 150 | marginTop: "4%", 151 | }, 152 | pickerView: { 153 | backgroundColor: "white", 154 | borderRadius: 6, 155 | marginTop: "2%", 156 | }, 157 | name: { 158 | fontSize: 15, 159 | }, 160 | translation: { 161 | fontSize: 15, 162 | marginVertical: "3%", 163 | }, 164 | }); 165 | export default Settings; 166 | -------------------------------------------------------------------------------- /src/services/calendar.js: -------------------------------------------------------------------------------- 1 | import axios from 'axios' 2 | import moment from 'moment' 3 | import { hijriBase } from './init' 4 | 5 | export const getTodayDate = () => { 6 | let date = moment().format('DD-MM-YYYY') 7 | return axios({ 8 | method: 'get', 9 | url: 'http://' + hijriBase + `gToH?date=${date}`, 10 | // withCredentials: true, 11 | headers: { 12 | 'Content-Type': 'application/x-www-form-urlencoded', 13 | 'Cache-Control': 'no-cache', 14 | 'Access-Control-Allow-Origin': '*' 15 | } 16 | }) 17 | } 18 | 19 | export const getPrayerTimes = (timestamp, lat, long) => { 20 | return axios({ 21 | method: 'get', 22 | url: 'http://' + hijriBase + `timings?latitude=${lat}&longitude=${long}&method=4`, 23 | // withCredentials: true, 24 | headers: { 25 | 'Content-Type': 'application/x-www-form-urlencoded', 26 | 'Cache-Control': 'no-cache', 27 | 'Access-Control-Allow-Origin': '*' 28 | } 29 | }) 30 | } -------------------------------------------------------------------------------- /src/services/init.js: -------------------------------------------------------------------------------- 1 | export const hijriBase = 'api.aladhan.com/v1/' 2 | export const quranBase = 'api.alquran.cloud/v1/' 3 | export const quranID = 'quran.kemenag.go.id/index.php/api/v1/ayatweb/' -------------------------------------------------------------------------------- /src/services/location.js: -------------------------------------------------------------------------------- 1 | import axios from 'axios' 2 | import { PermissionsAndroid, Alert, Platform } from 'react-native' 3 | import Geolocation from '@react-native-community/geolocation' 4 | 5 | const mapBase = 'maps.googleapis.com/maps/api/' 6 | 7 | export const requestLocationPermission = async (callback) => { 8 | if (Platform.OS === 'android') { 9 | try { 10 | const granted = await PermissionsAndroid.request( 11 | PermissionsAndroid.PERMISSIONS.ACCESS_FINE_LOCATION,{ 12 | 'title': 'Location Access Required', 13 | 'message': 'Masjid Speaker needs to access your location' 14 | } 15 | ) 16 | if (granted === PermissionsAndroid.RESULTS.GRANTED) { 17 | callback(true) 18 | } else { 19 | Alert.alert('Warning', 'Permission Denied') 20 | callback(false) 21 | } 22 | } catch (err) { 23 | console.log("err",err) 24 | } 25 | } else { 26 | callback(true) 27 | } 28 | } 29 | 30 | export const getLocation = (callback) => { 31 | Geolocation.getCurrentPosition((position) => { 32 | callback(position.coords) 33 | }, (error) => { 34 | const { code, message } = error 35 | console.log(error) 36 | callback(null) 37 | }, { 38 | enableHighAccuracy: true, 39 | timeout: 15000, 40 | }) 41 | } 42 | 43 | export const getNearbyMasjids = (lat, long) => { 44 | return axios({ 45 | method: 'get', 46 | url: 'https://'+ mapBase + `place/nearbysearch/json?location=${lat},${long}&radius=1500&type=mosque&key=AIzaSyBC0KVa-UF8wZMv9JRMUmbflqVAVP4BktI`, 47 | // withCredentials: true, 48 | headers: { 49 | 'Content-Type': 'application/x-www-form-urlencoded', 50 | 'Cache-Control': 'no-cache', 51 | 'Access-Control-Allow-Origin': '*' 52 | } 53 | }) 54 | } 55 | 56 | export const getPhotoReference = (ref) => { 57 | return axios({ 58 | method: 'get', 59 | url: 'https://'+ mapBase + `place/photo?maxwidth=200&photoreference=${ref}&key=AIzaSyBC0KVa-UF8wZMv9JRMUmbflqVAVP4BktI`, 60 | // withCredentials: true, 61 | headers: { 62 | 'Content-Type': 'application/x-www-form-urlencoded', 63 | 'Cache-Control': 'no-cache', 64 | 'Access-Control-Allow-Origin': '*' 65 | } 66 | }) 67 | } 68 | 69 | -------------------------------------------------------------------------------- /src/services/quran.js: -------------------------------------------------------------------------------- 1 | import axios from 'axios' 2 | import { quranBase, quranID } from './init' 3 | 4 | export const getSurahs = () => { 5 | return axios({ 6 | method: 'get', 7 | url: 'https://api.quran.com/api/v4/chapters?language=en', 8 | // withCredentials: true, 9 | headers: { 10 | 'Content-Type': 'application/x-www-form-urlencoded', 11 | 'Cache-Control': 'no-cache', 12 | 'Access-Control-Allow-Origin': '*' 13 | } 14 | }) 15 | } 16 | 17 | export const getAyahFromSurah = (number, offset, limit) => { 18 | return axios({ 19 | method: 'get', 20 | url: 'http://' + quranBase + `surah/${number}?offset=${offset}&limit=${limit}`, 21 | // withCredentials: true, 22 | headers: { 23 | 'Content-Type': 'application/x-www-form-urlencoded', 24 | 'Cache-Control': 'no-cache', 25 | 'Access-Control-Allow-Origin': '*' 26 | } 27 | }) 28 | } 29 | 30 | export const getAyahFromJuz = (number, offset, limit) => { 31 | return axios({ 32 | method: 'get', 33 | url: 'http://' + quranBase + `juz/${number}/quran-uthmani?offset=${offset}&limit=${limit}`, 34 | // withCredentials: true, 35 | headers: { 36 | 'Content-Type': 'application/x-www-form-urlencoded', 37 | 'Cache-Control': 'no-cache', 38 | 'Access-Control-Allow-Origin': '*' 39 | } 40 | }) 41 | } 42 | 43 | export const getAyahFromSurahID = (number, offset, limit) => { 44 | return axios({ 45 | method: 'get', 46 | url: 'https://' + quranID + `${number}/0/${offset}/${limit}`, 47 | // withCredentials: true, 48 | headers: { 49 | 'Content-Type': 'application/x-www-form-urlencoded', 50 | 'Cache-Control': 'no-cache', 51 | 'Access-Control-Allow-Origin': '*' 52 | } 53 | }) 54 | } 55 | 56 | export const getTranslationFromSurah = (number, offset, limit) => { 57 | console.log('http://' + quranBase + `surah/${number}/en.asad?offset=${offset}&limit=${limit}`) 58 | return axios({ 59 | method: 'get', 60 | url: 'http://' + quranBase + `surah/${number}/en.asad?offset=${offset}&limit=${limit}`, 61 | // withCredentials: true, 62 | headers: { 63 | 'Content-Type': 'application/x-www-form-urlencoded', 64 | 'Cache-Control': 'no-cache', 65 | 'Access-Control-Allow-Origin': '*' 66 | } 67 | }) 68 | } --------------------------------------------------------------------------------