@C99CXMOE 那感觉不用mod啊,直接改gamerule就行了(
@_Ju_Ju_ 可是吐槽多了大家就认识你了(逃
Well, the app itself is pretty good, the Android system is not very well.
The router I used is an AP only router. Which means on my bike, without any internet, it offers no internet either. The phone will connect to that wifi, but everything is still offline. So everything including the map apps will stop working.
So you might see it... With my setup, the only working app is my self-made app. Thankfully, I have an OpenStreetMap based app installed on my phone and I use it for cycling navigation. Thank god I have it.
So for the WiFi-on-bike, I would suggest something like roaming/portable Wifi. The one has a built-in 4G or 5G module that allows you to connect the cellular network while offering a wifi AP.
With the cheapest model I found (150Mbps 2.4GHz WiFi 4), I think it can handle at least 10 peers talking at once.
But I have already had a cellular network subscription, and I don't want to make an additional subscription for just providing wifi on my bike, so I'd stick with this TPLINK router.
Well, the app itself is pretty good, the Android system is not very well.
The router I used is an AP only router. Which means on my bike, without any internet, it offers no internet either. The phone will connect to that wifi, but everything is still offline. So everything including the map apps will stop working.
So you might see it... With my setup, the only working app is my self-made app. Thankfully, I have an OpenStreetMap based app installed on my phone and I use it for cycling navigation. Thank god I have it.
So for the WiFi-on-bike, I would suggest something like roaming/portable Wifi. The one has a built-in 4G or 5G module that allows you to connect the cellular network while offering a wifi AP.
With the cheapest model I found (150Mbps 2.4GHz WiFi 4), I think it can handle at least 10 peers talking at once.
But I have already had a cellular network subscription, and I don't want to make an additional subscription for just providing wifi on my bike, so I'd stick with this TPLINK router.
Tested my app with my friends yesterday.
I installed (aka, tape it on my bike using duct tape) a WiFi router on my bike. The model I used was TPLINK TL-WR802N, which was created between 2013 and 2015, and had its latest firmware update in 2018. It only supports 2.4GHz WiFi 4 (300Mbps) so I won't use it when I need maximum security or performance. But it only costs 15 USD with shipping, so what more could I ask for? And it's USB-powered!
Depending on how you position the router, the signal will only reach a maximum of approximately 20 meters. If there are vehicles or large metal objects between the router and clients, then the packets will definitely be lost.
With that said, the app works pretty fine when things are not going wrong. The sound is loud and clear. Based on my friend's feedback, it's better than the WeChat voice call, which I assume benefits from using `MediaRecorder.AudioSource.VOICE_COMMUNICATION` instead of the normal MIC source, which applies voice-related optimizations such as noise reduction. But the app did keep crashing when I was on the road. Luckily, I just need to reinstall it to reset the data.
Anyway, I made some changes based on yesterday's feedback (including fixing the crash) and now I think it's good to go. The only drawback is the app uses audio recording and internet permission, and is signed by meself and not distributed from Google Play. So each time I install or update it, Play Protect will jump out and alarm the user with potential harm. I have already filed a dispute with the Google Play team, but I don't expect much from it.
At least this is the first real useful app I have ever made. *Enjoy my happiness*
ok, I think I figured out.
Once I opened the bluetooth SCO, it not the bluetooth headset entering hnads-free mode, but instead is the android system that mute all streams other than voice call stream.
To fix it, just use `audioManager.mode = AudioManager.MODE_NORMAL` after SCO connected. This will turn system back into normal mode, aka routing all streams including music and voice call to the bluetooth headset using SCO protocol, allowing the app to fetch mic input from bt headset.
The android document didn't mention this at all. The ChatGPT said this will won't work and suggest that I use AudioFocus. LOL
日本民众和中国民众反对排放核污水的行动,性质是全然不同的:前者的核心是声讨政府违背了2015年对渔业工作者许下的“在取得相关人员的接受前不会对核污染水进行进一步处理”的承诺,抗议政府的不负责和排放执行过程中的地域不平等问题,并且与反对岸田内阁的公民运动紧密相连;而后者则完全是宣传机器煽动下的、充斥着反科学和民族主义情绪的自上而下的政治运动,号称为全世界环境着想,却放任仇恨情绪宣泄丝毫不顾他国国民立场,刻意渲染危害严重,又不愿出台保护措施仅以暂停进口粉饰门面。
反对国内排外民族情绪并不意味着就要放弃对核废水问题的讨论,支持福岛渔联、日本民众乃至世界各国对日本政府排放核污水责任的声讨,与反对中国民族主义宣传并不矛盾,两种运动的目标看似相同,但两者性质和立场的天差地别,决定了我们应当持有怎样的态度。
The most painful thing about Android developing is api deprecation.
There is a old API which is bad, thus is deprecated in a newer API level, they introduced a new API for replacement. That's ok. I like using latest, better and non-deprecated API in my code.
But why this new API is deprecated again in several versions later??
And sadly, I'm using Samsung, so I'm on latest android version. However, my friend uses XiaoMi, which still running on Android 8. Now I have to cross 3 different API styles to do one single thing and it does not work, and make things worse, I don't know why.
你说中国的沿海核电站一样会往海里排放核废水,就有人说核污染水和核废水不一样,但其实这只是一种文字游戏,两者只要都符合国际安全标准那就是一样的,在符合国际原子能机构安全标准的前提下,福岛「核污染水」和传统「核废水」只在氚元素含量上差异较大,而日本的稀释技术和操作规范都通过了国际原子能机构的安全检测,且检测团队里包含两名中国科学家,退一万步说,核污染水有有害物,但核废水也有有害物,如果真的是睚眦必报眼里不揉沙子的环保主义者,应该早早就抵制一切核电站与核技术,包括中国核电站,又怎会从福岛泄露才开始关心,豆瓣上还有人感叹“全世界只有中国关心福岛核污染”,事实是没有人比你傻,别人的“不关心”是有原因的,原因就在于信奉科学还是反智,在于看论文还是看公众号,在于看专业科普还是看抖音头条小红书微博热搜,中国社交媒体如此“关心”福岛就和中国社交媒体关心明星艺人私德问题一样,都是在用一种事情转移另一些事情的关注度
I decide to persuade my friend to get a HAM license and we can chat on local VHF channel when riding. But how to push PTT button while riding is an issue.
I wrote a simple android app to broadcast voice over udp multicast. I also designed a simple encryption and advertising protocol to prevent unauthorized tapping and automatically discover new peers on the same channel. Here is the code:
https://github.com/hurui200320/Nojre
However, I intent to use this app when riding with my friend, now I can't figure out how to record audio from Bluetooth devices. The API is confusing. Someone suggest I should use AudioManager::startBluetoothSco(), but then I lost audio playback (aka hand-free mode), I clearly don't want that. I just want to record the audio from the bt mic. I tried AudioRecorder::setPreferredDevice, and it's not working too.
F*ck.
**I have a job now!**
I'm a Chinese shitizen, but I generally don't post in Chinese to avoid being suffering from other Chinese.
I'm physically a male, but I don't care how people think about my gender. I can be male, or female, or cat. But if you ask, I'd prefer to be referred to as male. Also, I support LGBT+ people, and I'm a copyleft. I don't think I'm too aggressive in arguing things, but sometimes I do. You should handle it with care.
I post about programming (most time is Java and Kotlin, unless I have a new love), and some random things I find interesting. I also post about my mental health, which is in a stable state of instability, thanks to my parents and Chinese society.
Anyway, if you want to follow me, I'm glad to see you. And, have a nice day.
Alt: @skyblond