<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Infinity Code Forum — OnMapPress/LongPress doesnot fired for android]]></title>
		<link>https://forum.infinity-code.com/viewtopic.php?id=1590</link>
		<atom:link href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=1590&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in OnMapPress/LongPress doesnot fired for android.]]></description>
		<lastBuildDate>Thu, 27 Aug 2020 10:11:53 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: OnMapPress/LongPress doesnot fired for android]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=6621#p6621</link>
			<description><![CDATA[<p>Hi there,<br />I can now make it works<br />I started from duplicating your example scene and copy my code into the scene.<br />I think The problem may has something to do firebase library in start().<br />Anyway, it works now thank you for your advice and support.</p>]]></description>
			<author><![CDATA[null@example.com (ratchai)]]></author>
			<pubDate>Thu, 27 Aug 2020 10:11:53 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=6621#p6621</guid>
		</item>
		<item>
			<title><![CDATA[Re: OnMapPress/LongPress doesnot fired for android]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=6618#p6618</link>
			<description><![CDATA[<p>Before attaching the APK, I checked it on my side and it works correctly.</p><p>Are you sure your device&#039;s sensor is working correctly?<br />You are the first who report this issue, and I have good reason to believe that the problem is with the device.<br />Have you tested your app and/or my APK on other devices?<br />If this works correctly on other devices, then you need to check the sensor of your device through the phone&#039;s engineering menu, or using third-party apps.<br />If this still does not work correctly on other devices, let me know and we will look for the reason why this is happening.</p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Wed, 26 Aug 2020 09:17:42 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=6618#p6618</guid>
		</item>
		<item>
			<title><![CDATA[Re: OnMapPress/LongPress doesnot fired for android]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=6615#p6615</link>
			<description><![CDATA[<p>Hello <br />I&#039;m sorry to say the problem actually still exist.<br />I am trying out something else like using tileset UI example as a template scene.<br />I will update tomorrow if it works</p>]]></description>
			<author><![CDATA[null@example.com (ratchai)]]></author>
			<pubDate>Wed, 26 Aug 2020 01:47:04 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=6615#p6615</guid>
		</item>
		<item>
			<title><![CDATA[Re: OnMapPress/LongPress doesnot fired for android]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=6614#p6614</link>
			<description><![CDATA[<p>Hi, I tried your APK but still not working with my device (SS Galaxy S8) . I have no idea why. I can just zoom in/out and tilt. No long press event shown up.<br />Anyway,<br />I tried to dbug and added many comments into codes and suddenly found another weired unity&#039;s behaviour. I added debug messages along OnMapBasePress() also in WaitLongPress() coroutine. I found the coroutine just stuck at before the line <br />yield return watiforsecond (longpressDelay);&nbsp; No thing printed after that line.</p><p>Then, I tried to fix without any clues, so I went to OnMapBaseRelease() and just add two debug messages. Then I have no idea why it work now. </p><p>Please trust me about what I said. I have stucked at this issue for 3 days before it gets fixed with big doubt.</p><br /><br /><p>protected virtual void OnMapBasePress()<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; isMapPress = false;<br />&nbsp; &nbsp; &nbsp; &nbsp; Debug.Log(&quot;ismapPress=false&quot;); //--------------------&gt; added here</p><p>&nbsp; &nbsp; &nbsp; &nbsp; if (waitZeroTouches)<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (GetTouchCount() &lt;= 1) waitZeroTouches = false;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else return;<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; Debug.Log(&quot;Waitzerotouches&quot;); //--------------------&gt; added here<br />&nbsp; &nbsp; &nbsp; &nbsp; dragMarker = null;<br />&nbsp; &nbsp; &nbsp; &nbsp; Vector2 inputPosition = GetInputPosition();<br />&nbsp; &nbsp; &nbsp; &nbsp; Debug.Log(&quot;get position&quot;); //--------------------&gt; added here<br />&nbsp; &nbsp; &nbsp; &nbsp; if (!HitTest(inputPosition)) return;<br />&nbsp; &nbsp; &nbsp; &nbsp; Debug.Log(&quot;hit test!!!&quot;); //--------------------&gt; added here<br />&nbsp; &nbsp; &nbsp; &nbsp; if (IsCursorOnUIElement(inputPosition)) return;<br />&nbsp; &nbsp; &nbsp; &nbsp; Debug.Log(&quot;cursor on UI Element&quot;);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; if (OnMapPress != null) OnMapPress();<br />&nbsp; &nbsp; &nbsp; &nbsp; Debug.Log(&quot;Map pressed&quot;); //--------------------&gt; added here<br />&nbsp; &nbsp; &nbsp; &nbsp; lastClickTimes[0] = lastClickTimes[1];<br />&nbsp; &nbsp; &nbsp; &nbsp; lastClickTimes[1] = Time.realtimeSinceStartup;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; double tx, ty;<br />&nbsp; &nbsp; &nbsp; &nbsp; lastInputPosition = pressPoint = inputPosition;<br />&nbsp; &nbsp; &nbsp; &nbsp; if (!GetTile(inputPosition, out tx, out ty)) return;<br />&nbsp; &nbsp; &nbsp; &nbsp; Debug.Log(&quot;can&#039;t get tile&quot;); //--------------------&gt; added here<br />&nbsp; &nbsp; &nbsp; &nbsp; isMapPress = true;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; OnlineMapsMarkerBase marker = null;<br />&nbsp; &nbsp; &nbsp; &nbsp; OnlineMapsDrawingElement drawingElement = null;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; IOnlineMapsInteractiveElement interactiveElement = GetInteractiveElement(inputPosition);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; if (interactiveElement != null)<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (interactiveElement is OnlineMapsMarkerBase) marker = interactiveElement as OnlineMapsMarkerBase;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else if (interactiveElement is OnlineMapsDrawingElement) drawingElement = interactiveElement as OnlineMapsDrawingElement;<br />&nbsp; &nbsp; &nbsp; &nbsp; }</p><p>&nbsp; &nbsp; &nbsp; &nbsp; if (marker != null)<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (marker.OnPress != null) marker.OnPress(marker);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (map.showMarkerTooltip == OnlineMapsShowMarkerTooltip.onPress)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OnlineMapsTooltipDrawerBase.tooltipMarker = marker;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OnlineMapsTooltipDrawerBase.tooltip = marker.label;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (Input.GetKey(KeyCode.LeftControl)) dragMarker = marker;<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; else if (drawingElement != null)<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (drawingElement.OnPress != null) drawingElement.OnPress(drawingElement);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (map.showMarkerTooltip == OnlineMapsShowMarkerTooltip.onPress)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OnlineMapsTooltipDrawerBase.tooltipDrawingElement = drawingElement;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OnlineMapsTooltipDrawerBase.tooltip = drawingElement.tooltip;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; }</p><p>&nbsp; &nbsp; &nbsp; &nbsp; if (dragMarker == null) isMapDrag = true;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; activeElement = interactiveElement;<br />&nbsp; &nbsp; &nbsp; &nbsp; Debug.Log(&quot;wait long pressed&quot;); //--------------------&gt; added here<br />&nbsp; &nbsp; &nbsp; &nbsp; if (longPressEnumerator == null)<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; longPressEnumerator = WaitLongPress();&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; StartCoroutine(longPressEnumerator);<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; if (allowUserControl) OnlineMaps.isUserControl = true;<br />&nbsp; &nbsp; }</p><br /><p>===================================================<br />&nbsp; private IEnumerator WaitLongPress()<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; Debug.Log(&quot;wait long pressed...&quot;+longPressDelay); //--------------------&gt; added here</p><p>&nbsp; &nbsp; &nbsp; &nbsp; //yield return new WaitForSeconds(longPressDelay);<br />&nbsp; &nbsp; &nbsp; &nbsp; float t = 0;<br />&nbsp; &nbsp; &nbsp; &nbsp; while (t &lt; longPressDelay)<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; yield return null;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; t += Time.deltaTime;<br />&nbsp; &nbsp; &nbsp; &nbsp; }</p><br /><p>&nbsp; &nbsp; &nbsp; &nbsp; OnlineMapsMarkerBase marker = null;<br />&nbsp; &nbsp; &nbsp; &nbsp; OnlineMapsDrawingElement drawingElement = null;<br />&nbsp; &nbsp; &nbsp; &nbsp; Vector2 inputPosition = GetInputPosition();<br />&nbsp; &nbsp; &nbsp; &nbsp; Debug.Log(&quot;inputPosition&quot; );&nbsp; //--------------------&gt; added here<br />&nbsp; &nbsp; &nbsp; &nbsp; IOnlineMapsInteractiveElement interactiveElement = GetInteractiveElement(inputPosition);<br />&nbsp; &nbsp; &nbsp; &nbsp; Debug.Log(&quot;interactiveElement&quot;);<br />&nbsp; &nbsp; &nbsp; &nbsp; if (interactiveElement != null)<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (interactiveElement is OnlineMapsMarkerBase) marker = interactiveElement as OnlineMapsMarkerBase;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else if (interactiveElement is OnlineMapsDrawingElement) drawingElement = interactiveElement as OnlineMapsDrawingElement;<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; Debug.Log(&quot;marker&quot;);<br />&nbsp; &nbsp; &nbsp; &nbsp; if (marker != null &amp;&amp; marker.OnLongPress != null) { marker.OnLongPress(marker); Debug.Log(&quot;marker longpress&quot;); }<br />&nbsp; &nbsp; &nbsp; &nbsp; else if (drawingElement != null &amp;&amp; drawingElement.OnLongPress != null) { drawingElement.OnLongPress(drawingElement); Debug.Log(&quot;drawing element&quot;); }<br />&nbsp; &nbsp; &nbsp; &nbsp; else if (OnMapLongPress != null)<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Debug.Log(&quot;finally long pressed&quot;);//--------------------&gt; added here<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OnMapLongPress();<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; isMapDrag = false;<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; Debug.Log(&quot;wait long pressed end&quot;);//--------------------&gt; added here<br />&nbsp; &nbsp; &nbsp; &nbsp; longPressEnumerator = null;<br />&nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; }</p><br /><p>===================================================<br /> protected virtual void OnMapBaseRelease()<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; Debug.Log(&quot;Release&quot;); //=&gt; I added here then the problem solved........???!!!!!******<br />&nbsp; &nbsp; &nbsp; &nbsp; if (waitZeroTouches &amp;&amp; GetTouchCount() == 0) waitZeroTouches = false;<br />&nbsp; &nbsp; &nbsp; &nbsp; if (GUIUtility.hotControl != 0) return;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; Vector2 inputPosition = GetInputPosition();<br />&nbsp; &nbsp; &nbsp; &nbsp; bool isClick = (pressPoint - inputPosition).sqrMagnitude &lt; 400 &amp;&amp; !lockClick;<br />&nbsp; &nbsp; &nbsp; &nbsp; lockClick = false;<br />&nbsp; &nbsp; &nbsp; &nbsp; isMapDrag = false;<br />&nbsp; &nbsp; &nbsp; &nbsp; mapDragStarted = false;<br />&nbsp; &nbsp; &nbsp; &nbsp; dragMarker = null;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; if (longPressEnumerator != null)<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; StopCoroutine(longPressEnumerator);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; longPressEnumerator = null;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Debug.Log(&quot;stop coroutine&quot;); //=&gt; I added here then the problem solved........???!!!!!******<br />&nbsp; &nbsp; &nbsp; &nbsp; }</p><p>&nbsp; &nbsp; &nbsp; &nbsp; lastInputPosition = Vector2.zero;<br />&nbsp; &nbsp; &nbsp; &nbsp; OnlineMaps.isUserControl = false;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; if (!isMapPress) return;<br />&nbsp; &nbsp; &nbsp; &nbsp; isMapPress = false;<br />&nbsp; &nbsp; &nbsp; &nbsp; if (OnMapRelease != null) OnMapRelease();</p><p>&nbsp; &nbsp; &nbsp; &nbsp; OnlineMapsMarkerBase marker = null;<br />&nbsp; &nbsp; &nbsp; &nbsp; OnlineMapsDrawingElement drawingElement = null;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; IOnlineMapsInteractiveElement interactiveElement = GetInteractiveElement(inputPosition);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; if (interactiveElement != null)<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (interactiveElement is OnlineMapsMarkerBase) marker = interactiveElement as OnlineMapsMarkerBase;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else if (interactiveElement is OnlineMapsDrawingElement) drawingElement = interactiveElement as OnlineMapsDrawingElement;<br />&nbsp; &nbsp; &nbsp; &nbsp; }</p><p>&nbsp; &nbsp; &nbsp; &nbsp; if (map.showMarkerTooltip == OnlineMapsShowMarkerTooltip.onPress &amp;&amp; (OnlineMapsTooltipDrawerBase.tooltipMarker != null || OnlineMapsTooltipDrawerBase.tooltipDrawingElement != null))<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OnlineMapsTooltipDrawerBase.tooltipMarker = null;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OnlineMapsTooltipDrawerBase.tooltipDrawingElement = null;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OnlineMapsTooltipDrawerBase.tooltip = null;<br />&nbsp; &nbsp; &nbsp; &nbsp; }</p><p>&nbsp; &nbsp; &nbsp; &nbsp; bool isClicked = false;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; if (marker != null)<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (marker.OnRelease != null) marker.OnRelease(marker);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (isClick &amp;&amp; marker.OnClick != null)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; marker.OnClick(marker);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; isClicked = true;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; else if (drawingElement != null)<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (drawingElement.OnRelease != null) drawingElement.OnRelease(drawingElement);<br />&nbsp; &nbsp; &nbsp; &nbsp; }</p><p>&nbsp; &nbsp; &nbsp; &nbsp; if (activeElement != null &amp;&amp; activeElement != interactiveElement)<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (activeElement is OnlineMapsMarkerBase)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OnlineMapsMarkerBase m = activeElement as OnlineMapsMarkerBase;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (m.OnRelease != null) m.OnRelease(m);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else if (activeElement is OnlineMapsDrawingElement)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OnlineMapsDrawingElement d = activeElement as OnlineMapsDrawingElement;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (d.OnRelease != null) d.OnRelease(d);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; activeElement = null;<br />&nbsp; &nbsp; &nbsp; &nbsp; }</p><p>&nbsp; &nbsp; &nbsp; &nbsp; if (isClick &amp;&amp; Time.realtimeSinceStartup - lastClickTimes[0] &lt; 0.5f)<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (marker != null &amp;&amp; marker.OnDoubleClick != null) marker.OnDoubleClick(marker);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else if (drawingElement != null &amp;&amp; drawingElement.OnDoubleClick != null) drawingElement.OnDoubleClick(drawingElement); <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (OnMapDoubleClick != null) OnMapDoubleClick();</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (allowZoom &amp;&amp; zoomInOnDoubleClick)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (!((marker != null &amp;&amp; marker.OnClick != null) || (drawingElement != null &amp;&amp; drawingElement.OnClick != null)))<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (OnValidateZoom == null || OnValidateZoom(OnlineMapsZoomEvent.doubleClick, map.floatZoom + 1))<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (zoomMode == OnlineMapsZoomMode.target) ZoomOnPoint(1, inputPosition);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else map.floatZoom += 1;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lastClickTimes[0] = 0;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lastClickTimes[1] = 0;<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; else if (isClick &amp;&amp; !isClicked)<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (drawingElement != null &amp;&amp; drawingElement.OnClick != null) drawingElement.OnClick(drawingElement);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else if (OnMapClick != null) OnMapClick();<br />&nbsp; &nbsp; &nbsp; &nbsp; }</p><p>&nbsp; &nbsp; &nbsp; &nbsp; if (map.bufferStatus == OnlineMapsBufferStatus.wait) map.needRedraw = true;<br />&nbsp; &nbsp; }</p>]]></description>
			<author><![CDATA[null@example.com (ratchai)]]></author>
			<pubDate>Tue, 25 Aug 2020 15:29:16 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=6614#p6614</guid>
		</item>
		<item>
			<title><![CDATA[Re: OnMapPress/LongPress doesnot fired for android]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=6613#p6613</link>
			<description><![CDATA[<p>Hello.</p><p>I have tested this and it works correctly on my side.<br />The APK is attached.<br />Test script:<br /></p><div class="codebox"><pre><code>using System.Collections.Generic;
using UnityEngine;

public class TestMapPress : MonoBehaviour
{
    private List&lt;string&gt; messages = new List&lt;string&gt;();
    private string displayMessage = &quot;&quot;;

    private void OnGUI()
    {
        GUILayout.Label(displayMessage);
    }

    private void Start()
    {
        OnlineMapsControlBase.instance.OnMapPress += () =&gt; Log(&quot;Press&quot;);
        OnlineMapsControlBase.instance.OnMapLongPress += () =&gt; Log(&quot;LongPress&quot;);
    }

    private void Log(string message)
    {
        messages.Insert(0, message);
        while (messages.Count &gt; 20)
        {
            messages.RemoveAt(messages.Count - 1);
        }

        displayMessage = string.Join(&quot;\n&quot;, messages);
    }
}</code></pre></div><p>If you want, you can send me your project by email (support@infinity-code.com), and I&#039;ll check why it doesn&#039;t work on your side.</p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Sun, 23 Aug 2020 20:55:02 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=6613#p6613</guid>
		</item>
		<item>
			<title><![CDATA[OnMapPress/LongPress doesnot fired for android]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=6612#p6612</link>
			<description><![CDATA[<p>Hello,<br />I experience weired situation. I used the sprite control earlier but I find many post recommending using the tileset.<br />So I changed to tileset. However, the&nbsp; problem still persist. I work fine when running on the Editor. but once building into&nbsp; the mobile. No event fired:</p><p> OnlineMapsControlBase.instance.OnMapLongPress += OnMapLongPressed;</p><p>any ideas?</p>]]></description>
			<author><![CDATA[null@example.com (ratchai)]]></author>
			<pubDate>Sun, 23 Aug 2020 14:05:58 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=6612#p6612</guid>
		</item>
	</channel>
</rss>
