Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Android stupidity?

Android stupidity?

Scheduled Pinned Locked Moved The Lounge
c++javascripthtmlcssandroid
7 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    David ONeil
    wrote on last edited by
    #1

    Finished creating an html document with pics and styling. Wanted to read it on my phone and see if everything looks ok there. The only way to do so seems to be to install an http server on the phone... Can't just dump everything into a subdirectory and click on the html file because android restrictions keep browsers from loading the css and other files. Is the potential risk from loading local javascript files so much greater than loading javascript files off the web that this is needed? Before finding the local server option, I read items saying that if you dumped things into the browser's 'Download' folder, it could access everything from there. But Android restrictions keep you from viewing those download folders through the file viewer (at least on my Samsung device), saying that 'Android->data' files cannot be accessed due to android restrictions, but can be shown on a computer... Compound this with the fact that I had to use the Google Play store for the first time in ages, and it is becoming a complete crap-fest of worthlessness.... < / vent>

    Our Forgotten Astronomy | Object Oriented Programming with C++ | Wordle solver

    D A A 3 Replies Last reply
    0
    • D David ONeil

      Finished creating an html document with pics and styling. Wanted to read it on my phone and see if everything looks ok there. The only way to do so seems to be to install an http server on the phone... Can't just dump everything into a subdirectory and click on the html file because android restrictions keep browsers from loading the css and other files. Is the potential risk from loading local javascript files so much greater than loading javascript files off the web that this is needed? Before finding the local server option, I read items saying that if you dumped things into the browser's 'Download' folder, it could access everything from there. But Android restrictions keep you from viewing those download folders through the file viewer (at least on my Samsung device), saying that 'Android->data' files cannot be accessed due to android restrictions, but can be shown on a computer... Compound this with the fact that I had to use the Google Play store for the first time in ages, and it is becoming a complete crap-fest of worthlessness.... < / vent>

      Our Forgotten Astronomy | Object Oriented Programming with C++ | Wordle solver

      D Offline
      D Offline
      dandy72
      wrote on last edited by
      #2

      David O'Neil wrote:

      Is the potential risk from loading local javascript files so much greater than loading javascript files off the web that this is needed?

      The only (?) way I could see this *maybe* being justifiable might be the fact that your connection to a web server is probably going to be done over https, which might buy you some assurance that files served can be trusted[*]. You might not have this assurance when loading files locally (who knows where *they* came from, and will vouch for them being safe?) [*] And yes, I realize that a server can be compromised and then *none* of its files can be trusted. But at least you do get that minimal level of trust...

      D 1 Reply Last reply
      0
      • D dandy72

        David O'Neil wrote:

        Is the potential risk from loading local javascript files so much greater than loading javascript files off the web that this is needed?

        The only (?) way I could see this *maybe* being justifiable might be the fact that your connection to a web server is probably going to be done over https, which might buy you some assurance that files served can be trusted[*]. You might not have this assurance when loading files locally (who knows where *they* came from, and will vouch for them being safe?) [*] And yes, I realize that a server can be compromised and then *none* of its files can be trusted. But at least you do get that minimal level of trust...

        D Offline
        D Offline
        David ONeil
        wrote on last edited by
        #3

        I'm with you, especially on the maybe. I'd really like to see the research that shows this scenario being a real-world problem. Some idiot plugging into a malware USB dongle? That I can see, but something actually in internal memory??? That makes no sense... Unless 'quick share' and other things are an attack vector... Still, what is the research?

        Our Forgotten Astronomy | Object Oriented Programming with C++ | Wordle solver

        1 Reply Last reply
        0
        • D David ONeil

          Finished creating an html document with pics and styling. Wanted to read it on my phone and see if everything looks ok there. The only way to do so seems to be to install an http server on the phone... Can't just dump everything into a subdirectory and click on the html file because android restrictions keep browsers from loading the css and other files. Is the potential risk from loading local javascript files so much greater than loading javascript files off the web that this is needed? Before finding the local server option, I read items saying that if you dumped things into the browser's 'Download' folder, it could access everything from there. But Android restrictions keep you from viewing those download folders through the file viewer (at least on my Samsung device), saying that 'Android->data' files cannot be accessed due to android restrictions, but can be shown on a computer... Compound this with the fact that I had to use the Google Play store for the first time in ages, and it is becoming a complete crap-fest of worthlessness.... < / vent>

          Our Forgotten Astronomy | Object Oriented Programming with C++ | Wordle solver

          A Offline
          A Offline
          Amarnath S
          wrote on last edited by
          #4

          Would it be a viable alternative to host that html page onto GitHub (using a free account) and access that GitHub page from the mobile browser. (Depends on the privacy of that html content, pictures)

          D 1 Reply Last reply
          0
          • A Amarnath S

            Would it be a viable alternative to host that html page onto GitHub (using a free account) and access that GitHub page from the mobile browser. (Depends on the privacy of that html content, pictures)

            D Offline
            D Offline
            David ONeil
            wrote on last edited by
            #5

            Probably possible, but the fact that android requires such workarounds seems unbelievably stupid.

            Our Forgotten Astronomy | Object Oriented Programming with C++ | Wordle solver

            1 Reply Last reply
            0
            • D David ONeil

              Finished creating an html document with pics and styling. Wanted to read it on my phone and see if everything looks ok there. The only way to do so seems to be to install an http server on the phone... Can't just dump everything into a subdirectory and click on the html file because android restrictions keep browsers from loading the css and other files. Is the potential risk from loading local javascript files so much greater than loading javascript files off the web that this is needed? Before finding the local server option, I read items saying that if you dumped things into the browser's 'Download' folder, it could access everything from there. But Android restrictions keep you from viewing those download folders through the file viewer (at least on my Samsung device), saying that 'Android->data' files cannot be accessed due to android restrictions, but can be shown on a computer... Compound this with the fact that I had to use the Google Play store for the first time in ages, and it is becoming a complete crap-fest of worthlessness.... < / vent>

              Our Forgotten Astronomy | Object Oriented Programming with C++ | Wordle solver

              A Offline
              A Offline
              AndyChisholm
              wrote on last edited by
              #6

              To test HTML in my local network I just set up a tiny server in Python. You can then access it from your terminal/mobile/PC. The server script can be found all over the Internet. The code is:

              import os
              from http.server import HTTPServer, CGIHTTPRequestHandler
              os.chdir('D:\serverfolder')
              server_object = HTTPServer(server_address=('',8080),RequestHandlerClass=CGIHTTPRequestHandler)
              server_object.serve_forever()

              Then put your HTML in the folder of your choice mentioned on the os.chdir line, and connect from the browser to your IP address, e.g. http://192.168.1.72:8080/webpagename.html The nice thing is that it really does test the HTML and file links to local OS folders, etc. doesn't get in the way. http only so insecure and only to be used locally but, adequate for testing and accessible from anywhere on your local network.

              D 1 Reply Last reply
              0
              • A AndyChisholm

                To test HTML in my local network I just set up a tiny server in Python. You can then access it from your terminal/mobile/PC. The server script can be found all over the Internet. The code is:

                import os
                from http.server import HTTPServer, CGIHTTPRequestHandler
                os.chdir('D:\serverfolder')
                server_object = HTTPServer(server_address=('',8080),RequestHandlerClass=CGIHTTPRequestHandler)
                server_object.serve_forever()

                Then put your HTML in the folder of your choice mentioned on the os.chdir line, and connect from the browser to your IP address, e.g. http://192.168.1.72:8080/webpagename.html The nice thing is that it really does test the HTML and file links to local OS folders, etc. doesn't get in the way. http only so insecure and only to be used locally but, adequate for testing and accessible from anywhere on your local network.

                D Offline
                D Offline
                David ONeil
                wrote on last edited by
                #7

                Thanks for the reply. I've already solved it with a server on the phone, but maybe someone comes across this some day and finds it helpful! I must also admit that I haven't played with Python, but I'll keep it in mind in the future.

                Our Forgotten Astronomy | Object Oriented Programming with C++ | Wordle solver

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups