I want to create a plugin that creates android main activity in Unity3d but Tango sdk uses com.google.unity.GoogleUnityActivity as Main activity.
Is there a way to modify com.google.unity.GoogleUnityActivity or extend it?
I am unable to find its package so I am unable to extend it.
It is essential for my plugin to run in main activity.
Related
I have an android system app that is currently being built with the android build system. The SDK in use is system_current as it uses some system apis.
For external dependency reasons, ease of development, debugging etc, it would be nice to move this app to Android Studio and use Gradle to build.
Converting the sources to build with Gradle is straight forward enough. However, at build time, the system APIs are not found as those are not available in the normal SDK. I thought that by generating the SDK from the AOSP sources I'd get an SDK I could use, but that target output seems to also not have the System APIs available.
How would I change my gradle build to be able to use the System SDK to compile against?
There are two ways depending if you are only trying to use current non-public APIs, or of you've added custom ones yourselves and are trying to access those.
If you're only trying to use current system-level APIs, you can use android.jar from this repository https://github.com/anggrayudi/android-hidden-api
If you have added some new method that isn't part of standard AOSP, then it's a but more work.
The reason that all methods don't show as part of Android SDK is that in AOSP code they are annotated with #hide. This means that when SDK is generated, they are exlcuded.
You'll need to remove that annotation for the methods that you want to use. Then you'l need
Run make update-api to update the public API of the project.
Make the Android SDK from code by following: https://android.googlesource.com/platform/sdk/+/master/docs/howto_build_SDK.txt
Change the Android SDK path in Android Studio to use the custom one you build.
There's also the possibility of accessing methods via reflection on runtime without SDK generation. It's slower and messier to code though.
Not sure I understand exactly what you mean by normal SDK etc.
From https://developer.android.com/studio/build
The key part is to have a
apply plugin: 'com.android.library'
...
android {
...
}
If on the other hand you wanted to build with a desktop JDK but compile against java APIs you could add a dependency on robolectric and you can get a jar you can import into another Android project.
implementation "org.robolectric:android-all:11-robolectric-6757853"
Android Studio isn't really designed to work with System APIs. Even if you make Gradle build your platform app, you will also need to sign it with the same certificate as your AOSP build (so that you could run it). As you noticed, if you decide to use Roboelectric you would also need to modify it yourself to match your current AOSP version (System APIs are not as stable as Public APIs and Roboelectric needs to constantly chase all the changes).
I would suggest to keep using the AOSP build system but optimize our workflow.
Ease of development
Doing a full build/flash for every change in your component must be a pain. But if you are just modifying a single app, you can get away with just building that single component:
~/aosp/ $ m -j -- do a full build first
flash a clean image (with your platform certificate)
~/aosp/path/to/your/app/ $ mma -j -- build your app with all dependencies after you made changes
$ adb root && adb remount && adb sync
Basically, adb sync works great if you don't touch any APIs or parts of Android Framework (which would cause a rebuild of thousands other objects). If you see adb sync updating more than handful of files, you'll likely end up with a bad system and need to do a full flash.
Debugging
While Android Studio is a to-go solution for regular apps, framework and the platform apps go with InteliJ (you can probably use Android Studio, but there won't be much of use of Android plugins on top InteliJ) plus some configuration (see idegen.sh - example).
I am developing the main app and a library (open source, forked but will go back into main repository) used by the app at the same time. I want to use Swift Package Manager and Xcode at the same time. What is the best setup in order to use the best of both worlds? Can I develop both in one workspace?
I'll describe the approach I've used before. I'm assuming you have the Swift Package available as source code in a folder, e.g. cloned using Git.
Open your main app project
Drag the root folder of the Swift Package onto your Xcode project
Open the project overview, select your app target, and under "Frameworks, Libraries, and Embedded Content", add your library
Import the library in any Swift file where you depend on it
This will resolve and fetch all dependencies and still allow you to change source code in the library on the fly if you need to.
guys.
First goes the questions.
I need to combine different Xcode projects for iOS and watchOS. And I need automation for this.
Is it possible to set reference in iOS-Xcode project to watchOS-Xcode project, and setup outer project to build target iOS app with embedded watchOS app, by using targets of inner project? Is it possible to do such a thing with workspaces?
Are there exist some command line tools for managing Xcode project, like adding targets, changing build settings, setup build phases, add resources and so on?
Problem summary.
I'm currently developing video game with Unity3D for iOS and want to make a companion application for watchOS. The problem is that Unity doesn't have any built-in support for watchOS, thus I have to care about integration of watchOS part by myself.
I have Unity project for the game itself and different Xcode project for watchOS part of the game. Now I combine Unity-generated Xcode project with the necessary parts of watchOS project manually: I create WatchKit App target, then import necessary resources from the separate watchOS-project, setup build settings as required - and that do the thing, I get the game with Apple Watch support.
The thing is, that I need to do automation for this process. But I haven't found some useful information on this topic neither here (on stackoverflow), not did on official apple developers' site, not on unityanswers.com, nor in Xcode documentation.
Thanks in advance.
I am developing a hybrid mobile application in dot net, i have created my own custom plugin using x_code and phone_gap . what are the ways to integrate my plugin to dot_net project.
This is an older question, but maybe this answer can help someone down the road.
This is the approach I have taken with DevExtreme to use a custom plugin and at the same time use the PhoneGap build process.
Upload your plugin to your GitHub Account.
Update your Config.xml
<gap:plugin name="your git hub package url" source="git"/>
(instead of name="" use spec="" and source="git")
NOTE: as of this post there is a bug in DevExtreme that if you attempt to look at Project Properties > PhoneGap Tab Studio will crash. DX is aware and they are suppose to fix it.
Build a custom template (this is the PhoneGap build portion)
Build your project.
I am currently developing an iPhone app in XCode that requires a static library that is built from another XCode project I have made. I currently have both targets in the same project, and I need the static library project to build and run for the proper architecture when I build the project that uses it.
As of now I have to open the static library project on its own, build it from there, find where it was built, and then remove the old library and add the new one to my project that uses it.
How do I do this?
The solution lies within the idea of workspaces. This s.o. thread might also be helpful. I think the general layout youll want to create is a new workspace where you will add both projects, the client and the library, that way they are both within reach.
Best of luck!