Phonegap - Access Application Installed Directory - javascript

I am building and Hybrid Application, that will run on Android and iOS platform, My application has a feature for downloading content from web server and then use the same for loading the GUI in respective platform, now my question is, how can i access the application installed directory where my application is installed, so I can have a control over the content.
I know how this can be done in Adobe AIR, but I am very new to this Arena, any help will be really very helpful.
Thanks & Regards,
RS.

You shouldn't know where your application is installed to download and save files and to use them in application. All that you have to know - where is folder for your application data (including downloaded/created files).
Have a look at http://cordova.apache.org/docs/en/2.9.0/cordova_file_file.md.html
According to docs, you can operate with fileSystem.root directory (create/modify/delete files and folders in it). On Android, fileSystem.root is usually SD Card root directory, while on iOS it is separate "sandbox" folder for each application.

Related

Cordova based apk installion & developed file location

I am now learning cordova and i wanna know something.
Example, I have index.html & index.js in my cordova project.
I will build app and install it in my phone.
So the question is those two files index.html & index.js will be in app package folder inside phone local storage?
Thanks
Yes, the files show up in a hidden area on Android and iOS. Anyone with a rooted phone can see them. Don't store security keys in your code.
All Cordova really is is on Android and iOS is a reference to the embedded browser available on both systems and hook to load whatever page you specify in the config.xml. You can even set the config.xml starting file to be your webpack dev server. Therefore your html and JS files have to exist somewhere for the web browser to open them.

how to generate apk or ios file of React Native project

I am building a RN project with "create-react-native-app" and "Expo". So how it is possible to run on Android & Ios device? How i can generate APK file? I am using sublime text 3 for writing code.
If you don't mind opening your app through the Expo app on real devices, all you need is to publish it onto the Expo ecosystem. Read more about publishing.
If you do mind that extra step and want to go the normal way, you need to create a standalone app for distribution:
When you’re ready to distribute your app to end-users, you can create
a standalone app binary (an ipa or apk file) and put it in the iOS App
Store and the Google Play Store. See the full guide to building a
standalone app.
Source

Build SAPUI5 App with Grunt/Gulp and deploy form Eclipse with ABAP Team Provider

I am trying to optimize an existing UI5 application which resides in SAP BW as BSP Application and runs from SAP Portal (You press on the link and the UI5 application opens in a new Tab).
My main concern is with the amount of calls between Client and Back-end system. Especially calling all the library.css/library-preload.js/etc files AND custem controller.js and view.js files.
I found possible solutions involving grunt/gulp or deploying from SAP WebIDE. I trying building and deploying the App with SAP WebIDE, but after opening the App, Network still shows a lot of traffic + there is no Component-preload.js call. I'm guessing it has something to do with where the app is launched or I still have some configuring to do on the back-end?
I would like to build my App with either grunt/gulp since I can involve other plugins like lints, compression (for js, html, css), test, and many more. The problem is that the App resides not in OS, but somewhere in DB.
So I want to build my App with all those Grunt/Gulp tasks and deploy to ABAP AS (in BW as BSP application) using ABAP Team Provider and ensure that when I call the app from Portal, the files will be compressed/minified and, what is more important, that all the relevant .js files will be loaded as a single request.
Is what I imagine even possible? And if yes, then what are the steps required to accomplish this?
NOTE: I checked SCN and unfortunately I can't use your typical npm grunt or grunt-openui5 etc since the App resides somewhere in the DB :/
If you have a build configuration inside your WebIDE project, WebIDE will reate a DIST folder containing the distribution package.
Inside DIST there is an autogenerated Component-preload.js

How to install a mobile template in apache cordova 6.1.0

So I am running Apache Cordova on Ubuntu trying to create a multi-platform hybrid application. So far I am done with the steps of:
Installing Codova
Assigning the Andoird Home, configuring the sdk and the avd
Being able to export the project on the browser and as an apk file
Testing the apk file and making sure it's working fine on a real device
After unzipping the mobile template written in (HTML/CSS/JS) into the application's directory and removing the default index.html to make sure the full files of the templates are functional, everything seem to be working fine.
The question is, is this normally how it should work? or is there something that I have to do within the cordova's app directory's default files (like the default index.html) in order to not miss with the installed cordova plugins like (camera, geolocation .... etc) ?
In other words, do I treat the cordova's app's www directory just like I treat a regular website files on a server, or are there other steps?

How autocopy (on each save action) file in Intellij Idea to other directory?

I have java project with html/js files. These files are packaged by maven and deployed to Java EE application server.
To modify one symbol I (theoretically) need to recompile, repackage and redeploy whole project. In practice change html/js in Intellij Idea project and copy them directly to application server manually.
May be Idea support automatically coping files on save action?
If you use IDEA Ultimate (paid) edition, it supports creating Run/Debug configurations for application servers.
This allows you to create, deploy your application and test/debug within IDEA, without building with Maven.
For example, if you use Tomcat:
Once you launch this configuration, you'll get a convenient redeploy button.

Categories

Resources