Show newer

@C99CXMOE 那感觉不用mod啊,直接改gamerule就行了(

我:想买xxx,但是
朋友:你不结婚不生孩子就已经省了几百万了,有什么想要的你就买点吧

@Viola @leonashao 我去查了一下……这谁能分清啊!!!所以花栗鼠:白条纹一直到眼睛;金地松鼠(胡乱翻译):白条纹不明显,脸上没条纹…是这样吗老师?

On a second thought:

Will it still be useful when my app requires a WIFI on bicycle?

Well, I decide to stop thinking about it and simply keep enjoying my happniess of successfully built a thing.

@kcoo 记得看到过新闻对比:游客手机掉下水后,游到水里捞出来还给游客的是水獭,放自己肚子上咔咔砸的是海獭

回收那个绿色三角标志里面的三个箭头分别指:
1. reduce 少用
2. reuse 重复使用
3. recycle 回收

为什么是这个顺序呢?因为从这是工业产品对环境影响最小到最大的顺序(排除直接遗弃不予回收的情况)。
实际上只有少量的能回收的垃圾被回收,而且垃圾回收需要耗费大量能源。如果想要保护环境节约资源的话,最好的办法是克制欲望、少买东西,特别是会导致一次性物品被扔掉的东西,而不是买来后再回收。

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.

Show thread

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.

Show thread

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 unautho...

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:
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.

Show older
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.