Android4.2 multi-user and download
<p>In Android4.2 was a new attribute <strong>multi-user</strong>.</p>

<p>I found the file path was problem When I Download some media ;</p>

<p>example:</p>

<p>When I download a picture form website,this line was the useful log info.</p>

<p><code>I/DownloadThread( 1306): mInfo.mHint = file:///storage/emulated/0/Download/girl.jpg</code></p>

<p>However,I can't find the <strong>0</strong> directory under <em>/storage/emulated/</em> Use <strong>adb shell</strong></p>

<p>That means,I can't use this path <em>/storage/emulated/0/Download/girl.jpg</em> with C/C++ open function </p>

<p>Android download file step by step :</p>

<ol>
<li>Browser get the information about what we needed to download(DownloadHandler.java)</li>
<li>Browser trigger the DownloadManagerService inset the information to <em>downloads.db</em></li>
<li>When the <em>downloads.db</em> change,to new a new Downloadthread to Download the file!</li>
</ol>

<p>Question:</p>

<ol>
<li>Why exist <strong>/storage/emulated/0/</strong> directory (multi-user?),Why could I find it with <strong>adb shell</strong> ?</li>
<li>is <strong>/storage/emulated/0/</strong> rather than <strong>/storage/sdcard0/</strong> or <strong>/storage/sdcard1/</strong>,why?</li>
<li>Android4.1 VS Android4.2 with the different branch Environment.UserEnvironment(int userId)(Environment.java)</li>
</ol>

<p>Thanks</p>

<p>CaoPeng</p>
