« first day (801 days earlier)      last day (2449 days later) » 

1:29 AM
He is brother of magisch
 
 
3 hours later…
4:15 AM
Good Morning...
 
4:31 AM
good morning sir
how are you?
 
4:49 AM
please ping to sir...who is sir here?
 
5:16 AM
:D
 
user3153487
hi @PratikButani
 
hlo
hahah
I need help'
 
yes
share you prb here
@PriyankaMinhas
 
ohk...
 
@VasudevVyas hi hello how are you.
 
5:19 AM
ActuaLLY i am getting Index out of bound exception
in google maps for info window on click listener
Going to the last location
?????
 
you can share your code in pastie.org
 
How are you moving to last position ?
SetLastFocusedIndex?
 
@ArthTilva don't you get off of any Saturday?
 
please check the code
showMap() function
there i am calling infoadapter();
rest all is working except for image view , it is giving exception
and also same exception :
@Override
public void onInfoWindowClick(Marker marker) {
Toast.makeText(getBaseContext(),
"Info Window clicked@" + marker.getId(),
Toast.LENGTH_SHORT).show();

Intent mIntent = new Intent(ProfessionalIntroActivity.this, ProDetailedInfo.class);
mIntent.putExtra("list_id",mArray[listPosition].getListerId() + ""); // exception
startActivity(mIntent);
}
on info window onclick
 
5:31 AM
What is listPosition ?
You're getting exception in calling this intent. Right ?
 
yes
logcat :
listPosition a global variable
 
ListPosition -1
Try with it once and let me know
 
And for more print the value of list position first and check
 
ohk code is running wait
06-04 11:08:16.279 22931-22931/android.sit.findpro D/ListPositionBefore: ListPositionBefore0
06-04 11:08:16.288 22931-22931/android.sit.findpro D/ListPositionAfter: ListPositionAfter0
06-04 11:08:16.290 22931-22931/android.sit.findpro D/ListPositionBefore: ListPositionBefore1
06-04 11:08:16.296 22931-22931/android.sit.findpro D/ListPositionAfter: ListPositionAfter1
06-04 11:08:16.298 22931-22931/android.sit.findpro D/ListPositionBefore: ListPositionBefore2
06-04 11:08:16.307 22931-22931/android.sit.findpro D/ListPositionAfter: ListPositionAfter2
in response code runs well but in using listPosition in other function Picasso it goes to 10th
 
5:40 AM
Crashes ?
 
Index Out of bound
  java.lang.ArrayIndexOutOfBoundsException: length=10; index=10
 
@AnshulTyagi Nup bro...in old job it was there..
 
user3153487
try if there is for loop or while loop size -1
 
you mean in response? where for (listPosition=0; ) // here?
 
@PriyankaMinhas @Override
public void onInfoWindowClick(Marker marker) {
Toast.makeText(getBaseContext(),
"Info Window clicked@" + marker.getId(),
Toast.LENGTH_SHORT).show();
if(mArray.size()>0&&listPosition+1<=mArray.size()){
Intent mIntent = new Intent(ProfessionalIntroActivity.this, ProDetailedInfo.class);
mIntent.putExtra("list_id",mArray[listPosition].getListerId() + ""); // exception
startActivity(mIntent);
}
}
how to get listPosition can show that code or you can set listposition like marker,.setId(listpotion) and then use that in method to getposition
 
5:53 AM
@Narendra I tried this code, there is as such no exception coming, toast is working but intent is not fired
if (result.length > 0) {
mArray = result;
for (listPosition=0; listPosition < mArray.length; listPosition++) {
markers = map.addMarker(new MarkerOptions()
.position(new LatLng(mArray[listPosition].getCoordinates().getLatitude(), mArray[listPosition].getCoordinates().getLongitude()))
.title(mArray[listPosition].getName())
.snippet(mArray[listPosition].getAddress()));

LatLng latLng = new LatLng(mArray[listPosition].getCoordinates().getLatitude(), mArray[listPosition].getCoordinates().getLongitude());
listPositon is global int var // -1
mIntent.putExtra("list_id",mArray[listPosition].getListerId() + ""); // how to fetch listPosition now?
@Narendra you there?
 
Check what narendra said
 
very good morning all :)
 
He told you a condition before to fire intent
 
@AnshulTyagi I did the same
and no crash now but intent is not fired
 
wts the trouble?
okay
wheres the startActivity(mIntent); ?
 
6:04 AM
yes
acually this intent has to take along the list_id for corresponding clicks
 
mListPosition is giving trouble
 
what trouble?
giving wrong position?
 
similarly in Picasso too
yes
 
ok
it must give value as per the loop
isn't it doing so?
 
6:05 AM
mArray.lenght is coming 10
yes i got it right
 
although its 0 to 9
 
right
thats correct
 
I have pasted my code above
kindly check
 
i have a question that i want to use volley in separate class and from fragment i am making two request simultaneously how to do that? please help...
 
6:07 AM
yes I checked that
but where's the trouble?
aren't you getting the values from 0 to 9
 
no not in other function where i am using mArray[listPosition].getProfileImage and mArray[listPosition].getListerId
 
okay
outside for loop?
 
so, my question is - which position do you need then?
outside the for loop
as you can pass only single value
not the 10 values
through intent
 
all from 0 to 9 , where ever the user clicks , corresponding data will be c=shown
 
6:11 AM
ok, the one user clicks
 
where's the click event
 
@DroidWormNarendra I also told same
 
can you show that?
 
Info window click
 
6:12 AM
yes
 
please show
 
In 2 case i need it:
first in showing profile pic here:
@Override
public View getInfoContents(Marker marker) {

View myContentsView = getLayoutInflater().inflate(R.layout.custom_info_contents, null);

iv = ((ImageView) myContentsView.findViewById(R.id.iv_img));
Log.d("ListPositionpicasso", "ListPositionpicasso" + listPosition);

Log.d("mArray.length", "mArray.length" + mArray.length);
if(mArray.length>0&&listPosition+1<=mArray.length){
Picasso.with(ProfessionalIntroActivity.this).load(pic_url + mArray[listPosition].getProfile_image()) // EXCEPTION OCCURS
and second here
@Override
public void onInfoWindowClick(Marker marker) {
Toast.makeText(getBaseContext(),
"Info Window clicked@" + marker.getId(),
Toast.LENGTH_SHORT).show();
if(mArray.length>0&&listPosition+1<=mArray.length){
Intent mIntent = new Intent(ProfessionalIntroActivity.this, ProDetailedInfo.class);
mIntent.putExtra("list_id",mArray[listPosition].getListerId() + ""); // exception
startActivity(mIntent);
}
}
 
And i am calling these here:
if (response.isSuccess()) {
Lister[] result = response.body();
dialog.dismiss();

isAnyOtherBtnClicked = false;
isOthersClicked = false;
isNotMapClicked = false;

if (result.length > 0) {
mArray = result;
for (listPosition=0; listPosition < mArray.length; listPosition++) {
markers = map.addMarker(new MarkerOptions()
.position(new LatLng(mArray[listPosition].getCoordinates().getLatitude(), mArray[listPosition].getCoordinates().getLongitude()))
.title(mArray[listPosition].getName())
.snippet(mArray[listPosition].getAddress()));
 
okay
first lets check the click event
I have done something like the same
let me check
 
6:15 AM
here the logs is working well- 0 to 9, but outside this for loop where ever i am using mAraay[listPosition] is displaying 10
and mArray length is 0
yes please help
 
sure
wait a moment plz
 
ok my fingers crossed.. as i have a build today
:)
 
dnt worry
 
I got it :)
we can try setting the tag (the position) when adding the marker
and getting it in infowindowClick
 
6:21 AM
but the markers may be of any length
 
or even can try with id
 
say 1000 also
 
no trouble in it
 
wait a moment
let me show u
 
6:22 AM
hmm
 
issue is in custom infowindow click?
or marker click?
 
on custom window
and in marker click unable to fetch user profile image
 
click is not working in custom info window?
 
click is working but mArray[listPosition] funda is not working
 
9
A: How to know which Marker was clicked on Google Maps v2 for Android?

voghDevIn reply to: The question is: How do I identify what entity the clicked Marker 'marker' represents? [...] There's also a marker.getId(), but such ID is generated by the API and I can't control it You can control it. The marker is returned by addMarker(), so you can get its ID and store ...

@Priyanka
you must use hashmap for that
 
6:29 AM
wait letme check
 
@DroidWormNarendra my onclick is working well
 
got the correct position, now?
 
for custom info window // different data is showing on markers onclick
but
image/
?
 
have you applied that hashmap thing?
it will surely work for you
 
6:34 AM
Compare lat lng
 
@Priyanka ??
 
yes
was doing your code
can you please tell now
 
ok
have you done that?
or need to do?
 
@Override
public void onInfoWindowClick(Marker marker) {
Toast.makeText(getBaseContext(),
"Info Window clicked@" + marker.getId(),
Toast.LENGTH_SHORT).show();
int id = mMarkers.get(marker.getId());

if(mArray.length>0&&listPosition+1<=mArray.length){
Intent mIntent = new Intent(ProfessionalIntroActivity.this, ProDetailedInfo.class);
mIntent.putExtra("list_id",mArray[listPosition].getListerId() + ""); // exception
startActivity(mIntent);
}
}
int id = mMarkers.get(marker.getId()); // i am getting this id now (assuming not run the code yet)
then next?
 
ok
this id is the position
can you show, how you added this in hashmap?
 
6:39 AM
mIntent.putExtra("list_id",id + "");
yes
HashMap<String, Integer> mMarkers = new HashMap<String, Integer>();
 
how you added?
mMarkers.put(mkr.getId(), myObject.getId());
something like this
 
if (result.length > 0) {
mArray = result;
for (listPosition=0; listPosition < mArray.length; listPosition++) {
markers = map.addMarker(new MarkerOptions()
.position(new LatLng(mArray[listPosition].getCoordinates().getLatitude(), mArray[listPosition].getCoordinates().getLongitude()))
.title(mArray[listPosition].getName())
.snippet(mArray[listPosition].getAddress()));
mMarkers.put(markers.getId(), Integer.valueOf(mArray[listPosition].getListerId()));
LatLng latLng = new LatLng(mArray[listPosition].getCoordinates().getLatitude(), mArray[listPosition].getCoordinates().getLongitude());
 
getListerId() is integer?
 
no same issue
string
 
you are doing it wrong
 
6:42 AM
ok got it now again i have to convert it to string
 
yes
and
mMarkers.get(marker.getId());
will return you listerID
not the position
you got it?
 
marker.getId is the markers id
not working
as lister id i am getting from server
and marker id is what marker is giving, totally different'
@DroidWormNarendra :(
 
mMarkers.get(marker.getId()); is not returning you listerID ?
mMarkers.get(marker.getId());
must return
whatever we put in value of
mMarkers.put(markers.getId(), Integer.valueOf(mArray[listPosition].getListerId()));
 
i want current location Where am i wrong ? pastie.org/10863862
 
6:53 AM
yes?
 
@DroidWormNarendra let me run again'
 
not working yet?
 
i think i am doing wrong with conversions
 
6:57 AM
show me the code
 
listerid is of string type
 
mMarkers.get(marker.getId());
it will return listerID in int
 
if (result.length > 0) {
mArray = result;
for (listPosition=0; listPosition < mArray.length; listPosition++) {
markers = map.addMarker(new MarkerOptions()
.position(new LatLng(mArray[listPosition].getCoordinates().getLatitude(), mArray[listPosition].getCoordinates().getLongitude()))
.title(mArray[listPosition].getName())
.snippet(mArray[listPosition].getAddress()));


mMarkers.put(markers.getId(), Integer.parseInt(mArray[listPosition].getListerId()));
LatLng latLng = new LatLng(mArray[listPosition].getCoordinates().getLatitude(), mArray[listPosition].getCoordinates().getLongitude());
 
@Override
public void onInfoWindowClick(Marker marker) {
Toast.makeText(getBaseContext(),
"Info Window clicked@" + marker.getId(),
Toast.LENGTH_SHORT).show();
int id = mMarkers.get(marker.getId());

if(mArray.length>0&&listPosition+1<=mArray.length){
Intent mIntent = new Intent(ProfessionalIntroActivity.this, ProDetailedInfo.class);
mIntent.putExtra("list_id",String.valueOf(id) + ""); // exception
startActivity(mIntent);
}
 
6:59 AM
the code seems correct
 
hmmm but not working
 
how are you getting this - listPosition
here
if(mArray.length>0&&listPosition+1<=mArray.length){
may be something wrong here
or
you can try one more thing
instead of putting listerID
use the listPosition instead
and then check
 
list position ohk
 
yup
no need for conversion to string or int
 
sorry dont gt you
do i need hashmap?
 
7:02 AM
let me show you
yes
you need that
mMarkers.put(markers.getId(),listPosition);
int id = mMarkers.get(marker.getId());
this id will be the listPosition
 
still nothing happens
I am about to cry...
may be a silly mistake but taking my breaths away... as time is running... build not ready
 
hmm
can you put log and check
when setting the values in hashmap
 
@PriyankaMinhas so you're alive or dead typing ?
 
show me the code @Priyanka
may be u r missing something
 
@Override
public void onInfoWindowClick(Marker marker) {
Toast.makeText(getBaseContext(),
"Info Window clicked@" + marker.getId(),
Toast.LENGTH_SHORT).show();
int id = mMarkers.get(marker.getId());

if(mArray.length>0&&listPosition+1<=mArray.length){
Intent mIntent = new Intent(ProfessionalIntroActivity.this, ProDetailedInfo.class);
mIntent.putExtra("list_id",String.valueOf(id) + "");
Toast.makeText(getBaseContext(),"ONInfoClick"+id,Toast.LENGTH_LONG).show();// exception
startActivity(mIntent);
 
7:08 AM
thats wrong
 
if (result.length > 0) {
mArray = result;
for (listPosition=0; listPosition < mArray.length; listPosition++) {
markers = map.addMarker(new MarkerOptions()
.position(new LatLng(mArray[listPosition].getCoordinates().getLatitude(), mArray[listPosition].getCoordinates().getLongitude()))
.title(mArray[listPosition].getName())
.snippet(mArray[listPosition].getAddress()));


mMarkers.put(markers.getId(),listPosition);
LatLng latLng = new LatLng(mArray[listPosition].getCoordinates().getLatitude(), mArray[listPosition].getCoordinates().getLongitude());
 
click event code is wrong
 
tell me what you need to pass through intent?
position or listerID?
 
listerId
in string
 
7:11 AM
and you are passing the position
@Override
public void onInfoWindowClick(Marker marker) {
Toast.makeText(getBaseContext(),
"Info Window clicked@" + marker.getId(),
Toast.LENGTH_SHORT).show();
listPosition = mMarkers.get(marker.getId());

if(mArray.length>0&&listPosition+1<=mArray.length){
Intent mIntent = new Intent(ProfessionalIntroActivity.this, ProDetailedInfo.class);
mIntent.putExtra("list_id",mArray[listPosition].getListerId());
Toast.makeText(getBaseContext(),"ONInfoClick"+id,Toast.LENGTH_LONG).show();// exception
startActivity(mIntent);
do like this
@Priyanka
listPosition = mMarkers.get(marker.getId());
and
mIntent.putExtra("list_id",mArray[listPosition].getListerId());
 
thankyou sooooooooooooooooo much
I am so happy...
bless you always
thankyou thankyou thankyou
@DroidWormNarendra are you there?
 
droid might have gone for lunch LOL
 
7:27 AM
I am back :)
My internet connection was playing games with me :p
@PriyankaMinhas Pleasure to help you, my friend
 
haahhaa but seriously you saved my day
 
where do you work?
 
@DroidWormNarendra have you worked with Flickr integration in android ?
 
7:34 AM
why? @Priyanka
@SilentKiller not yet
 
just asking
 
okay
what abt u?
 
Mohali
 
but i am the only android developer here.. so strucked with code sometimes
this time i thought to put my ques in chat
 
7:36 AM
Its okay, my friend
 
and it worked
 
we are here to save you out, always :)
 
can i ask one more
 
lol..nice try
yup
 
facebook login
 
7:37 AM
lol
girega. :D
 
earlier my code runs well.. but when i try to give my facebook id to the server
 
it crashes ;)
guess what
 
it goes to on failure method of retrofit but my php server db is getting fbId
 
7:38 AM
:P
@SilentKiller
 
@Priyanka let @SilentKiller try this time
 
hhhahaha
 
he is awesome :)
can kill any trouble silently :p
 
its not only awesome. Awesome/MindBlowing/Fantastic/Wonderful as well
 
@SilentKiller you got my problem?
lol
 
7:39 AM
but for that you have to solve my problem too. :D
 
@PriyankaMinhas does your PHP server return you anything ?
 
well seriously saying earlier he made it so, but i denied , I said I will be giving you only fb id
because in my case, user has to register only once
either phone or fb
 
then you should have looooooootttttsssssss of dummy fb accounts.
 
But FBid coming from facebook is unique id
I thought if i make 2 id's then there is a chance of duplicacy
 
7:43 AM
what kinda of duplicate issue ?
 
nw, going for lunch :p
 
ohk@DroidWormNarendra happy Khana
 
lol thnx :)
 
@SilentKiller I hope its not your lunch time
 
@DroidWormNarendra so you trapped me.
@PriyankaMinhas in 16 mins.
 
7:44 AM
lol...I did not :D
 
not an issue, will meet at 2.00
my lunch will also start aftr 15 mins
:P
 
wts ur lunch time, btw?
oh ok
 
@DroidWormNarendra you did man.
 
1:30 to 2:00
 
half hour ? :O
 
7:45 AM
good, lets back then
isn't this enough? @SilentKiller
 
yeah....only
not enough , 25 mins..... on eating 5mins only for gossiping
:D
 
ahh..thats right :)
BRB after lunch
 
@PriyankaMinhas lol I don't talk while having food.
 

« first day (801 days earlier)      last day (2449 days later) »