I'm trying to display all available download country list like the image
i had try the getMapPackages (), and i can get a "True" as result, but i have no idea how to perform next steps.
Not sure if you already checked the documentation.
https://developer.here.com/mobile-sdks/documentation/android-hybrid-plus/topics/maps-offline.html
After getMapPackages() , you can show the list on UI as you like and then user selects a Package, you can pass the Id into installMapPackages() method to download the map.You will need to add listner as well as mentioned in the link above.
Hope it Helps !
As Jithin has mentioned you need to add a MapLoader.Listener object by way of the MapLoader#addListener() method. There is example code demonstrating this on the MapLoader documentation page. https://developer.here.com/mobile-sdks/documentation/android-hybrid-plus/topics/maps-offline.html
Once you have added a MapLoader.Listener object, when you call MapLoader#getMapPackages() you will get a callback to MapLoader.Listener#onGetMapPackagesComplete. From here you can use the returned MapPackage object to find the names of the packages available for installation. API documentation for the MapPackage object can be found here: https://developer.here.com/mobile-sdks/documentation/android-hybrid-plus/topics_api_nlp_hybrid_plus/com-here-android-mpa-odml-mappackage.html
Related
I need to track and update download status(start,pause,play,done) of multiple files in a list that I get from some Api (can't share), onto a RecyclerView.
I am also getting a fileId so each file can be distinguished.
I need download tracking based on the fileId because the Download list is also searchable, it means that the position of items will change and so we can't rely on position based ViewHolder refreshing.
Also if for some reason you close the app, and then go back to the list, search the file, it should show the file download status.
Now there are three options :
a) WorkManager based implementation (how this option can be implemented?)
b) PRDownloader (how this option can be implemented?)
c) Or Android's download manager? (Need to be sure that we need to show progress of multiple files at
same time in a list.)
Which one is better and more reliable?
Which one is the shortest method?
Also can someone share if you have code based on work manager?(how
will you manage to relate fileId to workManger's work id. Do I
need to make a DB table for keeping track of downloads by the Worker?
How to use LiveData from workManager, iff we can in the ViewHolder )
[Reference to Blog/Code/Repos will be most helpful]
Answering my own question(strange!).
I used Fetch Downloader Library
Initialized and used the "Fetch Instance" as a Singleton
Added the download using tag (Maybe I wrongly used the tag. It was supposed to be used for group of downloads. But I used one tag for each download. But it worked.)
Now I did following in the ViewHolder's bind() method :
Took the file Id as a "tag" and removed the FetchObserver linked to
the "tag" i.e. Id using the method of "Fetch Instance" (//will update
the method)
Then again find the download in the "Fetch
Instance" using the Id as "tag".(getDownloadsByTag() method)
If there is a download, you will receive a downloadList whose 0th
element will be your download because I am using one tag per download
and not for group.
Now add the FetchObserver again for that
"tag".
Inside the FetchObserver's lambda, update the progress and other values.
Note : The code can not be shared for non-disclosure purposes. Can share small snippets if you find this confusing.
I have searched SO a lot but could not find a similar type question. My requirement is simple. I need to get parameter values from Email from my mailbox.My Email look like follows:
https://ejr3J.app.goo.gl/Rerjk?userId=qE721dmnre2dfmd_fdare55EnDB&session=ZwlkEL54_danbreMEdneENfdfm
When i click on this link it opens the desired activity (deep-linked activity) and getting also the deep link url (www.example.com) but cannot retrieve the parameters values (values of userId and session). I've tried to get the value using deeplinkUri.getQueryParameter("userId"), but it returns null value. Please help to accomplish this task. Any help will be appreciated.
I think you wrong in create dynamic link step.
Instead of add parameter to shortlink after it is generated, you must attach parameter in the link url (www.example.com). Like this: www.example.com?userId=qE721dmnre2dfmd_fdare55EnDB&session=ZwlkEL54_danbreMEdneENfdfm; After that, you generate dynamic link.
I need to get list of all activities listed in google fit just like google fit app .so that user can select a particular activity to insert them into the health kit . Is there any intent builder for achieving this . I read the FitnessActivites class Descripition and Fitness Doc too but did't get the solution .. Can anyone help me out .. i'm stuck here
You can actually get it form AndroidManifest file. Even if its compiled.
Therer is list copied from it (used Notepad++):
com.google.android.apps.fitness.FitnessActivity
com.google.android.apps.fitness.preferences.settings.SettingsActivity
com.google.android.apps.fitness.preferences.DebugSettingsActivity
com.google.android.apps.fitness.location.MapActivity
android.support.PARENT_ACTIVITY
com.google.android.apps.fitness.preferences.settings.SettingsEditor
com.google.android.apps.fitness.preferences.settings.activityeditor.ActivityEdior
com.google.android.apps.fitness.preferences.settings.BleDevicesActivity
com.google.android.apps.fitness.preferences.settings.BlePairingActivity
Hi here is my code to get videos list.
YouTube.Videos.List listVideosRequest = youtube.videos().list("snippet, contentDetails");
listVideosRequest.setKey(apiKey);
I am not able to find a way to set chart parameter( one of the Filter option ). Actually i wanna retrieve videos list of Most popular in my region. Thanks in advance
Try like this.
First check whether you included proper lib or not in your project. Because some times it may not show all methods. for updated library click here.
Once you have updated library then
YouTube.Videos.List listVideosRequest = youtube.videos().list("snippet, contentDetails");
listVideosRequest.setChart("mostPopular");
listVideosRequest.setKey(apiKey);
I want to use the FriendPickerFragment but instead of showing only the picture and name i would like to add more details like where he working? where he live?
Do you know how i can do it? and explain? or point me to example.
I look in the web to solution and didn't find something.
Unfortunately Facebook's FriendPickerFragment does not provide any methods to customize information it presents. The most reasonable solution is to create your own fragment with ListView. You should also create list's adapter feeded with GraphUser objects representing user's friends. List of friends can be obtained from server by using Request.executeMyFriendsRequestAsync(Session, com.facebook.Request.GraphUserListCallback) method.