How to deploy two different react apps with the same link - reactjs

I have created a code editor using Monaco editor which doesn't support mobile ports. I came across other editor known as Codemirror which supports the mobile port. I have created a code editor specifically for mobile port using Codemirror.
The problem is that these are two separate projects and I want to host them in such a way that when the link is opened in mobile it will show the Codemirror project and the same link will show Monaco editor in other device like laptop or PC.

You don't have to host the different projects in the same link.
Create a root component that will detect the device using something like react-device-detect and branch accordingly.

Related

Show React Native app in "Open in" dialogue of another app

I'm new at creating React Native apps and I would like to know if there is a doc or a package that allow us to open my app from an external one by clicking on the "share" button, that open the "open in... / share" dialogue modal
Thanks by advance
EDIT :
I have read the instructions given in the following link : React Native Share Extension
but the thing is that it asks to edit some Java files for Android, and other ones for iOS. Since I'm working with javascript files, where am I supposed to find the files the documentation tells me to edit ?
There is nothing built-it to do this, but there's also some useful packages for doing that, the catch is that you will need to write some native code to make it work
first there is React-native-share-extension forn handle share intents, and for more advanced stuff there is react-native-deep-link for handling for example an url of a video, or a download url, or a mail intent .
Both packages requires to edit native ;-;

Codename One, Possible to access photos without using Display.getInstance().openGallery()?

Is there are way for codenameone apps to access the images stored on the device programmatically and not using Display.getInstance().openGallery().
I want to construct my own gui for selecting images.
Thx
No. You can access these files as read only in a device specific way using native interfaces. Historically this wasn't possible technically in iOS and it was only possible to launch a picker UI to view the content of the camera roll.
For iOS the Photo's native API can be used https://developer.apple.com/documentation/photos?language=objc
It would require wrapping that with a native interface which is non-trivial https://www.codenameone.com/how-do-i---access-native-device-functionality-invoke-native-interfaces.html

Is it possible to use React without outputting HTML?

Is it possible to use React or React Native to build on embedded devices as well as the web, such as Samsung Smart TVs, Kindle devices etc.
Perhaps outputting HTML for Web, but something like XML for other devices.
React Native, by default, renders to:
The web
Android
iOS
But, with things like react-tv, react-ape, and RN For Windows (which can render to MacOS and Xbox too), the possiblities are endless.

Codename one, How can i achieve this User Interface?

I came across this app from google groups, They say its done with codenameone.
Does anyone have an idea how they achieved this UI. It doesnt look like the cn1 default UI.
Please see the google play store link if you can.
Playstore link
That's the default ComboBox UI when running under Android 2.x with the native theme. To see how this was styled you can open the Android 2.x native theme file from our git repository (androidTheme.res) https://github.com/codenameone/CodenameOne/tree/master/Themes

What is the most up-to-date approach to add my own Splash Screen in Sencha Touch

I need my own splash screen when starting up my app.
I use SenCha Touch + Cordova.
Searched and found several ways to do splash screens, however I do not think they are up-to-date.
I saw some code which tried to add a few lines of code into launch function, but the latest Sencha Touch does not do it in the app.js any more instead, it add the Main view to its viewport.
Also, I checked Sencha Touch doc and found
Class currently only works with Cordova and does not have a simulated
HTML counter part. Please see notes on Cordova Docs for proper Native
project code changes that will need to be made to use this plugin.
But it provides some methods after that statement :
newExt.device.Splashscreen( ) : Ext.device.Splashscreen
So I feel confused and don't know which one should I follow.
What is the latest approach to do the splash screen in Sencha Touch?
I currently have the exact same problem as you. Here is information I got from Sencha:
All splashscreen functionality is provided by the Cordova/Phonegap plugin. Our class methods are just convenience methods to the cordova native API and will provide a 'stub' for you if Cordova is not available so that your application does not bomb upon startup (no splashscreen shows, it's just that your app will not crash when trying to access an API that is not there).
In theory, if your application is built with Cordova/Phonegap and your splashscreen images are provided with the application build as specified by Cordova/Phonegap you would initiate a call to Ext.device.Splashscreen.show() after the device is ready (as demonstrated in the example found in http://docs.phonegap.com/en/2.6.0/cordova_splashscreen_splashscreen.md.html#Splashscreen)
The splashscreen feature is a native API, not one that is provided by Touch. You can, should you wish, provide your own coding in your index.html file of your native application which will manually display an image (much the same way we do the initial CSS flashing load indicator), but ultimately that would be up to you to implement manually.
I would suggest that you follow the Cordova guidelines, place your images in the res/drawable directory of your android project and let Cordova do all the hard work for you by just making a single call to Ext.device.Splashscreen.show() when the device is ready and then calling Ext.device.Splashscreen.hide() in the launch area of your application to hide it when your app has rendered its view.
To include Cordova in your application, we now provide you with sencha cmd switches to enable Cordova. You can find more information here
http://docs.sencha.com/touch/2.3.1/#!/guide/cordova
Please note that you will have to download all required components of Cordova, modify the Cordova configuration files as outlined in the Cordova docs, and build the application using either the Cordova command line interface (CLI) or your favourite Android build IDE (Eclipse, IntelliJ, etc).
Use this plugin https://build.phonegap.com/plugins/620
When you use this plugin and build locallym you have to place the icons and splashscreen in the res/ folder manually.

Resources