Android : droidar setting up POIs and show details on click - android

In my app i want to use augmented reality to show some predefined POIs . When user click on the POI object, i want to show more detail about that store / object.
As i was looking for free AR framework , i came across Droidar. I saw its wiki and samples and have got an idea about structure. I understood how to add POIs. I need help on making them as clickable and adding an event on click.
Please share any tutorials if you know.
Also what is the link for droidar documentations.

You could always attach a setOnClickCommand to your POI
poiObj.gObj.setOnClickCommand(new POIDisplayCommand(getActivity(), poiObj));
In the above case I have a POI object poiObj which has a GeoObj member gObj. By using the setOnClickCommand I have called a POIDisplayCommand which loads a new Activity which displays the details about the clicked POI. The POIDispplayCommand is a class that extends the commands.Command
If you need more on the above method you could always check the StaticDemoSetup.java in de.rwth.setups package of the DroidAR library in your IDE.

Related

How to Request for Alternative Routes In here maps SDK (Android)?

Before starting the navigation I wanted to show Alternative routes for the user and I will watch selection from "onMapObjectsSelected". I saw this "new RouteOptions().setRouteCount(mutltipleroutecount)" instead of this do we have any other method.enter image description here
As HERE Support has already requested, we need to see the example code or your code to suggest our help.

get List of all activites listed in google fit

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

I'm building a dynamic form in Android using RecyclerView and I need to save the state of the form

First of all I'm not native english speaker so I'm sorry if there is any grammar or spilling mistakes but I'm really trying to do my best here.
OK, I'm developing an application in android system for e-commerce, the user can add any product to sell, but as you know there are many filters questions.
For example if the user want to sell a car he has to select the model and the company of the car, but if he want to sell a mobile then the questions changed to select the storage for example and the model and the company questions will be deleted, so the questions here are dynamic.
I already developed the form using RecyclerView and its look great.
figure1
figure2
figure3
The problem that when I used
notifydatasetchanged
The form data get mixed!
I solved this problem using
notifyItemRangeRemoved and notifyItemRangeInserted
So it's working great, but I still confused why this is happened?
The second problem that is the dynamic form is a fragment called "DynamicFormBuilderFragment" and sometimes I have to replace it with another fragment like "Google Maps fragment" for example the problem that when I call back the "DynamicFormBuilderFragment" all my data is Lost and the form get duplicated!
Like this
figure4
I want to put some codes but really I don't know what to put because they all are too long and complex, but for start I think this problem because I made the RecyclerView.Adapter not static, I will try for now to made it static and see what happens, but I still need your help please.
Thanks for reading and I wish to you a great day and happy coding.
Update
this is my java files and classes
AddAds.class extends ActionBarActivity
DynamicFormBuilderFragment.class extends Fragment // is contain RecyclerView + Adapter + LoadToAdapter + questions classes and it's where dynamic form get build.
GoogleMaps.class extends Fragment
SLOVED!
I Replaced the RecyclerView with the ListView and it's working great now so thanks #greenapps.
I think it's a bug so I will reported to Google.

How to set chart parameter in YouTube Data API v3( JAVA / Android)

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);

Where can I find the source code of Android class SQLiteOpenHelper?

I want to take a look at the Android SQLiteOpenHelper class implementation, can somebody points me the location?
The link you want is:
https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/core/java/android/database/sqlite/SQLiteOpenHelper.java
But even better let me share a great tip:
This extension for Google Chrome
https://chrome.google.com/webstore/detail/android-sdk-search/hgcbffeicehlpmgmnhnkjbjoldkfhoin?hl=en-GB adds the ad (as in Android Developer) keyword to your searchbar so you can type ad TextView and it will bring you directly to TextView on this example AND will add a link "View Source" next to the class name inside the site https://developer.android.com/reference so for any class you want to see the source it's just a click away.
You can find all the existing versions here: http://grepcode.com/search?query=SQLiteOpenHelper&n=

Categories

Resources