DEV Community

Cover image for VSCode on Android Phone

VSCode on Android Phone

Anna Villarreal on May 07, 2024

Hello everyone! This is my first post here! I've been learning to code for the last 6 months. I thought it would be super cool if I could code on m...
Collapse
 
andersonpull profile image
Anderson Oliveira Bezerra

Very cool, I don't know how this app that you paid for works, but you can also access vscode online (vscode.dev/), it's free, I use it a lot on my iPad, it's a PWA (so it can be installed on your cell phone ), I've already used it to work with javascript frontend and I've already used it to create plugins for vscode itself, it's really cool that you shared its use, I'll research about vscode apps.

Collapse
 
hendrix04 profile image
Hendrix

Yeah... I wouldn't pay $12 for free open source software, lol. Especially software that can be loaded by just about any web browser.

Anyone reading this, please go to vscode.dev and don't do what the poster did.

Collapse
 
inthevortex profile image
Angsuman Ray

Exactly, I was confused whether to laugh or cry.

Collapse
 
annavi11arrea1 profile image
Anna Villarreal

Hey Anderson! I do have the free app on my computer and can access the web environment from my phone. However, they do not offer a downloadable version for my android phone. Well, I can download it, but it doesn't open on my phone. There are likely some hacks around this. I like the idea of being able to to edit things with or without an internet connection.

Collapse
 
andersonpull profile image
Anderson Oliveira Bezerra

As @mcpshiming mentioned, you can install the PWA for offline use, because what they basically did was create an app, open a webview, call the VScode link and a person who does that and charges is not a trustworthy person for you to have an app on your phone, I hope I was able to explain.
😄🤜🤛😃

Collapse
 
mcpshiming profile image
MCP

Hey Anna, you can actually install a PWA on your phone for offline use. If you are using Chrome, you can tap the three dots in the top right corner of the screen, then hit Install App. Once it's installed, you'll likely see a similar experience to what the app you installed offers.

Thread Thread
 
annavi11arrea1 profile image
Anna Villarreal

OMG That is so simple!!!!! Thank you for pointing that out!!!!!!!!!!!

Collapse
 
m-prindas profile image
Masoom PrInDa'S


I see this app on android playstore it’s amazing. It’s support offline

Collapse
 
bergamin profile image
Guilherme Taffarel Bergamin

Have you tried this on a desktop mode setting like Samsung Dex or Motorola Ready For?

Collapse
 
andersonpull profile image
Anderson Oliveira Bezerra

I haven't tried, but if the device has a browser the behavior should be the same.

Thread Thread
 
bergamin profile image
Guilherme Taffarel Bergamin

I have just tried it out... Unfortunately my phone model can't be connected directly to a monitor, but it works pretty well

Image description

It feels just like VSCode on the PC. If you could actually code in this, this would be brilliant, but I think you can't directly access local files through the browser without opening it for every website (I may be wrong) and I doubt you would be able to build and run stuff through this, which brings me to Stackblitz:

Image description

This would be able to run your code and I think there is a setting to sync with a repository on GitHub (I wish they would connect to GitLab as well, which is where my more serious projects are. Maybe one day), so you could actually fully use this in an emergency. Just plug a compatible phone to a monitor + bt keyboard and mouse and you wouldn't even need to have the files on your phone either...

Collapse
 
onlinereferjobs2001 profile image
Typing Speed

Thank you for posting such a great article! I found your website perfect for my needs. It contains wonderful and helpful posts. Keep up the good work!. Thank you for this wonderful Article!
Online Refer Jobs

RIT🙂

Collapse
 
nebsitcouncil profile image
NEBSIT Council

Nice post. I found this to be an informative and interesting post, so I think it is very useful and knowledgeable. I am glad to read this post and hope your next article is are so useful for me so you are meeting in the next process for more information click this link below: -
NEBSIT
RIT

Collapse
 
bergamin profile image
Guilherme Taffarel Bergamin • Edited

I started thinking of this kind of stuff since smartphones started becoming commonplace. I would love to be able to just bring a tablet to university with one of those very thin bt keyboards instead if a full blown laptop if I could.

Have you tried this on desktop mode? Something like Samsung Dex or Motorola Ready For?

Collapse
 
jonte profile image
jontstaz

What I've been using recently on devices other than my main PC is Google's IDX. It's essentially VSCode in the cloud and it allows you to connect your Github account and then stands up a complete dev instance, complete with web server, iOS and Android live preview, full shell environment, etc. It's actually super useful and it's free (at least for now).

Collapse
 
annavi11arrea1 profile image
Anna Villarreal

Nice

Collapse
 
cloudburst profile image
Cloudburst (Leah)

Regarding file syncing: I personally use SyncThing for file syncing, since it works in the background and allows you to ignore certain files (such as build files and the ever bulky node_modules folder).

The only caviat is that it doesn't sync if you're not connected to the same network. I've not had to figure out how to make it work everywhere tho since the syncing works automatically, as long as your phone is on the same network as your computer it should just sync fully at maximum a few minutes after your last code edit on the computer.

Collapse
 
netapex profile image
Ollie Townsend III

For people looking to be on the same network as their computer I suggest Tailscale. Very user friendly VPN software that makes anywhere your home network (or work network or wherever you decide to install it.) Great for Home Assistant installs as well!

Collapse
 
inthevortex profile image
Angsuman Ray

Hey, it will sync over the internet once pairing is done. If you have explicitly asked for your own relays, then you will have to setup one but the general public relays work fine. But obviously slower than intranet. I use it to sync my Obsidian vault across devices and also backup my code to my home server.

Collapse
 
cloudburst profile image
Cloudburst (Leah) • Edited

I was unaware Syncthing had public relays, I have to admit I haven't looked too much into it's documentation and was going of my experience with it (I just installed it and paired stuff :p)

I'll have to look at the documentation more, since I'm going on holiday in 2 weeks time and having files still sync will be mighty helpful

Collapse
 
ant247 profile image
Ant

So a paid for version of an open source app. With who knows what added code.
That gets you to login with your GitHub creds.

Hope you have 2FA.

Collapse
 
corscheid profile image
Corey Scheideman

yeah oof, whoever posted that app to Google Play is outrageous. And Google is outrageous for letting it slide past review. This app should probably be mass reported if it hasn't already been. I feel for all the excited innocent souls like OP

Collapse
 
annavi11arrea1 profile image
Anna Villarreal

It appeared to be safe but I have since uninstalled it and reset everything. Gonna try the other method one more time. Thanks for you feedback.

Collapse
 
instalab profile image
Samuel Boczek

And if you have Samsung with Dex then you get full desktop experience, don't even need a laptop anymore. But as others mentioned, pleeeease refund the app if you still can. This dude is scam, shouldn't be allowed to charge for an app he did not even build. It will probably be be pulled out eventually anyway.

Collapse
 
thraize profile image
Gamerxville

Currently working on a fork of the already popular Acode mobile code editor meant to be the vscode for mobile 😁

You can download the beta apk from the actions tabs from my github

It also comes with a nodejs backend and termux integration out the box, currently working on the plugin api

github.com/7HR4IZ3/Acode

Collapse
 
corscheid profile image
Corey Scheideman • Edited

Also for those who did not know,

not only is vscode.dev a thing, but so too are

  • github.dev
  • github.dev/{user}/{repository}
    • example: github.dev/github/dev

which is a very convenient way to be on chrome looking at a GitHub repository, and to open it in a browser VS Code, all you do is change the .com to .dev and boom, VS Code, open to that repo. Most useful on one's own repos, but if it's someone else's, I believe it creates a fork for you to edit and commit on.

github.dev (GitHub Codespaces) can also be installed as PWA in the same way as vscode.dev

Collapse
 
nineoneone profile image
Since™️

I totally get the excitement of using a dedicated app as vscode on mobile device.

I don’t see the particular app your are referring to but there are few recommendations available on playstore:

  1. Vscode by DevEnvironments
  2. Acode - code editor | FOSS | by Foxdebug
  3. deVStudio by UserLAnd Technologies

For iOS/iPadOS devices, most of the options are already mentioned, but you can also try this:

  • Setup and leave a code-server tunnel instance running on your android and use that with iOS/iPadOS devices.
Collapse
 
annavi11arrea1 profile image
Anna Villarreal • Edited

This is the particular app i had downloaded but now uninstalled due to a few questionable things: https://play.google.com/store/apps/details?id=dev.environment.VScode_PaidR1&hl=en_US&gl=US

Collapse
 
nineoneone profile image
Since™️

yes, The first one from my list?

What was the concern? the codeserver location?

Collapse
 
kurealnum profile image
Oscar

I didn't know that you could get VSCode (or any editor, for that matter) onto a mobile device lol. Do you have a keyboard that connects to your phone?

Collapse
 
annavi11arrea1 profile image
Anna Villarreal

Typed on an android phone with USB keyboard

Hey Oscar! I just checked that out just for you, and YES! You can connect your keyboard. I connected my keyboard with a USB-C and bam it just worked automatically. Pretty cool. I'm actually considering switching to one of those wider z-flip phones to have a bigger phone display for coding! excitement

Collapse
 
israaali profile image
Israa

That's awesome to hear! I'm curious, what type of keyboard did you connect to your phone? I'm looking for one that's compact and easy to carry around too. Any recommendations?

Thread Thread
 
haaikraai profile image
haaikraai

I had such a setup as well because of all the power outages in this country. Android is full-on on-board with USB keyboards. It defaults to hiding the virtual keyboard and have shortcuts for home and back and other buttons. Use Bluetooth or a USB multi-adapter hub thingy (I don't know the technical term tbh) to add a mouse too if tou want

Personally I did experience I tiny bit of latency, but not enough to investigate the real source. The quick flip from portrait to landscape is one of my favourite "features" - that's just not something I've successfully done with a 17" monitor that still works to support my claim

Thread Thread
 
israaali profile image
Israa

Thanks for sharing your experience! It sounds like a versatile setup. I appreciate the insight on using USB keyboards with Android. The quick flip from portrait to landscape does sound handy! Just to clarify, when you mentioned the quick flip, were you referring to the Galaxy Z Flip5? I've been considering it for coding on the go, but I'm a bit worried about potential repair costs for Samsung parts. Any thoughts on that?

Collapse
 
hlzn profile image
Hugo Lozano

Yes! I was excited about coding on the go as well :) That was my main motivation for going with the z phone, I use the web version connected to my GitHub repos and my local computer thru tunnels, the fun thing is that while using the tunnels you can run backend applications (dotnet in my case) and test them in the phone
Image description

Thread Thread
 
annavi11arrea1 profile image
Anna Villarreal

sounds like using the zphone has been a positive experience for that!

Collapse
 
kurealnum profile image
Oscar

This is wild. You have a full on coding setup without a laptop or desktop in sight xD

Thread Thread
 
annavi11arrea1 profile image
Anna Villarreal

The future is here! haha

Thread Thread
 
annavi11arrea1 profile image
Anna Villarreal

Paired with one of those roll-up or projection keyboards it's full-on pocket techie mode! XD. Now, to be FAIR, it doesn't have the same feel as being surrounded by several monitors and a real keyboard. But hey, it's still pretty awesome.

Collapse
 
fmeres profile image
Felipe

Termux is available on F-Droid and GitHub. Setting up VScode on it is pretty straightforward and there are multiple guides online.

Collapse
 
annavi11arrea1 profile image
Anna Villarreal

I had downloaded f-droid and started installing. I couldn't get past a certain point in the install. Surely some error that is out of the scope of my current knowledge. My terminal said "bash2.5" and kept giving me errors. I poked around for a few hours and ultimately gave it a rest. For me, it was not so straight forward. XD

Collapse
 
inthevortex profile image
Angsuman Ray

YouTube has a couple of guides on setting up vscode on tab s9 ultra, they show how to do it. It has some typical steps but achievable, i tried it on my old phone. You just need to make sure that Ubuntu install proot, is properly updated and you have installed the arm variant of vs code along with gnome. Else, stand alone vs code server and tunnel it to your Android browser, that's also possible.

Not worth paying up $12 thought, in my humble opinion.

Collapse
 
benedict086005 profile image
Benedict086005

That's cool, I installed lazyvim on my termux application and it's working perfectly fine for me,if you're looking for a free text editor that works fine on Android,I will advise you try Vim(Lazyvim) on termux, actually people don't really like it because of it learning curve,but it will make you feel like a super hacker👨‍💻

Image description

Collapse
 
krishnasen2401 profile image
Lingam mohan Krishna sen • Edited

1)Install termux from github or f droid
2) run pkg update and upgrade
3) run termux-setup-storage
4)pkg install nodejs python
5)pkg install tur-repo
6)termux-change-repo if need
7)pkg install code-server
8)code-server --auth none
Visit ip:8080 to access vs code simple for offlline

Collapse
 
annavi11arrea1 profile image
Anna Villarreal

I tired this, and when I ran pkg update it threw an error. Suggestions for that?

Collapse
 
krishnasen2401 profile image
Lingam mohan Krishna sen • Edited

Can share the error with termux version if possible, I am currently using 118 arm64 from the github
github.com/termux/termux-app/relea...

Collapse
 
donbgullible profile image
Don B Gullible

Termux can be downloaded from GitHub I use it all the time as for programming on android phone I do that all the time too simple Bluetooth keyboard and mirror to large screen ... Who needs a pc/laptop I also have a VPS running slackware 15 which I ssh from termux into should I require full access to a linux box so yes your phone is more than capable and also there are free options out there rather than paying from playstore... If I like something particularly well I donate to them through patreon via PayPal which helps keep a lot of projects running... However you choose to support development is fine happy coding....

Collapse
 
annavi11arrea1 profile image
Anna Villarreal

Thanks for your input, i'm learning a lot from these comments.

Collapse
 
jeklah profile image
Jeklah

Termux is available and maintained on GitHub.
Then you can code in nvim :)

Collapse
 
kasaladeysleep profile image
myLane ♊

You can get Termux from their website. I installed it successfully on my phone and use Acode for my IDE.
Works great and run React on it perfectlt.

Collapse
 
shiv2712 profile image
Shiv Kumar Saxena

Gitpod is also the alternative way to devlop application on the cloud. One could switch to desktop site on chrome or any other browser.

Collapse
 
aadharc28797652 profile image
Aadhar Card

Thank you for posting such a great article! I found your website perfect for my needs. It contains wonderful and helpful posts. Keep up the good work!. Thank you for this wonderful Article!
UIDAI Check Status
RIT

Collapse
 
genlyai_ profile image
Walter Santos

Thanks, great first post!

Collapse
 
annavi11arrea1 profile image
Anna Villarreal

Thanks, it has been very insightful. I have gone full circle with all of this already. I realized, in the browser on the phone, if you click the 3 dots there is an option to install it. What a circus. XD

Collapse
 
oikawa profile image
Bhaumic

Can you share the Play Store link of the VsCode app?

Collapse
 
annavi11arrea1 profile image
Anna Villarreal
Collapse
 
annavi11arrea1 profile image
Anna Villarreal

FYI: I have since uninstalled it for security purposes.

Collapse
 
j4k0xb profile image
j4k0xb • Edited

VSCode is almost unusable on touch devices, can't select text, copy/paste is bugged and scrolling re-opens the keyboard all the time
CodeMirror is miles ahead in this regard but sadly doesn't support the TypeScript LSP

Collapse
 
corscheid profile image
Corey Scheideman • Edited

Interesting. Any word from its dev team on adding TypeScript LSP? Or the ability for users to integrate one as a plugin? Would love to give it a shot but I write a lot of ts/tsx

Collapse
 
gpmtube profile image
GPMTube

You are not supposed to pay anything cause you could just download termux from the web download Linux into termux and download vscode server into your Linux directory in termux and unzip it...
That way you would be able to access it from your browser at 127.0.0.8080. unfortunately you cannot sync your project through the server.

Collapse
 
ryne_ profile image
Himanshu Agarwal

I wouldn't suggest paying $12 for open souce code editor on Play Store that seems shady af, especially if you are a developer, it's very easy to setup using termux just have to run a couple of commands and you can be up and running in no time and btw latest termux releases are shifted to github/fdroid from playstore.

Collapse
 
aljoberg profile image
Aljo

Nice! I use Neovim on termux, and it works flawlessly. Termux is available as an apk on f-droid and their home page (termux.dev), if you wanna check that out.

Collapse
 
lexlohr profile image
Alex Lohr

Same here. With a bit of configuration, it doesn't need to hide behind large IDEs, including debugging, convenient lsp support, and above all, incredible speed.

Collapse
 
annavi11arrea1 profile image
Anna Villarreal

Wow I just woke up up to all this relevant feedback!! Thanks everyone I've got some homework to do!!!! You guys are awesome.

Collapse
 
lostcitizen profile image
lostcitizen

You may also want to check github.com/features/codespaces

a web based vscode

Collapse
 
yesbhautik profile image
Bhautik Bavadiya • Edited

Self-host it brother ( the best part it, you can access from anywhere at any device with single URL and password), it cost almost nothing if you know some tricks or know better provider.

Collapse
 
weirdocoder profile image
eduardIliasenco-ui

You can install vscode for free since it's a PWA

Collapse
 
rafay99epic profile image
Abdul Rafay

It's cool, but to honest, I would use a computer for all my development, it makes my mind fresh and active, but still good Find.

Collapse
 
mansimran profile image
Mansimran

vscode.dev/

Thank me later 🙂