third party sdk

hi, how do i include a third party android sdk in my fuse app.


i keep getting missing packages when i build the app. the docs from fuse isn’t very clear on putting third party sdk into fuse apps. what are really the steps to take?

Hi Aleme,

although it was asked of you to provide the source code you have made so far (otherwise it’s impossible to help!), you have failed to do so both on this forum post, and in the previous one, and on Slack community.

At least we now see what errors you get (in that other post), and we finally see what is the third party SDK that you are trying to integrate. Great.

Now, could you please share the code you’ve tried so far?

It is the hikr tutorial app.
i added the photo editor sdk https://github.com/ahmed-adel-said/photo-editor-android to the app and i created an .uno file . my aim is to later create a ux file where i can add the fuse camera plugin to take picture and pass the image to the photo editor sdk to manipulate. so i keep getting errors of missing package when uno build --target=Android

using Uno;
using Uno.Collections;
using Fuse;
using Fuse.Scripting;
using Fuse.Controls;
using Fuse.Controls.Native;
using Fuse.Controls.Native.Android;

using Uno.Compiler.ExportTargetInterop;

//[Require("Gradle.Dependency","compile('com.google.android.gms:play-services-ads:11.0.0') { exclude module: 'google-android-gms-iid' }")]
//[Require("Gradle.Dependency","compile('com.github.hoanganhtuan95ptit:EditPhoto:1.0.1')")]
[Require("Gradle.Repository","mavenCentral()")] 
[ForeignInclude(Language.Java, "android.net.Uri")]  
[ForeignInclude(Language.Java, "android.support.annotation.NonNull")]   
[ForeignInclude(Language.Java, "android.util.Log")]           
[ForeignInclude(Language.Java, "com.fuse.Activity")]
[ForeignInclude(Language.Java, "android.content.Intent")]
public class PhotoEditor : NativeModule
{
    public PhotoEditor()
    {
        
        AddMember(new NativeFunction("startCamera", (NativeCallback)StartCamera));
    }

    object StartCamera(Context c, object[] args)
    {
      //  StartCamera();
        return null;
    }
    [Foreign(Language.Java)]
    static extern(Android) void StartCamera()
    @{
       
      //  startedi.startCamera();
    @}

    static extern(!Android) void StartCamera()
    {
        debug_log("PhotoEditor sdk not supported on this platform");
    }
}

here is my hikr.unoproj file

{
  "RootNamespace":"",
  "Packages": [
    "Fuse",
    "FuseJS",
    "Fuse.Camera",
    "Fuse.Android",
    "Android.ActivityUtils"
  ],
  "Includes": [
    "*",
    "*.uno",
    "Modules/*.js:Bundle",
    "photo-editor-android/app/src/main/java/com/ahmedadeltito/photoeditor/widget*.java:Java:Android",
    "photo-editor-android/photoeditorsdk/src/main/java/com/ahmedadeltito/photoeditorsdk/PhotoEditorSDK.java:Java:Android",
    "photo-editor-android/photoeditorsdk/src/main/java/com/ahmedadeltito/photoeditorsdk/BrushDrawingView.java:Java:Android",
    "photo-editor-android/photoeditorsdk/src/main/java/com/ahmedadeltito/photoeditorsdk/MultiTouchListener.java:Java:Android",
    "photo-editor-android/photoeditorsdk/src/main/java/com/ahmedadeltito/photoeditorsdk/OnPhotoEditorSDKListener.java:Java:Android",
    "photo-editor-android/photoeditorsdk/src/main/java/com/ahmedadeltito/photoeditorsdk/ScaleGestureDetector.java:Java:Android",
    "photo-editor-android/photoeditorsdk/src/main/java/com/ahmedadeltito/photoeditorsdk/Vector2D.java:Java:Android",
    "photo-editor-android/photoeditorsdk/src/main/java/com/ahmedadeltito/photoeditorsdk/ViewType.java:Java:Android"
   ]
}

Gave the library a go, couldn’t get it working. Seeing how it relies on having direct access to visuals, you might need to reimplement parts of the library for it to work with Fuse.