How to compile and run Google Contacts App in Android Emulator - android

Could someone please point to some tutorial on how to setup and build the Google's Contact apps which is under packages/apps/Contact and run it in Android Emulator.
I know it has lot of dependencies including the provider itself which is a separate service., and other libraries from the source folder, but what i'm trying to do is to learn the way Google has designed their contact app and use some of its techniques in my app.
Currently i debug manually !! ^-^.. its very very painful, esp following Intent Calls..
but if i were able to compile and build the Contacts app myself, and run it in emulator, i can add some easy debug messages and recompile and then trace them. Could someone please help me with this.
Thanks in advance

Compiling contacts app nees for Android full source.
establish build environment.
(Ubuntu 64bit, Git 1.7 or later version, JDK6, Python 2.4~2.7 )
get android full source.
( http://source.android.com/ )
full build with entire source.
( http://source.android.com/source/building.html )
if full build success, you can partially build each platform apps.
go to android source root and type in linux command line
# mmm package/apps/Contacts
rooting the Emulator for install system apps.
and set write privileges to '/system/app' in Emulator.
push Contacts.apk into emulator.

Related

Error Running ARFoundation App on Android Emulator

I have downloaded the ar foundation app from a course regarding AR Foundation on Coursera. https://www.coursera.org/learn/handheld-ar/
I have successfully run the app on my phone but my phone does not support ARCore, so I went for the emulator. I followed all the instructions on the ARCore Website. But When I install the apk from the unity project and drag-drop on the emulator it gives me String Parse Error
logcat shows:
failed to install my_arr_app.apk: Failure
[INSTALL_FAILED_NO_MATCHING_ABIS: Failed to extract native libraries,
res=-113]
Can anyone help how to resolve it or how to test my apps to complete the course successfully? Please guide!
Thank you in advance
See the other answer for the solution
The app is using native libraries compiled for a specific platform. There are multiple different platform types that android supports (armeabi, x86, x86_64, etc.). Depending on the emulator image you are using the app might not include the binaries for your emulator.
You can open the APK in Android Studio (or extract it as a zip) and have a look into the lib folder in the APK. Each subfolder is an architecture name.
Then you can create a new Emulator in the AVD manager and when choosing the system image, select "Other images" and choose one with an ABI which is included in the app.
Example:
The answers from the following question also might provide some detail: INSTALL_FAILED_NO_MATCHING_ABIS when install apk
By the help of #JensV I managed to solve it by choosing the x86 instead of ARMv7.
Go to Edit->ProjectSetting->Player->Configuration->Select x86

Running a kivy program on Android

First of all i am aware that there have been alot of similair questions asked already, but somehow i cant figure anything out, I have a python-kivy program that I want to run on Android, the program works perfectly on my computer, I've ran various simple programs using Python Interpreter with Kivy, so far it was the best open source I could find, but there is some nasty problems with it.
I've been to https://kivy.org/docs/guide/packaging-android.html#packaging-android and since i already had Kivy Launcher installed on my phone i tried that one first, however when i open the app i get a message:
No projects are available to luanch. Please place a project into storage/emulated/0/kivy and restart this application. Press back button to exit.
at https://kivy.org/docs/guide/packaging-android.html#packaging-android I readed that the 'project' consists of my main code, lets say main.py, and android.txt, the android.txt must contain a few things that i wont mention now, these two files must be placed in a folder and placed at the asked directory.
I did this, but i still got the same message.
I've thought of trying Buildozer, but i did not seem to find a proper instalation for it on android.
I'm asking advice, becouse i think that the answer to my problems might not be so dificuilt, so any advice apreciated.
Thanks and regards.
Cid-El
ps. Android Lollipop, python 3.4
You may try using buildozer to package your app and deploy to Android device directly for debug, you only need to install this in your machine, and change the developer options in Android to allow external source.
Basically once you install the buildozer, you need to initialise a project by:
buildozer init
Make sure you have the required dependencies and targeted Android SDK/NDK in your system.
Then it's only a simple edit the build manifest for Python specific dependencies (external modules etc).
And run locally by:
buildozer android deploy run
Read more about buildozer here
Hope this helps.

Running a go program on Android?

I have a go library that i want to run on android and use its methods in my android app. I could write the whole android app in go to make it easier to use this dependency. Is this possible? If so, how?
Download Termux (Linux Emulator) from google play store and open it.
Next, wait for it to perform an automatic download of its resources. After that operation, the run the following command:
pkg install golang
pkg install git
The got package is required when downloading golang packages.
Eventually, you can test it by running (go) command.
Golang support for mobile development has been steadily improving. Today it is even possible to build some simple all Go apps (depending on which features you need) as well as Go libraries. Please see https://github.com/golang/go/wiki/Mobile for more info.
UPDATE: In further improvement, libraries are being created to support even UI on mobile platforms. https://fyne.io provides rather robust set of features for mobile.
You can use a Go library from Java when developing for Android with gobind (see this example in the gomobile repository). The biggest issue with this is integration into the build system.
For Go 1.5 things are getting better, but you'll have to wait for that.

Anyone know how I can run an android sample app?

I'm fairly new to android development using Android Studio. The examples online say to build with Gradle. I choose Gradle when importing the project but then I get an error saying that it is not a Gradle based project. Does anyone know how I can get over this to run it on my phone?
Pick a sample project to import that has build.gradle file in BOTH the app module directory AND the project root directory.
Strongly recommend rather than importing an existing project, you create a new one from scratch yourself, following along with a tutorial.
Here's a really good first tutorial for Android Studio which is recent (August, 2014) as of this question, so it will all be relevant to the current version of Android Studio.
http://www.codeproject.com/Articles/801078/Hello-Android-The-Hello-World-Application
As far as getting the app onto your phone you can either (a) plug in the USB cable from the phone to your PC and run from Android Studio, or (b) email the app's APK file as an attachment to any email address you check on your phone (such as gmail for example). For the email method, you also need to change a security option to allow apps from unknown sources.

How can I debug an Android app without Eclipse?

I'm currently developing a Scala application for Android. I probably could get by, with the help of many println, but I'm curious if there's a way to debug it with an actual debugger. I am using sbt to build the project, with the jberkel/android-plugin
You may have more luck with IntelliJ IDEA android plugin (free community version has android support, but I'm not sure about scala, full version is available for 30 days)
You don't necessarily need Eclipse to debug your application
In your android/tools directory is a file called ddms - if you start it you get a device overview, a log cat screen for debugging and additional information

Categories

Resources