Considerations of building an Android service as system app (OEM) - android

I'm working on an OEM project where we need a background service (no UI) to be working continuously. Of course it'll be an app signed with the OEM key, so it shouldn't be any trouble related to background services Android's restrictions.
But, as it is the first time developing this, is there any consideration regarding the implementation of the service lifecycle and workflow?
Plus, anything important to consider regarding the testing flow of the project?
Thank you, any help related to OEM-apps development will be much appreciated.

Related

How can I programmatically install apps on android from a system app without being device owner?

I have tried to find a solution on this by searching the net for quite some time. If there is a working solution to my question on stackoverflow, it would be nice if someone points me to it.
So problem is very specific:
I like to implement an app updater that installs apps without any further user interaction as soon as the user has started the setup process.
This would something like the way it is done by GMS (Play Store).
Constraints:
The implementation has to work on devices back to Android 6.
I am an Android system developer and I want to integrate an update for our own hardware.
I have an existing app that is running as system app in the system context.
The app cannot be device owner, as this will block MDM support that customers might want.
I can access hidden APIs of the android system.
The solution may not require root access to the device and shall not use any hacks like calling pm install.
The device has to pass the Google approval what restricts everything to the use of the system APIs provided by Android. I think that this is the reason, why it is so hard to find a proper solution or pointer to a code sample for this.
Has anyone worked on this? Are there apps (like free app-stores) that implement something like this?
Edit: I have found a partial response to my question here: https://stackoverflow.com/a/5805299/6289291
The major difference is, that when building from within the AOSP tree, reflections are of course not required and there are some problems I encountered that I will try to summarize in a response to this question as soon as I have resolved those in a proper way.

Publishing app for production React Native

I have been developing an app using React Native (detached from expo) but I fail to understand few things when it comes to publish the app for production.
From what I understand my native code which for example lives inside .apk( when building from android studio) and the javascript code which is running somewhere on the cloud are collaborating to each other so the app function properly, so basically you have two things to take care.
When I use expo publish command I can see that something is being uploaded somewhere (my javascript code along with assets) probably into amazon cloud service, I don't understand the idea behind this, what if one day those amazon links are not available, what would happen with my app? would it stop working?
I would really appreciate if someone can explain how this thing really works, is it possible that I don't rely on those bundleUrl that I see from the manifest after app published, I mean can I have those running into my server so I have full control of it, if so how much work this will raise?
Also what if one day Expo is un available so the service is shutdown, this things are wondering me.
You can confirm here: https://facebook.github.io/react-native/docs/signed-apk-android.html#content that your Javascript code is for real within your apk file.

Cordova - Track when apps open and move to background

I'm doing a research project looking at app usage, habitual use and addition. I'm programming an app using HTML5, CSS3, and jQuery and need a Cordova plugin that can identify when other apps are being used (i.e. open an app, move to the background, foreground, close an app). All this app needs to do is track how much users open apps and how long they use them.
We will recruit users to willingly participate in this study and only inform our research participants about the data we are tracking and how it's being used.
I know that the app I'm working on needs to be open and running in the background to be able to collect this data and I've already found Cordova plugins to prevent the app from going to sleep. I'm also considering battery usage as well.
There are parental monitoring apps that do this already and collect way more data that we need so I know it's possible. If anybody can point me in the right direction and help I would greatly appreciate it!

How to make an application run on as a cloud service

I had developed an android app.
Now I want to make the app run as a cloud service .
Is it possible to do that.
if possible please tell me a way to achieve it...
This is wildly dependent on what your android app does and your expectations of how it will continue to do that as a cloud service.
For example, if your application is a static page that displays information, and you want to be able to access that outside of android, you can run an android emulator on Linux and have that Linux VM running in the cloud. This is not really a cloud service, but might accomplish what you are trying to do.
If your app has business logic like taking some numbers and doing some calculations, you should really look at porting your android app to another language that can run specifically on a Windows or Linux VM. This involves learning a new language, researching APIs, and a basic understanding of the cloud provider you choose to use.
As a starting point, this example project is a very basic but modern template for Java cloud services. It uses a framework called Spring to help simplify some of the API understanding but would provide a somewhat easy transition from the Android world.
https://github.com/spring-projects/spring-boot/tree/master/spring-boot-samples/spring-boot-sample-simple
From there you need to research how to run the application on a Linux VM using tomcat.
http://tomcat.apache.org/
Finally, you will need to understand the cloud platform's VM provisioning as well as some basic networking concepts. Amazon's AWS is an easy to learn, developer friendly platform that has a ton of documentation and tutorials widely available.

Automated Android platform testing

Does anyone know of a service or application that allows me to test an app on multiple system images, automatically? Given the incompatibilities between Sense, TouchWiz, and Motoblur, I find that my app will work fine in the SDK emulator and on my phone/tablet, but will crash horribly on another version of the UI or OS. If not, I'm tempted to crack at making my own, but I'd like to avoid it.
Here is a service that can be useful for you. I did not use it so I cannot tell you about its possibilities. Moreover, some people use different servers like Jenkins to create a test system for their applications but these systems can check applications on different configurations of emulator not real phones.

Categories

Resources