6 ms·
"Instant Run lets developers build and deploy their apps once (both to the emulator or to a physical device) and then as they change their code and deploy it, i
by talloaktrees 11y ago
"Instant Run lets developers build and deploy their apps once (both to the emulator or to a physical device) and then as they change their code and deploy it, it’ll only take a second or two before they can see those changes in the running app. This feature will work for all apps that target Ice Cream Sandwich and later. Cuthbertson politely refused to tell us how exactly Instant Run works, but promised that Google will detail the technology behind this feature in the future."
This could be awesome, if it works as advertised.
- gruez 11y agoI guess it works similarly to edit and continue in visual studio.
- Natanael_L 11y agoIf done directly on devices too, I'm assuming runtime hacks similar to Xposed that swap code out right away.
- jayd16 11y agoYes, it sounds more like monkey patching the apk than simply changing the running code. Hard to say without more details. /starts download
- free2rhyme214 11y agoInstant Run would be awesome on iOS...
- iLoch 11y agoReact Native supports it on both platforms. Also live reload. :)
- jbigelow76 11y agoSame with NativeScript.
- oblio 11y agoInteresting. Have you used NativeScript for a commercial product? It's the first time I hear about it and I'm curious to hear an opinion about it.
- untog 11y agoI've been playing around with it, but not for a full project. It's very interesting - unlike React Native the JS has full access to all native APIs, so if you want to call one no-one has written a wrapper for yet you just can. I've actually ended up writing a lot of platform specific code as I found the cross-platform stuff to be kind of janky. But it basically lets me write an iOS app, using iOS APIs (and even iOS sample code, if I apply myself)... in JavaScript. It's not bad at all.
- iLoch 11y ago> unlike React Native the JS has full access to all native APIs, so if you want to call one no-one has written a wrapper for yet you just can. Yup I think I'll stay as far away from that as possible! Sounds like a recipe for a 10 hour debugging binge. I think managed APIs are pretty essential when doing interop.
- untog 11y agoDepends what you're trying to do. For instance, I was playing around with notifications in iOS. They have the ability for you to download data in the background before a notification is opened, which is a tremendously useful thing to be able to do. Last I checked the multi-platform frameworks don't allow you to do it - so being able to use NativeScript's cross-platform stuff then augment it as you desire is a pretty great thing.
- 11y ago
- AlphaSite 11y agoThere is a limited form of it available as an Xcode plugin. - https://github.com/johnno1962/injectionforxcode https://github.com/johnno1962/injectionforxcode
- javaguy44 11y agoI dev Droid and iOS natively, and am playing with instant run now. iOS simulator still faster than Instant Run on a real sized project. Instant Run just helps to bring more parity, but is still not there yet.
- Drdrdrq 11y agoI imagine they only change the modified activities. I guess they can't do that for games...
- newjersey 11y agoYup, modified activities but games should be able to take advantage of this as well. In the timestamp below, it shows the presenter making the chess pieces larger and smaller. It is available on the canary build beginning today. Give it a try? https://www.youtube.com/watch?feature=player_detailpage&v=YYin_N6xXxQ#t=2521 https://www.youtube.com/watch?feature=player_detailpage&v=YY... (lifestream timestamp is probably inaccurate)
- whatever_dude 11y agoIt starts 26 minutes in, so people should look at the start time and just forward 26 minutes. It's the second speaker, a woman right after the man that comes first.
- whatever_dude 11y agoJust tested. It doesn't replace the activities, it replaces parts of the compiled code (classes' dex?) with new versions. It works well most of the time. Sometimes it can cause some nasty crashes. I guess it's expected since you can't just replace some object instances and expect it to work. The settings does have an option to also restart the current activity when it does the hot swapping. I guess it's to account for those cases when hot swapping doesn't work as expected.
- revelation 11y agoIt crashes? That's pretty bad. VS Edit&Continue and Eclipse JDT, which also do something similar, warn you when a change can't be applied live (or would cause a crash resuming on old state). I've generally found with this feature in various IDEs that it's good for changing a constant in some drawing code but not really much else, and then it just turns into frustration as you get constant popups reminding you it won't apply some change live. I think the problem is that in the timeframe companies like Google and Microsoft allocate for such a feature, it's extremely difficult to produce something that works 99% of the time. If we could get there (and improve step backwards functionality, as well) we would probably just abandon the divide between programming and debugging mode in IDEs and always have an updated copy running (or mostly, paused) alongside ready to context-switch into.
- mirkoadari 11y agoIt's definitely possible. JRebel for Android [1] has been available for quite some time now with none of the limitations on what kind of changes are supported. Will they get it stable? Time will tell. [1] https://zeroturnaround.com/software/jrebel-for-android/ https://zeroturnaround.com/software/jrebel-for-android/
- seany 11y agoYou can do this with CoronaSDK based apps already (on all platforms even)
- nohawp 11y agoI just tried it, it works pretty well. You can also ask it to relaunch the activity.
- ycosynot 11y agoFor some reason, it doesn't work with my radio button text, it doesn't update it, but it works with labels and button texts. Well, maybe it's not stable yet, but it's awesome, and I'm happy that it's there.
- nerdwaller 11y agoI've had hit and miss results so far, sometimes it's great and then a bunch of times it ends up launching the app twice. Perhaps I'm either doing something wrong or I'm not hitting the right use when this works flawlessly. So far, however, hit and miss with little clear reason.
- whatever_dude 11y agoMy hypothesis is that launching the app twice actually means it's crashing the app. When the app is running, and you do an instant run from Android Studio, it will try doing the hot swap. The app crashes and immediately relaunches (and it's the same build). All the while Android Studio is monitoring the app task and waiting for the hot swap to take place. It keeps checking, times out after a few seconds (realizing it didn't update successfully), and then it deploys and launches the new APK, as a last resort. My point is to be careful when testing if you're getting the double launches, because the first time it is launched, it's still the old APK.
- shade23 11y agoIt does not seem to be working for me. It does not reflect logic changes and I thought it was only for UI,however that also had no effect.Am I doing something wrong?
- scorpion032 11y agoI think they have to compete with how React Native handles it, to make sure the developer experience developing Native Android apps is at least at par with those developing using React native, Ionic etc.