This code return false in Wear API 22:
PackageManager pm = getPackageManager();
boolean hasGps = pm.hasSystemFeature(PackageManager.FEATURE_LOCATION_GPS);
Per default in Android Studio AVD Manager for Wear AVD there is no GPS option. However if I "Clone Device..." (guess same as "New Hardware Profile") an existing one and then edit it, there is an GPS option. Still the AVD does not return true (code above).
There is an option "Import Hardware Profiles".
Does Sony have a "Hardware Profile" which I can import?
How can I test my local Wear GPS (without buying Sony SmartWatch 3 hardware)?
Is there a Sony Smartwatch 3 emulator/AVD/skin?
Not all Android Wear devices provide a GPS unit. Instead, you should use the FusedLocationProviderApi from Google Play Services to request location updates. The nice part about this API is that if your phone and watch are together, it will use the GPS in the phone to save battery - it will only use the GPS on the wearable when it is disconnected from the phone. The FusedLocationProviderApi uses the same API as available on phones, so you can reuse most of your existing code.
Here is a blog post I wrote about this:
http://android-developers.blogspot.com/2014/10/gps-on-android-wear-devices.html
Documentation for FusedLocationProviderApi:
https://developers.google.com/android/reference/com/google/android/gms/location/FusedLocationProviderApi
And a sample that implements this:
https://github.com/googlesamples/android-SpeedTracker
There is no emulator that provides the GPS functionality of the Sony SmartWatch 3.
Related
I'm trying to see why our DJI-enabled app isn't working correctly with the Mavic Air 2 on iOS or Android. Here I'm debugging with iOS but I've seen the same failures when briefly testing on our Android app.
When calling setMode:completion: on the single camera belonging to the Mavic Air 2, I consistently get "Current product does not support this feature.(code:-1013)"
isMediaDownloadModeSupported returns true for the camera, and yet I can't set the camera mode to media download mode at all (or any other mode).
I've found that setFlatMode:completion: seems to work ok to set photo and video modes as a sort of alternative, however this is only for photo/video modes, and won't help me with downloading media from the SD card. (right?)
Any help out there?
From my DJI Developer Support ticket for the same issue:
For the Mavic Air 2 drone, should use the setFlatMode to switch the photo, video mode, and use the enterPlayback, exitPlayback to enter/ exit the download mode.
Has anyone used PanoramaMissionOperator on the mobile SDK for android or iOS? I can't see any example code online. Also it seems to be unclear which products support the use of PanoramaMissionOperator from the documentation. When I attempt to get the state of the PanoramaMissionOperator with a Mavic Pro and Phantom 4 Pro, I get a PanoramaMissionState of DISCONNECTED.
I know the DJI documentation describes how to achieve the same with a Waypoint Mission but some drones miss photos during waypoint missions.
PanoramaMissionOperator operator = MissionControl.getInstance().getPanoramaMissionOperator();
PanoramaMissionState missionState = operator.getCurrentState();
The PanoramaMissions are only supported for OSMO devices, source:
https://developer.dji.com/mobile-sdk/documentation/introduction/component-guide-missions.html -> scroll to the bottom.
Unfortunately the SDK documentation doesn't mention this and the only hint I got there is the description of the DISCONNECTED state: "The connection between the mobile device and Osmo is broken."
https://developer.dji.com/api-reference/android-api/Components/Missions/DJIPanoramaMissionState.html#djipanoramamissionstate_disconnected_inline
Is that possible to connect google assistant with chromecast like netflix.
suppose i have already developed an app for google assistant, app name is test and suppose i have something in the test app to show like report.
Is this possible that,I would say hey google, show report then. It should automatically search chromecast devices nearby and connect to near by chromecast device then show the report on that connected chromecast device.
Yes, this is possible. Since August 2018, voice commands officially work with the following apps:
Netflix
CW
CBS All Access
HBO Now
YouTube
YouTube TV
Viki
Crackle
Red Bull
Starz
Google Play Movies & TV (for videos you’ve already rented or purchased)
To use voice commands with Chromecast, you need a device with Google Assistant (such as the Google Home or Google Home Mini smart speaker), plus a phone or tablet with the Google Assistant app installed. Voice commands also work with some smart TVs that have Chromecast built in (see Google’s website for a list of supported sets). Check this article for more details.
While casting from other sources works, an action is not able to provide content that can be casted to other devices.
https://developer.dji.com/mobile-sdk/documentation/introduction/product_introduction.html#Supported-Products
what does the "-" mean?
Does it mean that spark, mavic can not be accessed and controlled by mobile SDK?
The "-" is for the accessories list (not applicable on the specified products).
Spark and Mavic are definitely supported by the mobile SDK.
You can control drone directly with mobile SDK.
You can use virtual stick input for this. It allows to send 4 axis valus to copter: pitch, roll, yaw, throttle.
You can find some information about this in Simulator tutorial.
Virtual sticks documentation
obstacle avoidance can be turned on and off throug SDK calls. (look at Flight Assistant)
In Android Wear it shows the notification and we can reply back through wearable device. But how to start any app from the Wearable device like voice input("Ok Google") or tap on the icon. Action should start from the wearable device not from mobile.
For Example to start my mobile's camera through Android Wear Device i will give voice input as "start Camera" and camera should start.
With the current preview-version of the SDK, this is not possible yet.
But looking at http://developer.android.com/wear/design/user-interface.html tells you, that this will possible using the "Cue Cards".
You can do this now! :)
With the release of the Wear SDK (API Level 20, Android 4.4W), you can now develop Wear applications with very much the same stack as standard Android apps (i.e. Activities, Services, Layouts, Views, &c).
There is also an API for communication, which for example Google Play Music uses to control media playback from the watch.Therefore, you could develop an application, installed both in the Wear device and in the handheld, to launch the phone's camera when started (by sending the command from the Wear activity).