Config “januslo / react-native-bluetooth-escpos-printer” in React-Native

Copy from:  https://github.com/januslo/react-native-bluetooth-escpos-printer https://github.com/januslo/react-native-bluetooth-escpos-printer/pull/76/files We will get error message when we config on ios as bellow [!] use_native_modules! skipped the react-native dependency ‘react-native-bluetooth-escpos-printer’. No podspec file was found. Go to node_modules -> react-native-bluetooth-escpos-printer and create new file is called “RNBluetoothEscposPrinter.podspec” ————————————————————————– require “json” package = JSON.parse(File.read(File.join(__dir__, “package.json”))) Pod::Spec.new do |s| s.name = “RNBluetoothEscposPrinter” s.version =Continue reading “Config “januslo / react-native-bluetooth-escpos-printer” in React-Native”

Creating custom icon set

By: reactnative.guide react-native-vector-icons supports using custom icon sets if you do not want to use the icons which come bundled with it or if you want to add your own icons. It supports Fontello and IcoMoon to create custom fonts. We used IcoMoon to convert our SVGs to a config which is readable by the library.Continue reading “Creating custom icon set”

Compile-time Error: control may reach end of non-void function with Xcode 10.2

Copy from: https://github.com/realm/realm-js/issues/2305   temp solution : add default: return “null”; between line 52 and 53, template<> inline const char *jsc::Value::typeof(JSContextRef ctx, const JSValueRef &value) { switch (JSValueGetType(ctx, value)) { case kJSTypeNull: return “null”; case kJSTypeNumber: return “number”; case kJSTypeObject: return “object”; case kJSTypeString: return “string”; case kJSTypeBoolean: return “boolean”; case kJSTypeUndefined: return “undefined”; default: return “null”;Continue reading “Compile-time Error: control may reach end of non-void function with Xcode 10.2”

Change package name for Android in React Native

By:Cherniv Then manually switched the old and new package ids: In: android/app/src/main/java/MY/APP/NEW_ID/MainActivity.java: package MY.APP.NEW_ID; In android/app/src/main/java/MY/APP/NEW_ID/MainApplication.java: package MY.APP.NEW_ID; In android/app/src/main/AndroidManifest.xml: package=”MY.APP.NEW_ID” And in android/app/build.gradle: applicationId “MY.APP.NEW_ID” (Optional) In android/app/BUCK: android_build_config( package=”MY.APP.NEW_ID” ) android_resource( package=”MY.APP.NEW_ID” ) Gradle’ cleaning in the end (in /android folder): ./gradlew clean   Copy from: https://stackoverflow.com/questions/37389905/change-package-name-for-android-in-react-native

Obfuscating Android Code with Proguard

By: 4down vote First enable minifyEnabled in your build.gradle file, like minifyEnabled true After this, add below lines in progurad-rules.txt file -keep class yourpackage.** { *; } -dontusemixedcaseclassnames -dontskipnonpubliclibraryclasses -verbose For checking that its working fine go to: http://www.javadecompilers.com/apktool website so that you can verify after decompilation. It will work and your classes will be hidden completely. Copyfrom: https://stackoverflow.com/questions/17290023/obfuscation-in-android-studioContinue reading “Obfuscating Android Code with Proguard”

Horizontal RecyclerView in Vertical RecyclerView like Google Play Store

By: prathap kumar Step: 1 ====== Create two Model Classes like below. SingleItemModel.java 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43Continue reading “Horizontal RecyclerView in Vertical RecyclerView like Google Play Store”

Android Push Notifications when app is closed

By: Charuක   Yes, it is possible ‘to receive notifications from google cloud message when the application is fully closed’. Infact, A broadcast receiver is the mechanism GCM uses to deliver messages. You need to have implement a BroadcastReceiver and declare it in the AndroidManifest.xml. Please refer to the following code snippet. AndroidManifest.xml <receiver android:name=”.GcmBroadcastReceiver” android:permission=”com.google.android.c2dm.permission.SEND” > <intent-filter>Continue reading “Android Push Notifications when app is closed”

Adding Badge count on menu items like cart , notification etc

By: mobikul.com In every application, we decorate our MenuItem placed on ActionBar. Displaying of badge count not only decorate the ActionBar beautifully but also displays useful information like showing the number of items currently available in your cart or update you with unread notification. We can create badge count using either a custom view orContinue reading “Adding Badge count on menu items like cart , notification etc”