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

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

Related

Cordova App location on android phone

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 ;)

loading html file from web server using phone gap

i am planning to develop an hybrid application using phone gap. i want to download html pages,images & other resources from a web server instead of keeping it inside the phone gap application bundle.
is it possible to do so
is it the right way to avoid updating the application in the App Store frequently or
will android, iPhone, windows reject our application
Yes it is possible with phonegap, nothing can prevent you from loading html file from remote source. Here's my other answer on this question: https://stackoverflow.com/a/13996437/1848600
Unfortunately no. While we can say this is true, every error will brake every available app version, while if you create version by version customers will always be able to use previous ones. Also Apple apps store will ban such app.
Android/Win7-8 app will not be rejected, iOS will be rejected immediately. Here's my other answer on this question: https://stackoverflow.com/a/14436328/1848600, no point in repeating.
Yes, it's possible.
you have 2 choices to implement it. simple way is just start on web server url. but, you need a code for including cordova script file that matched target device.
another way is check & download files.
In this case, you need to write some code of phonegap for update-check, download contents & change start URL.
During you have no reason for changing native code, my answer is Yes.
exactly Apple doesn't allow to update app logic without AppStore or load page in web server, but i don't know really it is.

facebooksdk's FBAndroid-2.0.apk are we supposed to install this along with our app?

First, let me apologize if this is a repeat question. I did a search but didn't see a similar one. My question is this. Are we supposed to somehow always include FBAndroid-2.0.apk alongside the app that we develop for android that needs to use Facebook? So let's say I put MyCoolAppWithFacebook.apk on GooglePlay, am I supposed to package it together with FBAndroid-2.0.apk ? If so how can this be done? The facebook developer site have you install it using 'adb' too, as in 'adb install'. If I was to put FBAndroid-2.0.apk inside MyCoolAppWithFacebook/bin folder, it gets deleted every time I do a clean from Eclipse. Maybe I am missing something. Thanks for any pointers.
No. They have you install it on the simulator for testing purposes. When a user attempts to use facebook from your app the facebook SDK will either open the native facebook app (if it is installed on the users device) or it will open the browser and handle the authentication through their website.

create a pylon-based web site to download android app

For our company internal use, we would like to create create a website for downloading android apps. Anyone has some insight about this? Can a traditional file-serving server work?
Thanks.
When clicking on a Android Apk file on the web it will automaticlly downlaod and ask the user to install it, this will also show any permissions that are required too. So any type of file-serving server will work just fine for this.

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