We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I didn't found appDeviceId getter method. I've never worked with Java language, so don't blame code quality. My workaround was:
private void handleGetDeviceId(MethodCall call, Result result) { try { System.out.println("Getting DeviceID"); final String[] deviceId = new String[1]; AppMetricaDeviceIDListener listener = new AppMetricaDeviceIDListener() { @Override public void onLoaded(@Nullable String s) { deviceId[0] = s; System.out.println("s loaded: " + s); System.out.println("deviceId[0] set: " + deviceId[0]); } @Override public void onError(@NonNull AppMetricaDeviceIDListener.Reason reason) { System.out.println("DeviceID loading error"); } }; YandexMetrica.requestAppMetricaDeviceID(listener); TimeUnit.SECONDS.sleep(1); System.out.println("deviceId[0] loaded: " + deviceId[0]); result.success(deviceId[0]); } catch (Exception e) { Log.e(TAG, e.getMessage(), e); result.error("Error getting Device ID", e.getMessage(), null); } }
It worked. Please fell free to take it as a starting point.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I didn't found appDeviceId getter method.
I've never worked with Java language, so don't blame code quality.
My workaround was:
It worked. Please fell free to take it as a starting point.
The text was updated successfully, but these errors were encountered: