Can I build android executable right from my android application - java

How do I build a android executable from my android application? I am building an application where it would send some application data to another device. If the receiver is using my application, there is no problem. But if the receiver is not using my application or not aware of it, the application data means nothing to him, unless the sender informs him about it.
I wish to build a executable, right from my android application, which will run on receiver end. Receiver may not modify it but can run it easily.
Example of such use:
Video recorder or converter application which convert/record video on a custom format and play it. Now the sender wants to send that video to his friend. Unless he have installed such video, he can't access it. However if it is possible for the sender to create some executable to embed that video, which can run on any android device it would be great.

Even if it were possible, it is definitely not practical to compile an application on an Android device. Why not make the compiled application available in the Android market and/or your own URL, and then get the receiver to download and install it?

Like Elevine said, you should send a URL to App in Market instead of sending an app.
If google/Android evev allow sending app directly, Spammers, virus writers will love the "features". It is as bad as ActiveX plugin date of IE5,6.
BTW, I thought about this kind of approach before. One can have all the prebuilt jar, dex files ready and just want to zip them together with new data as resources, signed it with the right key. It is possible to do it in the phone. But you really don't want to do put your signing key in anyone's phone.
It is much better/simpler to just submit the needed data to a server in the cloud have sign the package there.

Related

Live-stream video from one android phone to another via bluetooth

I am intended to make an app that stream live videos from one android phone to other one via Bluetooth,i need a simple player and there is no need to save the file,just play it.
My knowledge about stream in java is not enough and I really don't know where to start!
Please help me in finding any solution. Any help will be appreciated.
There is a sample android project to do streaming live video and allows you take photos and record videos from remote phone via bluetooth.
BluetoothCameraAndroid
Android allows you to get frames as byte array using camera, you can use that api to get frames and send it across. But the problem is throttling the sending rate. That also has been handled in that project.
In marshmallow and above devices, you have to give permissions
manually in settings. This project does not include runtime
permissions
Xuggler is a Java opensource library that works with streaming and modifying media on the fly. you can start from it at:
http://www.xuggle.com/xuggler/

Mobile Device Management

Is there a way to control an android device from an admin web interface using a php code? I have tried looking into other MDM platforms however they have a lot of requirements to be installed.
This is possible up to certain limit, like Run a certain app, delete files, create files , taking pictures, play video/audio .. anything that doesn't need users extended permission.
You need to create an app that has ability to perform what ever the task you need.
You can send an action through (SMS/notification) etc to the device.
Your app will take a action and do the necessary changes of the device.

Injecting items in Android browsers caches

I am currently trying to find a way to programatically inject items into a mobile browser's cach on Android devices. The browser type doesn't matter, it can be Firefox, Chrome, Android's built in browser, etc.. Is there any documentation or examples of ways to programatically inject objects into the browsers of Android devices?
Not really an answer, just a heads up. Seeing that your question is tagged java, I assume you want to do this from an application, and not from the browser. I'm pretty sure that's impossible, because each Android app is running in it's sandbox. Communication between apps is done through Intents and IPC. In both cases, you are limited by what the target app is offering support for.
You can use proxy, to get this structure :
Client => Your APK => Server
(Like this application).
With your APK you can choose file to send.
Like already mentioned by Corneliu, its impossible for an normal android app to write into the data section of another app.
Although it should work when the phone is rooted. Apps like TitaniumBackup which require root can read and write the data saved by other apps. You can use TianiumBackup to make a backup of the browsers and look in the *.tar.gz file for the internal data structures and the SQLite DB files...

How can I save my Android application so that the end-user can execute it without the Android SDK

I have recently started programming for the Android platform. I have a simple application which I would like to email to someone so that they can execute the application and check how it works.
I am currently using the Emulator in the Android SDK to execute my application but the person who I am emailing it to does not have Android SDK and it would be a mission to send the whole project folder.
Is there any way that I can send just one file such as an .exe or something that would allow the recipient to execute the application to see how it works.
Thanks so much for your help in advance guys
The "exe" for android is called apk. I suggest you to look at this question. You'll need to build the apk and sign it in order to be able to run it.
If you just want to send it to a user for testing purposes, you can enable the setting in the target android device to allow "unknown sources" (I don't know the proper english name, as I don't have an english android here at the moment). You can find this in the app settings.
In your development environment look for the apk file created by eclipse. Then connect your smartphone to the pc and copy the apk over. Start up a file manager and click on the apk and it will install just like any other app.
If you want to deploy it properly, you have to sign it and probably follow the procedures from google. Since I don't have a fully deployable app yet, I can't say what the procedures is for that, but the google site is very helpfull on all aspects about android programming.
Check the "bin" folder in your project path. There you will have a .apk that you can share with your clients.
If they execute it in an Android mobile phone the application will be installed.

Include a service in a SDK/library

I've gotten an android service written as a stand-alone APK and I'm trying to include this in the SDK so it automatically installs the service through some publicly exposed function from the SDK.
Is there a way to achieve this?
For instance, the SDK is monitor.jar which has helper functions.
The service is GetCurrentMonitor.apk which runs a background service that returns the value of some stock currently monitoring.
Now, I want to release the SDK so that when it's included in some 3rd party app, it automagically installs the background service for GetCurrentMonitor project...
Any help is greatly appreciated.
Thank you,
Your question is very confusing. Here is my interpretation of what you are asking:
I have an Android application that has a service. I have a separate SDK (JAR or Android library project). I want users of the SDK to be able to call a function and have the APK containing the service be downloaded and installed.
This is possible, sorta.
You can have code in your JAR that either:
call startActivity() on an ACTION_VIEW Intent for the market: Uri pointing to your app on Google Play, or
downloads an APK from some server of yours to external storage, then calls startActivity() on an ACTION_VIEW Intent pointing to that downloaded APK, to kick off an install
In either case, the user will need to get involved in the installation process -- you cannot install apps silently. And, in the latter case, you will be responsible for handling your own updates over time.
This also will tend to confuse the user, as they may not realize why your app is floating around their device, so you will need to be able to handle the case where they uninstall it.
Also, it is possible that on Android 3.1+, the user will need to launch an activity of yours before your service will be usable. With luck, that is not required, though I cannot rule it out at this time.
And, of course, if I did not correctly understand your question, please consider editing the question to clarify what it is you are trying to accomplish.

Categories

Resources