本帖最后由 cny901111 于 2013-04-11 15:01:23 编辑

解决方案 »

  1.   

    web = new WebView(this);
    WebSettings webSettings = web.getSettings();
    webSettings.setJavaScriptEnabled(true); //javascript设置
    web.setWebViewClient(new WebViewClient()); 
    web.setFocusable(true);
    webSettings.setSupportMultipleWindows(true);
    webSettings.setPluginsEnabled(true);
    webSettings.setBuiltInZoomControls(true);
    webSettings.setAllowFileAccess(true);
    webSettings.setSaveFormData(true);
    web.setWebViewClient(new MyClient()); //设置ViewClient以处理web页面
    web.addJavascriptInterface(new JIFace(), "droid");
    web.setLayerType(View.LAYER_TYPE_NONE, null);这是设置代码
      

  2.   

    在手机上流程是这样的
    首先请求
    http://dl.vmall.com/c0jy1iarqc
    它的页面会判断是手机请求的话 会转到这个页面
    http://m.dbank.com/xhtml/link/resource.jsp?id=c0jy1iarqc&opt=101&e_r_auth=1&pid=39
    在这个页面点击后 会执行openFile()js函数 作用就是讲地址解密
    为http://dl.vmall.com/download/%E5%8E%86%E5%8F%B2%E9%A2%91%E9%81%93_%E5%AE%87%E5%AE%99%E7%B3%BB%E5%88%97_%E7%AC%AC%E
    4%B8%89%E5%AD%A3_History_Channel_The_Universe_3_01_Deep_Space_Disasters.rmvb?f=c0jy1iarqc&i=1&h=1365666530&v=f8e1d8
    dd&u=eb395790&ip=10.1.2.216&p=39&lpid=&tc=1
    这个地址会有时间限制 超过时间就会失效。
    这是效果图
      

  3.   

    在手机上流程是这样的
    首先请求
    http://dl.vmall.com/c0jy1iarqc
    它的页面会判断是手机请求的话 会转到这个页面
    http://m.dbank.com/xhtml/link/resource.jsp?id=c0jy1iarqc&opt=101&e_r_auth=1&pid=39
    在这个页面点击后 会执行openFile()js函数 作用就是讲地址解密
    为http://dl.vmall.com/download/%E5%8E%86%E5%8F%B2%E9%A2%91%E9%81%93_%E5%AE%87%E5%AE%99%E7%B3%BB%E5%88%97_%E7%AC%AC%E
    4%B8%89%E5%AD%A3_History_Channel_The_Universe_3_01_Deep_Space_Disasters.rmvb?f=c0jy1iarqc&i=1&h=1365666530&v=f8e1d8
    dd&u=eb395790&ip=10.1.2.216&p=39&lpid=&tc=1
    这个地址会有时间限制 超过时间就会失效。