Android remote build system - install automation - android

I've put together a remote build system for Android using Ant on a Windows machine and I'm trying to figure out my options for an automated installer in order to deploy the build system to one of my client's machines.
The installer should be able to download Android SDK, Ant, GIT, launch and configure Android's install manager, configure system settings such as the PATH environment variable, configure GIT, etc.
And there is a slight possibility that I'll have to use a Linux client machine some time in the future.
Apart from writing such a software in, say, Qt, I don't see how to do this. Any help/ideas are very appreciated.

Related

Install FTC SDK in Gitpod/VS Code

Some background:
FTC (First Tech Challenge) is a competitive robotics league that uses Android-based software to make a robot function. In my organization, a majority of programmers come from our school and thus, they often find themselves programming on school-issued Chromebooks with restrictive software. Normally, we would program on Android Studio and it would work perfectly fine. By using Gitpod though, we can essentially have an unrestricted IDE on those computers and thus, I began trying to make this work.
Basically, how can I use the SDK in Gitpod or in VS Code (since they both use VS Code Browser)?
Clone this repository.
Add .gitpod.yml and .gitpod.Dockerfile files and add correct code in there
Install Android SDK via apt-get install android-sdk
Install Command Line Tools by cloning the .zip folder and extracting it to the correct place
Build the project with ./gradlew build (build runs out of JVM memory)
Type out Mo and see if intellisense suggests MotorEx, a class in the SDK.
Fail :(

Can you build React Native apps (Android app) on Ubuntu?

As I can see here you need OS X to build apps with React Native. That is probably because they used it at first to create only iOS apps. Now it's possible to create Android apps with React Native but they still require OS X as development platform which doesn't make sense to me. Is there any way to create Android apps using React Native on Ubuntu OS or any other Linux?
Update 2: I've been developing React native apps on Ubuntu for some time now, without any issues.
Update 1: It's almost possible on linux and windows now. Check this doc page: link
Old answer:
It's already almost working, from the issue shared in kzzzf's answer:
Everything works on Linux except:
react-native run-android can't open a new shell window, you need to
use react-native start. Will be fixed in next release. Debugging in
Chrome currently relies on an AppleScript to launch Chrome. There's a
PR to replace that.
Building on linux and windows is not officially supported although there are people in the community already sending pull requests that will allow to do so (main obstacle is the fact of using apple-script and calling to shell scripts from node - from react-packager and from react-cli).
Main task for tracking those efforts is here: https://github.com/facebook/react-native/issues/2693
While it's not officially supported on Linux yet, and there are certainly some hoops to jump through, I have created a docker container that allows me to build and run android apps from Ubuntu.
The dockerfile is still a work in progress but it's available on github: https://github.com/gilesp/docker/tree/master/react_native
There's a couple of shell scripts to make local development easier - I mainly use the react-bash script to give me a shell prompt in the container for running react-native run-android etc.
It works well enough that I can have a phone connected via USB on my host machine, the react native stuff running in the container and have my edits to the code (I mainly edit using emacs on the host) appear immediately on the device.
I'm currently working on CI builds for android as there are some more hoops to jump through to create the bundled version of the javascript for deployment.
It should be possible by now. For an up to date guide on "can i build for platform X on system Y", see:
https://facebook.github.io/react-native/docs/getting-started.html

Check android runtime

Since it's now possible to execute an apk file on windows mobile, is there any way to check if the environment is emulated on windows or not? I want to be aware if the app is executed on windows platform.
Users cannot run arbitrary APKs on Windows. As a developer you will choose to package and publish your APK for Windows. It can call Windows Runtime API or compile in custom checks as needed.
For more information check out the Build session “PROJECT ASTORIA“: Build Great Windows Apps with Your Android Code. You can sign up for the for the Windows Bridge for Android (fka Project Astoria) developer preview at https://dev.windows.com/en-us/uwp-bridges/android
I found the way. You just need to read file /proc/cmdline and look for the hyperv string.

Simplify Build Process of Android Platform Apps

I'm working on a custom default android browser. I follow steps here AOSP to build my custom browser:
Clone android source code
Make changes on android browser
Build the Browser only for Nexus 4:
lunch full_mako-eng
make -j Browser
I rooted my Nexus 4 and install the Browser App. Everything is fine but I wonder if there is any other methods that simplier than above steps?
Can we just import the Browser into Eclipse or IntelliJ and build it directly to the phone?
At first, I want to point to some errors in your receipt.
Command make -jN builds all the sources of AOSP, where N is usually equal to "number of processor cores + 2". After the whole build of sources you can just build your browser application using command mmm packages/apps/Browser -jN snod
Browser application is a part of Android and thus, it is possible that it uses some system permissions that are not available for applications that are not installed on system image or not signed with system image. If it is not, then you can extract Browser application from AOSP, import it as a separate application into Eclipse and build it as a separate application (however, you will need to modify some resources).

Developing Android app on both Linux and Windows host

My main developing phase is done on a Ubuntu machine.
The project is shared on the cloud by Dropbox.
I'd like to access to the project on other PC but, since it is a Windows PC, i receive some errors, first of all, the project path!!
Is there a way, or some guideline, to allow to develop the same project on Linux and Windows?
Instead of Dropbox, use a public version controls service (github, assembla) (or private + vpn etc.) and checkout the project on as many workstations as you want. Make you sure you don't check in IDE Specific files like Eclipse's '.classpath' etc.

Categories

Resources