HERE SDK: Android PositioningManager.setDataSource(LocationDataSource) does not exist - android

I've followed the instructions for the tutorials for Android using HERE APIs.
PositioningManager.setDataSource(LocationDataSource) doesn't exist as described https://www.developer.here.com/documentation/android-premium/dev_guide/topics/advanced-positioning.html
The documentation needs to be updated or library import needs to be less confusing. I really do not know what's going on. How can I get positioning to work?

Could it be that you are using the Starter Version of SDK which does not have the DataSource feature ? I could see the setDataSource method is available in the HERE Premium SDK.
The setDataSource is intended if you want to provide any external GPS sources (other than mobile device's default) , simple positioning can be started just by calling PositioningManager.start(LocationMethod) (https://www.developer.here.com/documentation/android-premium/dev_guide/topics/map-positioning.html)

Related

How to use simulcast with webrtc android sdk?

(I am newer of stack overflow user and sorry for my poor English.)
I am using WebRtc Android SDK to create a chat app, and our team decides to use
simulcast to deal with various abilities of participants. However, when I come to the SDK APIs, I can not find a way to use simulcast.
I use the SDK with offical-recommended manner:
implementation 'org.webrtc:google-webrtc:1.0.+'
(The concrete version is 1.0.28513.)
I have googled much and found some code fragment like this:
RtpTransceiver.RtpTransceiverInit transceiverInit =
new RtpTransceiver.RtpTransceiverInit(peerConnectionParameters.transDirection, mediaStreamLabels
/*, encodings*/ // cannot create Encoding instances
);
...
peerConnection.addTransceiver(MediaStreamTrack.MediaType.MEDIA_TYPE_VIDEO, transceiverInit);
However, when I try to create Encoding instances,I found the Encoding's constructor cannot be accessed, it is package access limit.
By the way, I have tried using reflection to forcibly create Encoding instances.
But it will cause an error when this code executes as might have been expected:
peerConnection.addTransceiver(MediaStreamTrack.MediaType.MEDIA_TYPE_VIDEO, transceiverInit);
I have also gone through the SDK APIs, and cannot find any other way to set up the simulcast.
So how should I use simulcast with webrtc android SDK?

How to Implement Custom ExpandedControllerActivity in Android Using Cast v3 SDK

I am using Xamarin.Android to develop my current Android app. And I plan to make the application chromecast compatible (users can stream videos). To get this done I am following the tutorial at: Google Cast Docs. However the Xamarin Cast libraries seem to be missing the ExpandedControllerActivity implementation. They should reside under Android.Gms.Cast.Framework.Media.Widget, but I can only find ControlButtonsContainer and MiniControllerFragment.
The only option I can see is to implement a custom ExpandedControllerActivity myself. However I lack the knowledge to do so (because I couldn't even find the java implementation of the ExpandedControllerActivity). Some guidance to get this done, is very much appreciated (it doesn't have to be in C#, just plain old Java will do).
NOTE :- This is my first question over at StackOverflow, so if you are down-voting the question, please state the exact reason.
The java binding for the component cast-framework at Xamarin Google Play Services Components (v10.0.1.0 or v10.0.2.0) doesn't seem to generate the ExpandedControllerActivity. I have created an issue on Github, with a suggested fix.

Does react-native-touch-id support android?

I cant find anything saying one way or the other. Looking through everything, theres no reason that it shouldnt, however I am new to developing on either android or ios, so Im not entirely sure of the different methods available and how they link with react-native and react-native-touch-id
The only thing I can find online is something from two years ago that states react-native-touch-id does not support android "yet". And I found another node package called react-native-touch-id-android which I am having trouble building
I've been able to use React Native Touch ID for both iOS and Android on the latest version of RN. Someone forked this repo to also allow the device passcode as a fallback.
https://github.com/tradle/react-native-local-auth

How to access Android references within Android Studio

My question relates to viewing documentation directly in Android Studio.
For those familiar with Eclipse, I can view all the methods and constructors of a class by clicking on that class and pressing shift and f2. This then takes me to a neat browser within Eclipse that lays out all method signatures and what they do, almost like google docs.
This saves me from having to go to google and search for that classes API each time. For example if I want to view the classes in the "Android.util.log" package, and in turn, the methods in each class, this can easily be done with Eclipse by adding external documentation. For Android Studio, the only way is to go to google and type "Android reference log package" or something, to be taken to https://developer.android.com/reference/android/util/Log.html.
Does something like this exist for Android Studio/InteillJ? If so, could someone please be kind enough to give me steps on how to set it up? I've tried the Ctrl+Q trick but this just gives me a very small overview of a class and not the actual methods within the class.
I also have 2 other questions - and I may get negged for this because I shouldn't ask more than one question in a post - but I feel that these questions are brief and shouldn't need it's own topic. If this poses too much of a problem, feel free to edit this post and I will accept the edit.
I want to create an Android app that makes use of the camera. I know
theres 2 libraries that exist; android.hardware.camera and .camera2,
the latter for API 21 and above. My project is intended to support
API 15 to 24 (and anything newer that is released during
development). Because .camera2 isn't supported by API 15-20, should I
just use .camera throughout my project, or should I target specific API's with different code?
Thirdly, I'm not 100% sure about the concept of targetting various
API levels. If I support API's 15 to 21 and import a library that
say, only supports API 19 and up, and use it in my code, will
Android Studio warn me that this code won't work on any devices
running API 15-18, or will I only find out by testing my code? This saves me from constantly having to look at Android references to see which libraries are supported by which API's.
You can go to the class documentation from Android Studio by Holding down Ctrl key & click on the class name.
For this to work you should have downloaded the Sources for Android SDK in Android SDK Manager. For API levels starting from 15, Sources for Android SDK is available in SDK manager & downloading that will give you the option to view a class documentation.
If you need documentation like in web doc, focus the mouse cursor on the class & press Ctrl+Q which will open a popup & then press Shift+F1 or select View External Documentation icon from popup. You should download Documentation for Android SDK in SDK manager for this to work

com.android.internal.telephony.cat.Duration not found in android

I am a new android developer. I want to develop an app which can access SIM Tool Kit in android mobile. But I haven't found the exact solution online. I found 2 examples:
https://github.com/android/platform_packages_apps_stk
http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android-apps/4.4.2_r1/com/android/stk/StkLauncherActivity.java?av=f
when I import com.android.internal.telephony.cat.Duration class in ADT, it does not find it.
I also found this class here:
https://android.googlesource.com/platform/frameworks/opt/telephony/+/e005c3c44109c9b4a8d25f05e8b7133d5ef55ead/src/java/com/android/internal/telephony/cat/
But I am not able use it.
If you were to google a little bit, you'd find out that this is impossible.
com.android.internal.telephony.cat.Duration has an #hide annotation that means it's not accesible through the SDK
The whole internal package is meant to be internal, i.e. used by android not by developers.
STK itself is not accessible to external apps
However there's also reflection which may be used to access hidden methods. Though I didn't bother to try, this might help.

Categories

Resources