<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://jogamp.org/bugzilla/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.2"
          urlbase="https://jogamp.org/bugzilla/"
          
          maintainer="sgothel@jausoft.com"
>

    <bug>
          <bug_id>1300</bug_id>
          
          <creation_ts>2016-04-06 17:02:07 +0200</creation_ts>
          <short_desc>AndroidVersion doesn&apos;t work if android.os.Build is in the classpath</short_desc>
          <delta_ts>2019-03-26 22:13:16 +0100</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>3</classification_id>
          <classification>JogAmp</classification>
          <product>Gluegen</product>
          <component>core</component>
          <version>2.4.0</version>
          <rep_platform>All</rep_platform>
          <op_sys>all</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P4</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter>diegoperez</reporter>
          <assigned_to name="Sven Gothel">sgothel</assigned_to>
          <cc>gouessej</cc>
          
          <cf_type>DEFECT</cf_type>
          <cf_scm_refs>f24a8b675a0b3d7e73870c46239792a31cf81491</cf_scm_refs>
          <cf_workaround>---</cf_workaround>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>5585</commentid>
    <comment_count>0</comment_count>
    <who name="">diegoperez</who>
    <bug_when>2016-04-06 17:02:07 +0200</bug_when>
    <thetext>Sometimes android.os.Build might be in the classpath even if the system is not Android. This will cause the Android detection to fail.
The recommended way to detect when an app is running on Android is using the &quot;java.vm.name&quot; system property and checking if the value is equals to &quot;Dalvik&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>5593</commentid>
    <comment_count>1</comment_count>
    <who name="Julien Gouesse">gouessej</who>
    <bug_when>2016-04-12 10:27:37 +0200</bug_when>
    <thetext>Hi

Does it work when Dalvik VM isn&apos;t used (i.e when Android Runtime is used instead)? How does the detection fail? Please can you be more accurate? Can you post a stack trace?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>5642</commentid>
    <comment_count>2</comment_count>
    <who name="">diegoperez</who>
    <bug_when>2016-06-09 12:37:20 +0200</bug_when>
    <thetext>Yes, &quot;Dalvik&quot; will be returned even when using ART.

The detection fails because android.os.Build might be sometimes in the classpath even if the system is not Android. In those cases, the library will incorrectly assume that is running in Android when it&apos;s not.

The PR (https://github.com/sgothel/gluegen/pull/33/files) updates the detection to use the &quot;java.vm.name&quot; property.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>6097</commentid>
    <comment_count>3</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2019-03-26 22:13:16 +0100</bug_when>
    <thetext>Thank you Diego, merged.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>