Git Product home page Git Product logo

com.stansassets.android-native's Introduction

Android Native Pro

The asset goal is simple. We want to build the best Android Native plugin on the Unity Asset Store. The plugin contains all the Android features you can think of, but in case you miss something, do not hesitate to get in touch.

Get from The Asset Store | Scripting Reference | Wiki | Forum | Support

About Us

We are committed to developing high quality and engaging entertainment software. Our mission has been to bring a reliable and high-quality Unity Development service to companies and individuals around the globe. At Stan's Assets, we make Plugins, SDKs, Games, VR & AR Applications. Do not hesitate do get in touch, whether you have a question, want to build something or just to say hi :) Let's Talk!

Website | LinkedIn | Youtube | Github | AssetStore

Plugin Build principles

Apart from all the statements above, the Ultimate Mobile will inherit all the pro-line plugins development principles:

  • Full Open source. I believe only open-source products can work for the developer community. If you are a junior developer, we will be happy if you learn something with our code. If you are a senior developer, we do not want you to have a “backbox” in your project, and we are always open to critics and suggestions.
  • Strict code convention. We mostly use default the default C# Coding Conventions, but with few adjustments, we believe would help our users.
    • Filename / Class will contain plugin code prefix, so you will always know where it belongs.
    • Every public API is documented. Check our the Scripting References.
  • Nice looking and user-friendly settings editor. Every plugin we make will have one centralized, good-looking, and intuitive settings editor.
  • Ability to enable/disable modules. We understand you want to keep your project as clean as possible and application build size as small as possible. With our plugin only feature you use will be included in the project. You also have to enable explicitly enable the module, so you always aware of what exactly included in the build.
  • Automatic project configuration. You do not have to make any additional configuration for your build. If something is missing, the plugin will fix this with the build pre-processing stage. The main goal is to be able to support cloud build services out of the box.
  • Jar Resolver (EDM4U) Support This is the only proper way to make sure our plugin will play nice will all other 3rd party plugins you may have in your project.

API Convention

We do not want you to learn "another 3rd party plugin" API, that's why Android Native plugin API is mirroring the Google official Java API in a CSharp-ish manner. As an example see the sample how to share text content.

Google Java API. Sample from Send text content guide.

Intent sendIntent = new Intent();
sendIntent.setAction(Intent.ACTION_SEND);
sendIntent.putExtra(Intent.EXTRA_TEXT, "This is my text to send.");
sendIntent.setType("text/plain");

Intent shareIntent = Intent.createChooser(sendIntent, null);
startActivity(shareIntent);

Android Native plugin (C#)

using SA.Android.App;
using SA.Android.Content;
...

AN_Intent sendIntent = new AN_Intent();
sendIntent.SetAction(AN_Intent.ACTION_SEND);
sendIntent.PutExtra(AN_Intent.EXTRA_TEXT, "This is my text to send.");
sendIntent.SetType("text/plain");
AN_MainActivity.Instance.StartActivity(sendIntent);

com.stansassets.android-native's People

Contributors

stan-osipov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

levching

com.stansassets.android-native's Issues

AN_ProxyActivity onStart callback was already fired, activity will be finished

In our project, the intent-filter part is deleted from the code below declared in Plugins/Android/AndroidManifest.xml and exported to the Android project.

image

Afterwards, the apk is being built by adding the intent-filter as shown below in AndroidManifest.xml, which was added by AndroidStudio itself.

image

If you do this, the following error occurs when you use the share function, and it does not work.

image

Is there any solution in this case?

Game crash when open GooglePlay Achievement

Sender: [email protected]
We are using the StansAsset to open the GooglePlay. But since some months ago, it shows the error log like: thisa.lang.ClassNotFoundException: Didn't find class "android.support.v4.util.ArrayMap" on path: DexPathList[[zip file "/data/app/com.myapp-ID==/base.apk"],nativeLibraryDirectories=[/data/app/com.myapp-ID==/lib/arm64, /data/app/com.myapp-ID==/base.apk!/lib/arm64-v8a, /system/lib64]]

Clarification About Ultimate Mobile Pro Unity

Premise: In my game you can buy gems with which you can buy other items in the game.

  1. Gems are a consumer product, right?

  2. In your guide: https://unionassets.com/android-native-pro/purchase-flow-675
    You say "After use has successfully purchased the product, it will stay inside the user inventory, until you consume it. Also if the user will not able to purchase the same product before you consume it from the inventory", but I bought more times the same product. Why? https://drive.google.com/file/d/1IforDeQjmEgGXPqKaWCpaYmWeXr3MY3H/view?usp=sharing

  3. It is possible that the client is not able to correctly send the purchase token to my server, to solve this problem what should I do? If I use PlayerPrefs and all PlayerPrefs are deleted in the meantime, how can I recover the user's purchase?

  4. I found this thread on the web: https://stackoverflow.com/questions/56289258/how-does-acknowledgepurchase-really-work-on-android

  • Do I have to confirm user purchases?
  • How can I validate purchases?
  • How can I use the items in the inventory?

Local notification is not shown

Hello everyone,
When my application is in the background I receive local notifications, while if my application is killed, or the internet connection is turned off, I no longer receive local notifications.
If I subsequently activate my internet connection, I get local notifications even if my application has been killed.

I use "Ultimate Mobile Pro", my current code:
`

    string channelId = "my_channel_id";
    string name = "My Channel Name";
    string description = "My Channel Description";
    var importance = AN_NotificationManager.Importance.DEFAULT;

    AN_NotificationChannel channel = new AN_NotificationChannel(channelId, name, importance);
    channel.Description = description;
    
    // you can check if channel exists before re-recreating it
    AN_NotificationManager.CreateNotificationChannel(channel);

    var builder = new AN_NotificationCompat.Builder();
    builder.SetChanelId(channelId);
    builder.SetContentText(title);
    builder.SetContentTitle(body);
    builder.SetSmallIcon("android_icon_1");

    //var notification = builder.Build();
    //AN_NotificationManager.Notify(notification); //Notify doesn't exist!!

    var trigger = new AN_AlarmNotificationTrigger();
    trigger.SetDate(TimeSpan.FromSeconds(seconds));

    var request = new AN_NotificationRequest(requestID, builder, trigger);
    AN_NotificationManager.Schedule(request);
`

Thanks for the attention

Android Native - Date Picker Bug

The date picker always returns Year 0, Month 0, Day 0.
Please notice how the logging actually shows the correct date, yet the values in Unity are incorrect!
2020/07/15 14:43:30.991 26063 26079 Debug AndroidNative Unity: [Async] Sent to Unity ->: {"m_day":4,"m_month":5,"m_year":2019}

The following code is used for showing the user the dialog:

using SA.Android.App;
using UnityEngine;

public class DatePicker : MonoBehaviour
{
    protected void Awake()
    {
        var date = DateTime.Now;
        int year = date.Year;
        int month = date.Month - 1; //Compatibility with Android Calendar..
        int day = date.Day;

        AN_DatePickerDialog picker = new AN_DatePickerDialog(year, month, day);
        picker.Show((result) => {
            if(result.IsSucceeded) {
                Debug.Log("date picked result.Year: "  + result.Year);
                //Same  Android Calendar Compatibility
                Debug.Log("date picked result.Month: " + result.Month + 1);
                Debug.Log("date picked result.Day: " + result.Day);
            } else { 
                Debug.Log("Failed to pick a date: " + result.Error.FullMessage);
            }
        });
    }
}

Output log:

0001/01/01 00:00:00.000 -1 -1 Info  --------- beginning of main
2020/07/15 14:42:20.979 26063 26063 Error Zygote isWhitelistProcess - Process is Whitelisted
0001/01/01 00:00:00.000 -1 -1 Info  --------- beginning of system
2020/07/15 14:42:20.979 26063 26063 Error libpersona scanKnoxPersonas
2020/07/15 14:42:20.980 26063 26063 Error libpersona Couldn't open the File - /data/system/users/0/personalist.xml - No such file or directory
2020/07/15 14:42:20.982 26063 26063 Warn SELinux SELinux selinux_android_compute_policy_index : Policy Index[2],  Con:u:r:zygote:s0 RAM:SEPF_SM-G930F_8.0.0_0018, [-1 -1 -1 -1 0 1]
2020/07/15 14:42:20.983 26063 26063 Info SELinux SELinux: seapp_context_lookup: seinfo=untrusted, level=s0:c512,c768, pkgname=com.DefaultCompany.StansAssetsTest 
2020/07/15 14:42:21.005 26063 26063 Debug ActivityThread Added TimaKeyStore provider
2020/07/15 14:42:21.074 26063 26063 Info zygote no shared libraies, dex_files: 1
2020/07/15 14:42:21.308 26063 26063 Debug ViewRootImpl@5e064d5[UnityPlayerActivity] setView = DecorView@10204ea[UnityPlayerActivity] TM=true MM=false
2020/07/15 14:42:21.323 26063 26063 Verbose InputMethodManager Not IME target window, ignoring
2020/07/15 14:42:21.323 26063 26063 Debug ViewRootImpl@5e064d5[UnityPlayerActivity] dispatchAttachedToWindow
2020/07/15 14:42:21.334 26063 26063 Verbose Surface sf_framedrop debug : 0x4f4c, game : false, logging : 0
2020/07/15 14:42:21.335 26063 26063 Debug ViewRootImpl@5e064d5[UnityPlayerActivity] Relayout returned: old=[0,0][0,0] new=[0,0][1080,1920] result=0x7 surface={valid=true 3274201088} changed=true
2020/07/15 14:42:21.338 26063 26063 Debug SurfaceView BG show() Surface(name=Background for - SurfaceView - com.DefaultCompany.StansAssetsTest/com.unity3d.player.UnityPlayerActivity@f4f7951@0) android.view.SurfaceView{f4f7951 VFE...... .F....ID 0,0-1080,1920 #7f0700a1 app:id/unitySurfaceView}
2020/07/15 14:42:21.340 26063 26063 Verbose Surface sf_framedrop debug : 0x4f4c, game : false, logging : 0
2020/07/15 14:42:21.340 26063 26063 Debug SurfaceView surfaceCreated 1 android.view.SurfaceView{f4f7951 VFE...... .F....ID 0,0-1080,1920 #7f0700a1 app:id/unitySurfaceView}
2020/07/15 14:42:21.340 26063 26063 Debug SurfaceView surfaceChanged (1080,1920) 1 android.view.SurfaceView{f4f7951 VFE...... .F....ID 0,0-1080,1920 #7f0700a1 app:id/unitySurfaceView}
2020/07/15 14:42:21.343 26063 26063 Debug ViewRootImpl@5e064d5[UnityPlayerActivity] MSG_RESIZED_REPORT: frame=Rect(0, 0 - 1080, 1920) ci=Rect(0, 0 - 0, 0) vi=Rect(0, 0 - 0, 0) or=1
2020/07/15 14:42:21.343 26063 26063 Debug ViewRootImpl@5e064d5[UnityPlayerActivity] MSG_WINDOW_FOCUS_CHANGED 1
2020/07/15 14:42:21.344 26063 26063 Verbose InputMethodManager Starting input: tba=android.view.inputmethod.EditorInfo@17385b6 nm : com.DefaultCompany.StansAssetsTest ic=null
2020/07/15 14:42:21.344 26063 26063 Info InputMethodManager startInputInner - mService.startInputOrWindowGainedFocus
2020/07/15 14:42:21.350 26063 26063 Verbose InputMethodManager Starting input: tba=android.view.inputmethod.EditorInfo@1b192b7 nm : com.DefaultCompany.StansAssetsTest ic=null
2020/07/15 14:42:21.368 26063 26063 Verbose Surface sf_framedrop debug : 0x4f4c, game : false, logging : 0
2020/07/15 14:42:21.368 26063 26063 Debug ViewRootImpl@5e064d5[UnityPlayerActivity] Relayout returned: old=[0,0][1080,1920] new=[0,0][1080,1920] result=0x7 surface={valid=true 3274278912} changed=true
2020/07/15 14:42:22.090 26063 26079 Info Unity SystemInfo CPU = ARM64 FP ASIMD AES, Cores = 8, Memory = 3537mb
2020/07/15 14:42:22.091 26063 26079 Info Unity SystemInfo ARM big.LITTLE configuration: 4 big (mask: 0xf0), 4 little (mask: 0xf)
2020/07/15 14:42:22.092 26063 26079 Info Unity ApplicationInfo com.DefaultCompany.StansAssetsTest version 0.1 build c5c15999-81c7-436d-b216-998564a1bb04
2020/07/15 14:42:22.092 26063 26079 Info Unity Built from '2019.4/staging' branch, Version '2019.4.2f1 (20b4642a3455)', Build type 'Release', Scripting Backend 'mono', CPU 'armeabi-v7a', Stripping 'Disabled'
2020/07/15 14:42:22.105 26063 26063 Debug ViewRootImpl@5e064d5[UnityPlayerActivity] Relayout returned: old=[0,0][1080,1920] new=[0,0][1080,1920] result=0x1 surface={valid=true 3274278912} changed=false
2020/07/15 14:42:22.124 26063 26063 Debug ViewRootImpl@5e064d5[UnityPlayerActivity] Relayout returned: old=[0,0][1080,1920] new=[0,0][1080,1920] result=0x1 surface={valid=true 3274278912} changed=false
2020/07/15 14:42:22.286 26063 26079 Error vulkan invalid vkGetInstanceProcAddr(VK_NULL_HANDLE, "vkEnumerateInstanceVersion") call
2020/07/15 14:42:22.291 26063 26079 Info vndksupport sphal namespace is not configured for this process. Loading /vendor/lib/hw/vulkan.exynos5.so from the current namespace instead.
2020/07/15 14:42:22.304 26063 26079 Debug vulkan searching for layers in '/data/app/com.DefaultCompany.StansAssetsTest-X0jfRMelJzT4DMDri_1cLw==/lib/arm'
2020/07/15 14:42:22.306 26063 26079 Debug vulkan searching for layers in '/data/app/com.DefaultCompany.StansAssetsTest-X0jfRMelJzT4DMDri_1cLw==/base.apk!/lib/armeabi-v7a'
2020/07/15 14:42:22.306 26063 26079 Debug vulkan vulkan api version_1_0 1.0.0
2020/07/15 14:42:22.306 26063 26079 Debug vulkan vulkan header version 46
2020/07/15 14:42:22.375 26063 26079 Debug vulkan vulkan api version_1_0 1.0.0
2020/07/15 14:42:22.375 26063 26079 Debug vulkan vulkan header version 46
2020/07/15 14:42:22.590 26063 26079 Info zygote android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0
2020/07/15 14:42:22.590 26063 26079 Info zygote android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0
2020/07/15 14:42:22.690 26063 26124 Debug AudioTrack Client defaulted notificationFrames to 1365 for frameCount 4096
2020/07/15 14:42:22.699 26063 26124 Warn AudioTrack Use of stream types is deprecated for operations other than volume control
2020/07/15 14:42:22.699 26063 26124 Warn AudioTrack See the documentation of AudioTrack() for what to use instead with android.media.AudioAttributes to qualify your playback use case
2020/07/15 14:42:22.700 26063 26124 Info AudioTrack updateAudioTranstionLength FadeIn[0] FadeOut[0] FadeInRing[0]
2020/07/15 14:42:23.225 26063 26079 Info zygote android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0
2020/07/15 14:42:23.226 26063 26079 Info zygote android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0
2020/07/15 14:42:23.255 26063 26079 Verbose MediaRouter Adding route: RouteInfo{ name=Phone, description=null, status=null, category=RouteCategory{ name=System types=ROUTE_TYPE_LIVE_AUDIO ROUTE_TYPE_LIVE_VIDEO  groupable=false }, supportedTypes=ROUTE_TYPE_LIVE_AUDIO ROUTE_TYPE_LIVE_VIDEO , presentationDisplay=null }
2020/07/15 14:42:23.263 26063 26079 Verbose MediaRouter Selecting route: RouteInfo{ name=Phone, description=null, status=null, category=RouteCategory{ name=System types=ROUTE_TYPE_LIVE_AUDIO ROUTE_TYPE_LIVE_VIDEO  groupable=false }, supportedTypes=ROUTE_TYPE_LIVE_AUDIO ROUTE_TYPE_LIVE_VIDEO , presentationDisplay=null }
2020/07/15 14:42:25.676 26063 26079 Error AndroidNative Log Level is set
2020/07/15 14:42:25.692 26063 26079 Debug AndroidNative Unity: Sent to Java -> AN_UnityBridge.RegisterMessageHandler
2020/07/15 14:42:25.692 26063 26079 Debug AndroidNative Handler registered
2020/07/15 14:42:25.705 26063 26079 Debug AndroidNative StrictMode set
2020/07/15 14:42:25.711 26063 26079 Debug AndroidNative Unity: Sent to Java -> AN_DatePickerDialog.Show :: {"m_year":2020,"m_month":6,"m_day":15}
2020/07/15 14:42:25.859 26063 26079 Debug ScrollView initGoToTop
2020/07/15 14:42:25.962 26063 26079 Info chatty uid=10036(u0_a36) UnityMain identical 1 line
2020/07/15 14:42:25.964 26063 26079 Debug ScrollView initGoToTop
2020/07/15 14:42:25.989 26063 26079 Debug ViewRootImpl@39c3dae[UnityPlayerActivity] setView = DecorView@6e5774f[] TM=true MM=false
2020/07/15 14:42:26.050 26063 26079 Debug AndroidNative Preferred storage set to External
2020/07/15 14:42:26.068 26063 26079 Debug ViewRootImpl@39c3dae[UnityPlayerActivity] dispatchAttachedToWindow
2020/07/15 14:42:26.102 26063 26063 Debug ViewRootImpl@5e064d5[UnityPlayerActivity] Relayout returned: old=[0,0][1080,1920] new=[0,0][1080,1920] result=0x1 surface={valid=true 3274278912} changed=false
2020/07/15 14:42:26.142 26063 26079 Verbose Surface sf_framedrop debug : 0x4f4c, game : false, logging : 0
2020/07/15 14:42:26.142 26063 26079 Debug ViewRootImpl@39c3dae[UnityPlayerActivity] Relayout returned: old=[0,0][0,0] new=[60,181][1020,1738] result=0x27 surface={valid=true 3094573056} changed=true
2020/07/15 14:42:26.145 26063 26079 Debug ScrollView  onsize change changed 
2020/07/15 14:42:26.145 26063 26079 Debug ScrollView  onsize change changed 
2020/07/15 14:42:26.148 26063 26079 Debug ViewRootImpl@39c3dae[UnityPlayerActivity] MSG_WINDOW_FOCUS_CHANGED 1
2020/07/15 14:42:26.157 26063 26063 Debug ViewRootImpl@5e064d5[UnityPlayerActivity] Relayout returned: old=[0,0][1080,1920] new=[0,0][1080,1920] result=0x1 surface={valid=true 3274278912} changed=false
2020/07/15 14:42:26.275 26063 26079 Debug ViewRootImpl@39c3dae[UnityPlayerActivity] MSG_RESIZED_REPORT: frame=Rect(60, 181 - 1020, 1738) ci=Rect(0, 0 - 0, 0) vi=Rect(0, 0 - 0, 0) or=1
2020/07/15 14:42:26.302 26063 26063 Debug ViewRootImpl@5e064d5[UnityPlayerActivity] MSG_WINDOW_FOCUS_CHANGED 0
2020/07/15 14:42:26.449 26063 26063 Debug ViewRootImpl@5e064d5[UnityPlayerActivity] Relayout returned: old=[0,0][1080,1920] new=[0,0][1080,1920] result=0x1 surface={valid=true 3274278912} changed=false
2020/07/15 14:43:25.779 26063 26079 Debug ViewRootImpl@39c3dae[UnityPlayerActivity] ViewPostIme pointer 0
2020/07/15 14:43:25.829 26063 26079 Debug ViewRootImpl@39c3dae[UnityPlayerActivity] ViewPostIme pointer 1
2020/07/15 14:43:26.518 26063 26079 Debug ViewRootImpl@39c3dae[UnityPlayerActivity] ViewPostIme pointer 0
2020/07/15 14:43:26.560 26063 26079 Debug ViewRootImpl@39c3dae[UnityPlayerActivity] ViewPostIme pointer 1
2020/07/15 14:43:26.591 26063 26079 Verbose InputMethodManager Not IME target window, ignoring
2020/07/15 14:43:26.600 26063 26079 Debug AbsListView  in onLayout changed 
2020/07/15 14:43:27.655 26063 26079 Debug ViewRootImpl@39c3dae[UnityPlayerActivity] ViewPostIme pointer 0
2020/07/15 14:43:27.707 26063 26079 Debug ViewRootImpl@39c3dae[UnityPlayerActivity] ViewPostIme pointer 1
2020/07/15 14:43:27.707 26063 26079 Debug AbsListView onTouchUp() mTouchMode : 0
2020/07/15 14:43:29.078 26063 26079 Debug ViewRootImpl@39c3dae[UnityPlayerActivity] ViewPostIme pointer 0
2020/07/15 14:43:29.162 26063 26079 Debug ViewRootImpl@39c3dae[UnityPlayerActivity] ViewPostIme pointer 1
2020/07/15 14:43:29.714 26063 26079 Debug ViewRootImpl@39c3dae[UnityPlayerActivity] ViewPostIme pointer 0
2020/07/15 14:43:29.760 26063 26079 Debug ViewRootImpl@39c3dae[UnityPlayerActivity] ViewPostIme pointer 1
2020/07/15 14:43:30.718 26063 26079 Debug ViewRootImpl@39c3dae[UnityPlayerActivity] ViewPostIme pointer 0
2020/07/15 14:43:30.785 26063 26079 Debug ViewRootImpl@39c3dae[UnityPlayerActivity] ViewPostIme pointer 1
2020/07/15 14:43:30.857 26063 26079 Debug ViewRootImpl@39c3dae[UnityPlayerActivity] dispatchDetachedFromWindow
2020/07/15 14:43:30.860 26063 26079 Debug InputEventReceiver channel 'a77f307 com.DefaultCompany.StansAssetsTest/com.unity3d.player.UnityPlayerActivity (client)' ~ Disposing input event receiver.
2020/07/15 14:43:30.860 26063 26079 Debug InputEventReceiver channel 'a77f307 com.DefaultCompany.StansAssetsTest/com.unity3d.player.UnityPlayerActivity (client)' ~NativeInputEventReceiver.
2020/07/15 14:43:30.894 26063 26063 Debug ViewRootImpl@5e064d5[UnityPlayerActivity] MSG_WINDOW_FOCUS_CHANGED 1
2020/07/15 14:43:30.991 26063 26079 Debug AndroidNative Unity: [Async] Sent to Unity ->: {"m_day":4,"m_month":5,"m_year":2019}
2020/07/15 14:43:31.035 26063 26079 Info Unity date picked result.Year: 0 
2020/07/15 14:43:31.035 26063 26079 Info Unity (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)
2020/07/15 14:43:31.035 26063 26079 Info Unity 
2020/07/15 14:43:31.044 26063 26079 Info Unity date picked result.Month: 01 
2020/07/15 14:43:31.044 26063 26079 Info Unity (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)
2020/07/15 14:43:31.044 26063 26079 Info Unity 
2020/07/15 14:43:31.044 26063 26079 Info Unity date picked result.Day: 0 
2020/07/15 14:43:31.044 26063 26079 Info Unity (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)
2020/07/15 14:43:31.044 26063 26079 Info Unity 
2020/07/15 14:43:31.050 26063 26079 Error ViewRootImpl sendUserActionEvent() returned.

WheelPickerDialog Unusable

Because you can't tell the difference between scrolling, clicking OK, and clicking cancel, the successful event is fired before the user even makes a selection.

For example:

AN_WheelPickerDialog picker = new AN_WheelPickerDialog( ... );
picker.Show( … );

You get a callback no matter what. The was you did the code on iOS was PERFECT.
iOS:
private static void iOSWheelCallback(ISN_UIWheelPickerResult result) { ... }

And you can tell what's happening:

result.State == ISN_UIWheelPickerStates.Done
result.State == ISN_UIWheelPickerStates.InProgress
result.State == ISN_UIWheelPickerStates.Canceled

Please do this again for Android, when you do the cross platform plugin, you could use the same enum:

using SA.CrossPlatform.UI; // or something
result.State == UM_WheelPickerStates.Done

AAN_CameraAdGalleryExample "Filed: User denied permission."

i try to test ((AAN_CameraAdGalleryExample))

1- if i click (captureAdvanced button) it say "Filed: User denied permission."
in device and in editor.
log :
Filed: User denied permission.
UnityEngine.Debug:Log(Object)
AN_CameraAdGalleryExample:PrintCaptureResult(AN_CameraCaptureResult) (at Assets/Plugins/StansAssets/NativePlugins/AndroidNativePro/Samples/AppExamples/CameraAdGalleryExample/AN_CameraAdGalleryExample.cs:159)
AN_CameraAdGalleryExample:b__10_6(AN_CameraCaptureResult) (at Assets/Plugins/StansAssets/NativePlugins/AndroidNativePro/Samples/AppExamples/CameraAdGalleryExample/AN_CameraAdGalleryExample.cs:58)
SA.Android.Camera.<>c__DisplayClass1_0:b__0(Boolean) (at Assets/Plugins/StansAssets/NativePlugins/AndroidNativePro/Runtime/API/Camera/AN_Camera.cs:37)
SA.Android.App.AN_PermissionsUtility:TryToResolvePermission(AMM_ManifestPermission[], Action1) (at Assets/Plugins/StansAssets/NativePlugins/AndroidNativePro/Runtime/API/App/Permissions/AN_PermissionsUtility.cs:48) SA.Android.Camera.AN_Camera:CaptureImage(Int32, Action1) (at Assets/Plugins/StansAssets/NativePlugins/AndroidNativePro/Runtime/API/Camera/AN_Camera.cs:30)
AN_CameraAdGalleryExample:b__10_0() (at Assets/Plugins/StansAssets/NativePlugins/AndroidNativePro/Samples/AppExamples/CameraAdGalleryExample/AN_CameraAdGalleryExample.cs:56)
UnityEngine.EventSystems.EventSystem:Update() (at D:/ProgramfilesD/AllUnityEditerNJ2/2019.4.15f1/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/EventSystem/EventSystem.cs:377)

========================================================
1
2

2- if i click (Save screenshot button) it is not working ,,
and after i searching the net
i found that if i added this to manifist it will work fine :
application android:requestLegacyExternalStorage="true"

3- all other buttons not working in device.

Local Notification Icon not visible in notification drawer

As you can see in my attached screenshots, the LocalNotification icon (small notification icon) is displayed correctly in the status bar.
But in the notification drawer it is not visible because of the white background. How can I fix this with "Android Native Pro".
Is there any way to change the color of the small icon?

Screenshot_20210804-141411_Samsung Experience Home
Screenshot_20210804-140251_Samsung Experience Home

Support for Google Fit

I think in one of the previous version, we have Google Fit support. Does the current version have that ?

INTERNAL_ERROR on google play services sign in

Hi,

Over the last couple of days i have been running into the same issue. Error code 8 INTERNAL_ERROR, when trying to do the google sign in.
image

I have tried in several projects now. The one i am testing at the moment contains only the Stans Assets plugin. Here i am using the AN_GMS_Auth_Exampe scene to test the functionality with a fresh now google console app/game. I have tried following the setup meticulously. Double checked the signing keys, package names but i can't seem to find the issue. I also added both the Debug key and also a release key in the console/cloud.

Have you experienced anything similar? or is there something i am missing?
I hope you can assist in the quest for finding a solution! Thanks in advance.

In case you need more info, please, let me know!

Niklas,

Time Picker

The android native plugin includes a DatePicker but is missing a TimePicker. The iOS version of this asset includes both so it would be very nice for them to both offer the same functionality.

TimePicker API.

The time picker will look something like this:

image

Thank you.

checking local notificaiton permission bug

checking local notificaiton permission gets a denied result
var result =
AN_PermissionsManager.CheckSelfPermission(AMM_ManifestPermission.ACCESS_NOTIFICATION_POLICY);

Auto generate a class file with constants for Achievements and Leaderboards ids

Hello, there is a small issue with Android google play game services setting window. After I setup the game resources, subsequent updates do not get reflected on the configuration section. I managed to get the updated settings by restarting the Unity editor. To reproduce this simply setup a configuration, then press the Update Game Resource and remove or add an Achievement. The message will say that the games-ids.xml has been updated, but the Configuration UI remains the same.

Also as a side note here, it would be really nice for the plugin to auto generate a class file with constants for Achievements and Leaderboards ids, so that we can easily use the correct codes. The 'official' google play services for unity plugin has this feature. https://github.com/playgameservices/play-games-plugin-for-unity

Check Full Size Photo API

The issue is, when I set ‘Camera Capture Mode’ in setting to ‘Full Size Photo’, the game don’t load the photo after clicking. The camera closes and game screen is shown, but I don’t get the callback. But if I set it to ‘Thumbnail’, and everything works as intended. Can you help me in finding what is messed up or is there something I am missing. All permissions and callbacks are properly integrated.

Typo in AN_Camera.cs causes unintended "User denied permission." error.

Steps to reproduce:

  • Setup a project that uses the Camera API.
  • Grant the appropriate permissions.
  • Call CaptureImage(int maxSize, Action<AN_CameraCaptureResult> callback)

Expected result:

  • If permissions are granted the app switches to the camera.

Actual result:

  • The callback returns with an error saying "User denied permission."

I found that the issue was caused by a missing negation in an if statement:

        public static void CaptureImage(int maxSize, Action<AN_CameraCaptureResult> callback)
        {
            AN_PermissionsUtility.TryToResolvePermission(
                CameraApiCameraApiRequiredPermissions,
                granted =>
                {
                    if (granted)
                    {
                        var result = new AN_CameraCaptureResult(new SA_Error(9, "User denied permission."));
                        callback.Invoke(result);
                        return;
                    }
             //...

I'm using Android Native version 2020.10.2.

Google play sign in problem

Sender: [email protected]
NOTE: my other Android devices, running Android 8, 8.1 and 9 are all working with your plug in
You can see the Android intent open, but then freeze
image

Reproduction steps:

  1. Have Android 11 (Tested here with Galaxy S 10, but happens on ALL other Android 11 devices we have)
  2. run AN_Camera.CaptureImage
    Expected Results:
    Picture viewer opens
    Actual Results:
    The Android intent freezes are per attached video.
    Tested on:
    Unity Version 2019.4.30f1,
    Operating System - Built on OSX
    Plugin Version 2021.1
Video-1.mov

android.content.ActivityNotFoundException error

We've been upgrading our project to the latest versions of Android & iOS Native Pro.
On the Android side we appear to have hit this particular issue that someone else has reported in the Unity forum
https://forum.unity.com/threads/released-android-native-pro.551020/page-4#post-6568654 https://forum.unity.com/threads/released-android-native-pro.551020/page-4#post-6568654

In our instance the exact error is:

01-11 18:36:28.731 14961 14979 E Unity : AndroidJavaException: android.content.ActivityNotFoundException: Unable to find
explicit activity class {com.beliefengine.handyapp/com.stansassets.android.app.permissions.AN_PermissionsProxyActivity}; have you declared this activity in your AndroidManifest.xml?
01-11 18:36:28.731 14961 14979 E Unity : android.content.ActivityNotFoundException: Unable to find explicit activity class {com.beliefengine.handyapp/com.stansassets.android.app.permissions.AN_PermissionsProxyActivity}; have you declared this activity in your AndroidManifest.xml?
01-11 18:36:28.731 14961 14979 E Unity : at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:2005)
01-11 18:36:28.731 14961 14979 E Unity : at android.app.Instrumentation.execStartActivity(Instrumentation.java:1673)
01-11 18:36:28.731 14961 14979 E Unity : at android.app.Activity.startActivityForResult(Activity.java:4587)
01-11 18:36:28.731 14961 14979 E Unity : at android.app.Activity.startActivityForResult(Activity.java:4545)
01-11 18:36:28.731 14961 14979 E Unity : at android.app.Activity.startActivity(Activity.java:4906)
01-11 18:36:28.731 14961 14979 E Unity : at android.app.Activity.startActivity(Activity.java:4874)
01-11 18:36:28.731 14961 14979 E Unity : at com.stansassets.android.app.permissions.AN_PermissionsProxyActivity.Create(AN_PermissionsProxyActivity

We have the Auto Manifest Management enabled. Usually we've been able to let this plugin manage it just fine and never run into permission problems there.

Video recording not working anymore (v2021.2)

Android 6/10/?:
I've updated to 2021.2 and I do not get the video path anymore. What I get instead is a thumbnail jpg path:

AN_Camera.CaptureVideo((result) => OnMediaCaptured(result));

result.Media.Path is somthing like:

/data/user/0/de.kids_interactive.OurApp/files/JPEG_20210716_1124141403802103.jpg

The plugin is showing the native video camera and you can capture a movie.

iOS 12.4.5:
Native video view starts but when you start to capture, it stops immediately and you get a video with 1 frame length. But at least it returns a video.

iOS 14.5.1 is working.

So why is that. Was working before. Can you help us. Thank you.

iOS Native pro: GetAuthorizationStatus bug

Sender: [email protected]
By using ISN_AVCaptureDevice.GetAuthorizationStatus(ISN_AVMediaType.Video) bug occurs:

2021-09-28 16:54:58.163647-0400 Fold-Test[1253:535445] IOSNative::LogLevel -> info:true  warning:true error:true
NotImplementedException: The method or operation is not implemented.
  at SA.iOS.AVFoundation.ISN_AVCaptureDevice.GetAuthorizationStatus (SA.iOS.AVFoundation.ISN_AVMediaType video) [0x00000] in <00000000000000000000000000000000>:0 
  at SceneController.Start () [0x00000] in <00000000000000000000000000000000>:0 

Android Date AND Time picker

Hello,

iOS has a way to pick both the date and time in one screen and UI.

n9gLq

I know you have the giant calendar selection, and then you can show the giant time picker.
What about putting in the same rolling lists?

1XQg5
QOhD5
CHzmN

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.