Android development
Table of Contents
- related androiddevandroid
- Android studio plugins androiddevsetup
- Phone apps androiddev
- androiddev Why asynctasks are bad?
- androiddev running strace on device
- debugging with adb androiddevadb
- TODO [C] I made something to turn any mobile website into an iPhone app… /r/webdev androiddevandroid
- TODO [C] What is the difference between PhoneGap and Ionic? /r/learnprogramming androiddevandroid
- TODO [C] Do people use plain Cordova to build apps ? Or do most people use it in a framework like Ionic or PhoneGap /r/javascript androiddevandroid
- TODO [C] PhoneGap/Cordova vs Ionic vs React Native /r/webdev androiddev
- TODO [C] JStumpp/awesome-android: A curated list of awesome Android packages and resources. androiddev
- [D] fastlane/fastlane: 🚀 The easiest way to automate building and releasing your iOS and Android apps androiddev
- [D] udev - Android adb no permission - Ask Ubuntu androiddevadb
- [D] How to Debug a Third Party Android App | Lobsters https://lobste.rs/s/vlawsw/how_debug_third_party_android_app androiddev
- [C] Allow using a different directory than Documents for local storage · Issue 999 · jonasoreland/runnerup androiddev
¶related androiddevandroid
¶Android studio plugins androiddevsetup
- ADB Idea
- Bash support
- CheckStyle - IDEA
- Drawable importer
- Findbugs - IDEA
- IdeaVim
- Lombok
- Markdown
- Python support
- Sqldelight
- Teamcity
¶Phone apps androiddev
- Cheatdroid: shared prefs editor
¶ Why asynctasks are bad? androiddev
- AsyncTasks are not composable, To run two (or more) dependent asyncTasks you need to run one from another.
- Error handling needs boilerplate: To handle error in main thread you need to return null as result (and losing error information in onPostExecute), or wrap your result in some kind of Either, where you provide result or error
- AsyncTasks force you to handle result in main thread (even when it's intermediate result, and should not be handled in main thread yet)
- And of course Activity/Fragment lifecycle, but that's the point why loaders were introduced.
¶ running strace on device androiddev
setenforce 0 # In Android 4.3 and later, if SELinux is enabled, strace will fail with "strace: wait: Permission denied" set `ps | grep zygote` ; strace -p $2 -f -tt -T -s 500 -o /sdcard/strace.txt
¶debugging with adb androiddevadb
¶Wireless adb: androiddevadb
adb shell netcfg
¶Clearing the app data androiddevadb
adb shell pm clear com.google.mail
¶Start an activity androiddevadb
adb shell am start PACKAGE_NAME/ACTIVITY_IN_PACKAGE adb shell am start PACKAGE_NAME/FULLY_QUALIFIED_ACTIVITY # example adb shell am start -n com.growingwiththeweb.example/.MainActivity adb shell am start -n com.growingwiththeweb.example/com.growingwiththeweb.example.MainActivity
¶Start service androiddevadb
adb shell am startservice -n "ru.yandex.mail/com.yandex.mail.service.AbookCacheService"
¶Debug activity/service starts androiddevadb
logcat -b events | grep "google.mail"
¶View activity stack: androiddevadb
adb shell dumpsys activity activities | sed -En -e '/Stack #/p' -e '/Running activities/,/Run #0/p'
¶Run certain tests: androiddevadb
adb shell am instrument -w -e class com.yandex.mail.tests.FolderTest,com.yandex.mail.tests.MessageListTest ru.yandex.mail.test/com.yandex.mail.UiTestsRunner
¶TODO [C] I made something to turn any mobile website into an iPhone app… /r/webdev androiddevandroid
Why you didn't use the tags? ><meta name="apple-mobile-web-app-capable" content="yes"> ><meta name="apple-mobile-web-app-status-bar-style" content="black"> It works amazingly with Chrome: https://developer.chrome.com/multidevice/android/installtohomescreen You get the App icon on your screen, full screen, etc!
¶TODO [C] What is the difference between PhoneGap and Ionic? /r/learnprogramming androiddevandroid
Ionic is just a UI. Think of all the UI peculiarities when you use your iPhone. Now imagine trying to hand roll all of that in CSS. Doable, but a real PITA. That's why Ionic was developed. Phone gap is a totally different thing and is what compiles your code into somethin iOS or android understands.
¶TODO [C] Do people use plain Cordova to build apps ? Or do most people use it in a framework like Ionic or PhoneGap /r/javascript androiddevandroid
Hello! Using cordova on it's own has grown out of fashion due to the amount of things you are required to set it up to make it look like a semi decent app. That said, there are those who still do that, but they likely have a suite of things they've developed over time to make use of it. Phonegap isn't a different framework though, it's the non open source version of Cordova that is marketed by Adobe. Ionic is the framework you'd most likely be looking, as they do provide a number of useful mobile components, and styles. You could also look into React Native, as the community is growing at a faster rate than Ionic did. It doesn't use Cordova at all, but rather the JavaScript runtime on iOS & Android to make use of the platforms' native UI components.
¶TODO [C] PhoneGap/Cordova vs Ionic vs React Native /r/webdev androiddev
Ionic is basically Cordova with Angular on top with a convenient CLI. In my experience Cordova apps tend to be laggy in the long run and the debugging process is relatively annoying when trying to debug native plugins (you have to build the app via xcode etc.). You should be aware that Cordova uses the web view to display the app. So it’s kinda like running a web page on your phone and trying to convince the user it’s a native app. React native on the other hand uses the native components of the OS. So it’s not a web view, which means your app will feel much smoother. The downside of react native is that it uses its own components on top of the native ones which makes it hard to reuse your frontend code to the extent you could with a Cordova app. Personal opinion: In my opinion and based on my past experience I would go with react native if I had to choose a framework based on JavaScript. Hope this helps :)
¶TODO [C] JStumpp/awesome-android: A curated list of awesome Android packages and resources. androiddev
https://github.com/JStumpp/awesome-android#readme
Development Alternatives
¶[D] fastlane/fastlane: 🚀 The easiest way to automate building and releasing your iOS and Android apps androiddev
¶[D] udev - Android adb no permission - Ask Ubuntu androiddevadb
https://askubuntu.com/questions/680591/android-adb-no-permission
Change the USB mode in your phone to File Transfer. That's what worked for me.
¶[D] How to Debug a Third Party Android App | Lobsters https://lobste.rs/s/vlawsw/how_debug_third_party_android_app androiddev
¶[C] Allow using a different directory than Documents for local storage · Issue 999 · jonasoreland/runnerup androiddev
The problem is scooped storage in newer Android versions. An app only has access to its specific directories. With older Android than 10 it is possible. This piece of code need to be changed when targeting Android 111 (before next fall) as getExternalStoragePublicDirectory() is not supported then.