Cordova App location on android phone - android

I am total cordova beginner. I created a sample application that runs on my phone. It is a simple Test Database with 1 Customer Table. Eventually I will want to import data from a local file. It might not be necessary to know where my app is located on my phone in order to do the import. However, where is my app located on the phone? I am using a file browser that shows hidden files, and I can't seem to find the app. I can run the app as it has an icon on my phone. The name of the app is HTML5_2. It also is called com.coolappz.html5_2. But I can't locate it using the file browser on my phone. Does anybody know what the app path is on the android phone? Galaxy S5?
This question had been asked before but does not have any answers. Maybe this is just one of those wonders of the world that just works but nobody knows why?
Thanks.
Mike

If you use the config.xml of phonegap or cordova and read the documentation in the web you can see that in preferences you can pick the android-installLocation and select if internalOnly, auto or preferExternal. If you pick preferExternal, the app be install on the SD. More easy to see the complete rute and write the code.
You can see more of the App install location here
Regards and good code ;)

Related

auto-fill not working in InAppBrowserObject external website on Android device

I have been struggling to get my app working the way I want it to. I have an ionic/angular based app that is meant to be only for the Android platform. It is basically a wrapper for an already-existing website from the company I work at. The InAppBrowserObject works great for this, it does exactly what I want except that it doesn't auto-fill the login credentials. It makes it so users need to login every time they open the app which is not what we want. We want the external website to open in the app itself and not in the device's browser, so I use "_self" as target.
I have noticed that when I use the device's browser (target: _system) that it asks for permission to save the credentials and then it does actually save them. It is only when I use the targets: "_self" or "_blank" that I get no popup asking to save it (it also doesn't save it). In the image below you can see the code in the app.component.ts file and some information about the app which might be important. The app is small, it literally only has the app.component files and that's it. It opens the external website immediatly when the app is started.
At this point I am clueless as to what to do about this problem. I think I have visited every website that is related to this subject and the solutions are either outdated or there is no solution at all. I hope I gave enough information as to what the problem is, if not, I can always add more.
Information:
using Angular(ts), Ionic in vs-code. Testing apk in Android Studio.
InAppBrowserObject (Cordova, #awesome-cordova-plugins/in-app-browser)
app.component.ts file ^
target set to _self and not auto-filling the inputs (the inputs in the website are set with autocomplete on)
target set to _system and auto-filling is working correctly.

Cordova / PhoneGap : open file from other app

I recently started working with PhoneGap based on cordova to build an app for ios, android and windows phones.
For now I'm testing it on iphone, which is the main platform for this app and this question as well.
To make it easier, lets call my PhoneGap application "Scanner".
Here's what I'm trying to achieve:
You're in a random app, lets say the mail app. Click on an attachement and select "Open with..." Scanner. That should send the file to the scanner and send the path of that file to a javascript variable.
For now, I had no problem opening the xcode build and adding the document type, so my app is displayed in the open with menu.
Any idea how to get the app to display a file ? A pdf for example ?
If there's a global solution for the 3 platforms, that would be like heaven...
Thanks to all of you !
What you need is called "deep linking"
some plugins.
https://github.com/nordnet/cordova-universal-links-plugin
Happy codding!
******************* Edit *******************
I see your need, you are talking about Uniform Type Identifiers, but I dont find any information about how to use in cordova. Probably you will need to write your own plugin
https://developer.apple.com/library/ios/documentation/FileManagement/Conceptual/understanding_utis/understand_utis_intro/understand_utis_intro.html#//apple_ref/doc/uid/TP40001319

Can we restrict to install .apk files in our device?

I am new to android application development.
I developed some android applications and i install the .apk files in client devices,these are working properly.
But my requirement is ,i have to make the client device ,to support for install the .apk file from my company only.If the client is try to install any outside .apk file,then it has to rise an error.
please help me to go forward.
thank you,
bye.
I guess its only possible, if u make changes in Android OS Source itself, there should be some java file, i guess this one which takes care of installation/uninstallation, blocking non market apps. just make a clear about it. Without which its not possible mostly.
save all the device ID into an xml file and bundle it with your application when application starts just get Device id and compare it with the list you have ,if the id match then start the application or show error
you cannot block other users to block installation but I think they wont be able to use the app or even open the application if you follow above procedure

Android App to show the information about which app used how much time

I'm looking to develop an application to show the information of all the other apps installed on the phone and how much time they are used.
what I want to know is,
Is it possible to do such kind of app on Android?
Android will run the apps in background even if there is no user interaction with it, Can we get the time only user interacted with the app?
Please help me with this..
Thanks in Advance.
Harry
The SpareParts app can do it. Luckily, SpareParts is a part of the Android OS and is Open Source.
Try to get some hints in the code.
Source code is avalaible here: https://android.googlesource.com/platform/packages/apps/SpareParts/
Clone the source with git clone https://android.googlesource.com/platform/packages/apps/SpareParts to your computer.

Move app to phone

yesterday I posted the question ‘How do I convert eclipse app for phone?’
I have used eclipse to design an android app which runs fine on the emulator and I now want to transfer it to my phone. Sixten Otto kindly offered some advice regarding how to test/debug my app on my phone straight from Eclipse's Run menu.
(See Developing on a Device from the Android developer site.)
Step 1, declare application as ‘debuggable’ – done, no problem.
Step 2, turn on USB debugging on phone – done, no problem.
Step 3, Setup your system to detect your device – been at this for
hours, still no closer to achieving. (And yes I do have the usb
driver in the Android sdk).
All I want to do is move my very simple app from my computer to my phone, for my own use only. I have Samsung Kies on my PC for file transfer and I have a load of files generated by eclipse. Surely there is a simple way of getting an app from PC to phone. Any help appreciated while I still have some hair left. Thanks.
On your Android device goto Settings/Applications and activate the checkbox "Unknown sources". Then open the folder of your Eclipse Android app project and you'll find the according apk file in the output folder.
You have then several possibilities to transfer this app to your Android powered device:
Install over Mail (simplest/fastest/minimum setup required)
Simply send the apk file to your own Gmail account to which you have also access from your mobile Android. Open it from there and the installation will automatically start.
Deploy on some publicly accessible URL
Alternatively you may have some hosting space somewhere. In such a case what you may do is to create a simple HTML page showing a "Download app" link which starts the download of your APK file (which you deployed on the server). To speed up a bit, you could use the Chrome-to-phone extension for pushing the page to your mobile, or you could create a QR code pointing to your deployed APK file and scan that from your mobile.
Although by having a FTP connection to your webspace you may be quite fast in deploying a new version of your app, this whole process is still quite tedious. Moreover it may not be granted that you have a webspace :)
Use Dropbox! (my favourite)
Personally my favorite one is to use Dropbox. It requires some setup steps, but Dropbox will be useful for a lot of other things too.
Get a Dropbox account and install it on your computer
Install Dropbox on your Android phone
Create a folder within your Dropbox folder for placing your apk file
Open Dropbox on Android and browse to the folder. Click on the apk file and the installation will start
This is nice once you have set up everything because you don't have to send emails back and forth. Moreover you have publicly accessible folders in Dropbox which allows you to share your app also with your friends (by sending the according URL).
I've taken this from a blog post I've written a couple of month ago.

Categories

Resources