React Native app is recognized as a game on Samsung Note8 - react-native

I wrote react native application. The application is simple, more informational, it is used by Redux, Saga, several linked npm packages. The app runs in normal mode, not full-screen. The structure of the application was built on the basis of Ignite.
The problem is that on the phone (Samsung Note8) the application is recognized as a game. E.g. while app is running there is a message "The game is running" on the lock screen. Also there are additional buttons for the gamepad or something like that. In additional, app has a paddings on the top and on the bottom when it's working on real device (Samsung Note8). This effect real exists when some games running. When app is running on another device (e.g. ZTE Blade 610) it's running as usual and without any side effects.
The main version is the cause of all is Game Tools that's existed on Samsung Note8 but others apps have no similar effects and running as expected.
Is there a possibility to make a react native app as a real app but not a game? Why Game Tools recognizes my app as a game? Or what is the reason and how can it be affected?
Thanks.

I think there are few possibilities.
you (or one of your dependencies) have included the google play service API which inside of play service API has a module named games that samsung will automatically treat it as game.
You could find which of your dependency is loading google play service API and create a exclude like:
compile (project ('your.dependency')){
exclude group: 'com.google.android.gms', module:'play-services-game'
}
Your application id (can see on build.gradle) is registered on samsung game database. You could check by going into playstore and search for your application id

this is something that can happen on samsung phones due to the package name of your app.
we cant change this after the initial release, you must contact samsung developer support and they can fix it on the fly.
i wrote a gist on github about it:
https://gist.github.com/Adnan-Bacic/718eb3b4e70380696c91dc21c4804112

Related

Is there any proteus (runtime layout engine) version of react-native?

proteus is basically a runtime layout engine for Android developed by Indian e-commerce Flipkart.
Basically, I want to be able to control my home screen & Support Screen of the app from a backend server, so that I don't have to push every for every small change and also I don't want to use web views (we all know the limitations)
I don't think such a tool exists but you should look into Firebase, specifically the remote config module. It allows you to set parameters from your backend which can then be read on your mobile app, at every launch for example. This would allow you to set custom values for any variable you might need on these screens.
You could also look into AppCenter by Microsoft. It is a service which lets you deploy app updates over the air instantly, without going through the App Store and Play Store review processes. The only downside is that you can't push updates containing native code as your app needs to be re-bundled.

How to implement cron jobs in react native?

I am new to react-native and implementing simple app where app will monitor the mobile's clock time and should set some flags so as to notify user to perform some task when he starts the app.
I want to continuously monitor mobile's clock time as a background job in the react native app such that, when user opens the app and if specific time has already passed, it should set some flag to take future decision.
After some research over blogs, I found that react-native-background-task and/or background-timers can be used. But I am finding difficulty in implementing it. Can anyone help me with the implementation example for the same.
Thank you in advance.
So, from your post I'm going to assume a few things. One being you'll develop on Android as well as iOS, you just want to use a plugin (not code a module yourself).
Unfortunately, unless I'm mistaken - there's no simple answer and I'll explain.
As Android and iOS go forward they are starting to limit usage of Apps in the background, specifically Android goes into 'Doze' mode and iOS works in a similar fashion.
For Android, you'll need to consider a few things and I'll concentrate on them, as you'll need to know this before actually creating a RN app.
Doze Mode
Starting from Android 6.0 (API level 23), Android introduces two
power-saving features that extend battery life for users by managing
how apps behave when a device is not connected to a power source. Doze
reduces battery consumption by deferring background CPU and network
activity for apps when the device is unused for long periods of time.
App Standby defers background network activity for apps with which the
user has not recently interacted.
While the device is in Doze, apps' access to certain battery-intensive
resources is deferred until maintenance windows. The specific
restrictions are listed in Power Management Restrictions.
Doze and App Standby manage the behavior of all apps running on
Android 6.0 or higher, regardless whether they are specifically
targeting API level 23. To ensure the best experience for users, test
your app in Doze and App Standby modes and make any necessary
adjustments to your code. The sections below provide details.
Cruically, you'll need to note:
The system does not allow sync adapters to run.
The system does not allow JobScheduler to run.
So firstly for android, you'll (probably) need to ensure your app is in a 'whitelist'. You can check the requirements of the list here:
https://developer.android.com/training/monitoring-device-state/doze-standby
Or, you can access the maintenance window with a plugin like here:
https://github.com/transistorsoft/react-native-background-fetch
Testing
Android give you some tools to do so, mainly running:
$ adb shell dumpsys battery unplug
$ adb shell am set-inactive <packageName> true
Headless JS
You can check out headless tasks, which could suit your situation:
https://facebook.github.io/react-native/docs/headless-js-android
Caveats:
Although Android state that the operating system itself acts like documented, devices themselves can have software built in which essentially kills background processes. Nokia is one of the worst. So be aware of this.

React native, do I need to send updates through app store?

Title pretty much explains it. Does it render JS from an external codebase so I can simply push new updates through git, or do I need to actually push the changes through App Store?
This is my previous answer, which is getting downvoted into oblivion because it didn't predict something cool like CodePush coming to React Native :)
React Native compiles to an iOS binary. Updates need to be sent to the
App Store, unless you're simply using React Native for its WebView
and rendering an existing webpage on the client.
Updated 6/2/16
It looks like Microsoft has a sweet plugin for CodePush found here that lets you push changes remotely to your React Native app without having to send the update through the App Store.
Here's a quote from the README docs:
NOTE: While Apple's developer agreement fully allows performing
over-the-air updates of JavaScript and assets (which is what enables
CodePush!), it is against their policy for an app to display an update
prompt. Because of this, we recommend that App Store-distributed apps
don't enable the updateDialog option when calling sync, whereas Google
Play and internally distributed apps (e.g. Enterprise, Fabric,
HockeyApp) can choose to enable/customize it.
I'm actually working on a project (with the React Native Playground team - https://rnplay.org/about) that will allow you do live update your apps JS on the fly without submitting an update to the App Store. It's called Reploy, http://reploy.io
We will be open-sourcing the first portion of it very soon (the updater module). There will also be a service that will help you to manage your updates and even deploy your app to TestFlight and the App Store when needed (App Store updates are still needed when adding a new native module or static assets).
Also, just so you know, Apple has allowed this type of auto-updating via item 3.3.2 in the "iOS Developer Program Requirements" document, it says:
3.3.2 An Application may not download or install executable code. Interpreted
code may only be used in an Application if all scripts, code and interpreters are
packaged in the Application and not downloaded. The only exception to the
foregoing is scripts and code downloaded and run by Apple's built-in WebKit
framework or JavascriptCore, provided that such scripts and code do not change
the primary purpose of the Application by providing features or functionality that are
inconsistent with the intended and advertised purpose of the Application as
submitted to the App Store.
https://developer.apple.com/programs/ios/information/iOS_Program_Information_4_3_15.pdf
You could push an update to a remote user if you had linked to an external bundle and had the IP / correct ports forwarded, however Apple do not allow this for released AppStore apps.
For beta testing remote apps you might want to try exponent http://exp.host/
Update---
For completeness, it should be noted that if you are part of the Apple Enterprise program you do not need to publish Apps to the AppStore at all, you can post them to end users via a download link.
I work on a project called AppHub that lets you update JavaScript and images without re-submitting to the App Store. The iOS SDK will be open source, but for now you can use the hosted service to manage new builds of your app.

How to create windows phone app of my existing responsive website?

I have responsive website and wanted to create app for windows phone. So is there any way to make the same? online or by using any other technology (like phone gap or something else). It means my website URL load on click of app icon.
There are different ways to do that. Basically you have three ways (but there are more!) to consider:
Native universal HTML5/JS app: Create a native app using HTML5 and Javascript directly. There is a nice jumpstart available in the Microsoft Virtual Academy (MVA): http://www.microsoftvirtualacademy.com/training-courses/developing-universal-windows-apps-with-html-and-javascript-jump-start
WebView in a C# app: You can also add a WebView to a C# app and run your code inside a browser. This is done quite often - especially if developers want to port a web app very quickly to Windows Phone since all you have to do is to adjust your paths and you're good to go. There's a video on Channel9 by Bob Tabor: http://channel9.msdn.com/Series/Windows-Phone-8-1-Development-for-Absolute-Beginners/Part-13-Working-with-the-Web-View-App-Template (This video is part of another MVA course: WP 8.1 app development for absolute beginners)
3rd party frameworks: You can use third party libraries like PhoneGap / Cordova to run your code. This is very much like 2. as your code is also executed in a browser. The advantage is that you can easily deploy your code on other platforms but you might run into performance issues under certain circumstances.
So if you want to load your page if you click on your app icon (2) might be your best shot.
For Windows 10 Universal Apps you can do that very easily using the Microsoft project Westminster:
https://dev.windows.com/en-us/uwp-bridges/web-apps
Step by step guide is here:
http://microsoftedge.github.io/WebAppsDocs/en-US/win10/CreateHWA.htm
It takes about five minutes to make the app, and then maybe a few hours to polish it, make the right icons from the Windows store etc.

How can store my APP identity on specific iOS device?

How can I keep installation track of my app on particular iOS device? Actually I want to check that my app was installed on a device or its first time installation. I tried identifierForVendor but it got change on every install.
There are a couple of ways to do this.
Easiest would be to implement Google Analytics
If you have your own reporting, you could use a 3rd part library to identify the device its on and then send that info to you... such as:
https://github.com/QuickBlox/SuperSample-ios/tree/master/Classes/Helpers/DeviceHardware