Citymaps develop in Android Studio - java

When I develop my application with citymaps service to load a base map, I have serval questions as follows:
When I sync the project with grade file,android studio prompt that mini-sdk version no smaller than 15,so I must change mini-sdk to 15,why?
Atfer I sync your gradle file in my project,the software does not prompt the error,but when I run the application,the library is not found and the
software give me tips to add the library to the classpath,why is it so?
I want to locate the current position,Whether or not I need to get my position's latitude and longitude set to the method that you provider in your api reference? Does any method directly to locate the current position? Please tell me where is it? thanks!
When I load the map with the newest method like this:
CitymapsMapFragment fragment = (CitymapsMapFragment)fragmentManager.findFragmentById(R.id.map);
the map is loading very well but does't show an arrow in my current position,if I create my map with additional options,setContentView(mapView). When the map is loading out I can find an arrow in that position. Why is it so?

I am a developer on the Citymaps SDK. I will do my best to answer all your questions
1) Yes, the Citymaps SDK does require a minimum SDK version of 15 (a.k.a Ice Cream Sandwich). We made this decision based off of the APIs we wanted to use as well as the usage statistics of various Android versions (roughly 95% of Android users worldwide are running SDK 15 and higher).
2) If you are including the Citymaps project using gradle's sync, you shoud have no problems building and running our library. Make sure to double check your gradle string. If you still receive and error, it would be helpful to see the stack trace.
3) If the location services are not being triggered on startup, you can try calling fragment.getMapView().startUpdatingLocation(). This should force the system to start tracking your GPS position.
4) Answer to #3 should solve this
Let me know if you have any follow ups. Thank you for trying our SDK, and we hope you can make great use of it.

Related

How to update android app without google play

I'm developing an android app that won't be downloaded via the Google Play store but instead through an APK listed on my website. I was looking for a way to update this app.
I've done some research and I think the best way would be to run an API at the start of the app that checks the downloaded app's version against the version of the APK listed on the website (at the time of app launch). If the version of the website APK is higher, then I prompt the user for an update. Ideally the API would get the APK itself without the user needing to go to the website.
I have some doubts about this that I hope someone can answer however:
First - Once I download the new APK does the old one get deleted or do I have to do that?
Second - How do I keep User Preferences?
If this isn't the right way to do it I'd appreciate any tips.
If it is the right way and you know of some good resources to build an API like this I'd appreciate those too!

DJI SDK Waypoint Mission - UploadMission error

I'm developing an Android Application that uses the DJI SDK. The drone I'm using right now is the Mavic Pro 1. This application wants to use the predefined classes for waypoints inside the DJI SDK to create missions for the drone, but when performing the configuration of the Waypoint mission and correctly loading the mission inisde the Mission Operator (current state is set to: READY_TO_UPLOAD after calling the MissionOperator.loadMission), when trying to perform the "uploadMission" predefined function the app crashes and the Drone automatically disconects of the Application.
I think the waypoints are correctly created and saved inside the builder, otherwise it would fail in the loadMission function. Also the parameters are correct since the checkParameters function is used.
I have seen that some people in previous posts say that you need first to set the application to Ground station mode. But I don't find any indications of this existing inside the DJI SDK documentation, so I think it is deprecated and not needed anymore for current versions of the SDK.
Is the Upload of the mission inside the Operator failing because I am using a Mavic Pro 1 maybe?
If anyone has the correct steps to setup Waypoint missions or knows the error it would be of great help for all the DJI SDK users.
Best regards,
Thanks in advance
Take a look at the example project for the sdk on github. It's all in there.
https://github.com/dji-sdk/Mobile-SDK-Android
Mavic 1 should work with waypoints.
If you include your logcat we might help you, without that and your code, it's almost impossible to tell what you doing wrong.

Google Play Policy for Package Visibility for pre-android 11

I read this link and this question here but there is something I don't understand.
I have this line of code in my app packageManager.getInstalledPackages(flag), However i'm not using the QUERY_ALL_PACKAGES permission which is understandable that I will not be able to receive the user installed packages, that's not an issue as of now for me. However, The first link stated that:
The inventory of installed apps queried from a device are regarded as personal and sensitive user data
So will using this method packageManager.getInstalledPackages(flag) consider a violation and cause my app to be removed from the play store?
Thanks for your time and input.
Using the following method
packageManager.getInstalledPackages(flag)
will not be considered as violations. However this in android 11 will only give you list of packages of open apps to user.

MapBox Android SDK: How to download offline map during app installation?

I am new to the development. At the moment I am working on Android app that is supposed to allow navigating offline. I am using MapBox SDK for this app.
Currently I am searching for how to download an offline region during app installation. As of now I have found solely examples on how to download a region while you are online. But is there a way to provide a chosen region from the start, so that a user isn't obliged to have internet connection to start using the app? And where are downloaded regions stored on the device?
Also Offline plugin seems a bit obscure - https://docs.mapbox.com/android/plugins/overview/offline/
I could not find many examples of its implementation.
I have already followed exemples from official documentation - https://docs.mapbox.com/android/maps/overview/offline/ But this doesn't solve my problem. As it shows downloading a region while being online.
Ideally I would love at the app launch to check connection and if offline, provide user with preloaded app (downloaded during app installation). If online update all resources at the background.
The type of implementation you’re referring to is called “offline sideloading.” It is definitely possible as long as you’re building with one of the more recent versions of the Maps SDK. This section of the documentation goes into greater detail on this process: https://docs.mapbox.com/android/maps/overview/offline/#offline-sideloading
⚠️ Disclaimer: I currently work for Mapbox ⚠️

How to take a picture of in panaroma mode?

I want to make an application that allow the user to take a picture of text either from android device Gallery or from android Camera application in a Panorama mode .But i can not find any source or tutorial to do this.How can i do this in my application? how to make an application that take picture from android camera application in a panaroma mode?
Thanks in advance.
I don't know if it's still actual for you, but hope it will be helpful for someone.
Panorama feature is already implemented in standard android camera at least since Android 4.0 (perhaps it was available in even earlier versions but I'm not sure, you can check it), so since source code is open for everyone, it might be the easiest way just to copy required functionality.
Although you can download source of apps from https://android.googlesource.com/ (you want LegacyCamera or Camera), you can't just open project of any standard app in Eclipse or other IDE. For example, LegacyCamera depends on Gallery2 and other dependences that might be hard to be resolved.
I spent several days trying to move panorama feature to separate project. You can download it from here: https://github.com/yankeppey/PanoramaSample . Several remarks:
Functional core (creating one panorama image from several ones, progress notices, etc) is on native part.
I used java code from from LegacyCamera which was used in Android 4.0-4.1, not 4.2, because it was significantly easier for me. Native part is taken from 4.2, it has only minor changes inside and almost the same JNI interfaces.
This project is just to help you move panorama feature to your own app, it's not like kind of library, don't expect clean code without bugs, it's just pretty dirty and buggy project. If I have time I'll try to make it cleaner, but there is no warranty :)

Categories

Resources