Android Question D/L from hyperlink?


Active Member
Licensed User
How? In browser when i click on hyperlink i get save as dialog with filename.xml i tried with Job.GetString and Job.GetInputStream but i don't get xml file but other file (looks like html file)



Licensed User
@stanks you didn't provide all info.

his link is a querystring with a parameter (index.asp?id=xx or something)

as I told you on the chat you have these possible issues

- your get request is wrong
- you use post which causes the parameters to drop off unless you use it right
- they added a referer check to be certain that the page only gets opened through their site, then you need to send their referer url with the request.


Active Member
Licensed User
<!DOCTYPE html>

<html id="XenForo" lang="en-US" dir="LTR" class="Public NoJs LoggedOut NoSidebar  Responsive" xmlns:fb="">

   <meta charset="utf-8" />
   <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
     <meta name="viewport" content="width=device-width, initial-scale=1">
     <base href="" />
       var _b = document.getElementsByTagName('base')[0], _bH = "";
       if (_b && _b.href != _bH) _b.href = _bH;

   <title>B4A Question - D/L from hyperlink? | B4A (Android) / B4i (iOS) / B4J Developers Community</title>
   <noscript><style>.JsOnly, .jsOnly { display: none !important; }</style></noscript>
   <link rel="stylesheet" href="css.php?css=xenforo,form,public&amp;style=1&amp;dir=LTR&amp;d=1418223860" />
   <link rel="stylesheet" href="css.php?css=bb_code,login_bar,message,message_user_info,share_page,thread_view,toggleme_auto,toggleme_manual&amp;style=1&amp;dir=LTR&amp;d=1418223860" />


   var _gaq = [['_setAccount', 'UA-1987329-1'], ['_trackPageview']];
   !function(d, t)
     var g = d.createElement(t),
       s = d.getElementsByTagName(t)[0];   
     g.async = true;
     g.src = ('https:' == d.location.protocol ? 'https://ssl' : 'http://www') + '';
     s.parentNode.insertBefore(g, s);
   (document, 'script');

     <script src="js/jquery/jquery-1.11.0.min.js"></script>   
   <script src="js/xenforo/xenforo.js?_v=6763c268"></script>
   <script src="js/sedo/toggleme/toggleME.js?_v=6763c268"></script>

   <link rel="apple-touch-icon" href="" />
   <link rel="alternate" type="application/rss+xml" title="RSS feed for B4A (Android) / B4i (iOS) / B4J Developers Community" href="forums/-/index.rss" />
   <link rel="canonical" href="" />
   <meta name="description" content="How? In browser when i click on hyperlink i get save as dialog with filename.xml i tried with Job.GetString and Job.GetInputStream but i don't get xml..." />

<link href='' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="/xf_forum.css" />
<script src="/js/jquery-ui.js"></script>
<link rel="stylesheet" href="/js/jquery-ui.css">

<script src="/js/jquery.watermarkinput.js" type="text/javascript"></script>
<script src="/js/headers.js" type="text/javascript"></script>




<body class="node26 node25 SelectQuotable">

<!-- **************** -->
<input type="hidden" id="name" value="forum"  />
<!-- headers -->
<div id="headers" class="pageWidth" style="position:relative;left:0px;">
   <img id="bg" src="/images/Header-bg.png"/>
   <a href=""><img id="anywheresoftware_logo" src="/images/Logo_on-dark.png"/></a>
<div id="menu" class="pageWidth">
  <div id="home"><a href="/index.html">HOME</a></div>
  <div id="b4a"><a href="/b4a.html">B4A</a></div>
  <div id="b4i"><a href="/b4i.html">B4i</a></div>
  <div id="b4j"><a href="/b4j.html">B4J</a></div>
  <div id="store"><a href="/store.html">STORE</a></div>
  <div id="forum"><a href="/android/forum/index.php">ONLINE COMMUNITY</a></div>
  <div id="search_div" title="Press enter to submit query.">
     <form id="searchform" action="">
       <input id="search" type="text" name="query" />
<!-- headers end -->

<div class="pageWidth">
<div id="loginBar">
     <div class="pageContent">   
       <h3 id="loginBarHandle">
         <label for="LoginControl"><a href="login/" class="concealed noOutline">Log in or Sign up</a></label>
       <span class="helper"></span>


<div id="headerMover">
   <div id="headerProxy" style="height:40px;"></div>

<div id="content" class="thread_view">
   <div class="pageWidth" >
     <div class="pageContent">

       <!-- main content area -->
Message longer than Log limit (4000). Message was truncated.


Active Member
Licensed User
Sorex i tried with job1m.GetRequest.SetHeader("Referer", "mylink") but result is the same
for getting that file i use only job1m.Initalize, job1m.Download(url) and nothing more....that is all code


Licensed User
it might be a mime type issues or something else but without the url we can't tell you what goes wrong.