標籤

2020年3月23日 星期一

iPhone的檔案,如何傳到Mac,原來不是我想的那樣

當mac用usb 聯上iphone後
finder會出現手機,然後點選手機,就會出現手機相關訊息
再點選上方檔案,就會出現一些有file share 的app
點那些app就能與其交換檔案

但是 iPhone上叫做「檔案」的那支app呢?
怎麼沒出現在這個地方


做法
原來要從手機點選檔案那支app,選取要上傳到mac的檔案,然後點分享
選擇Airdrop , 如果在同一個網路的話,就可看到你的mac, 點選一下就會傳過來了喔

2020年3月16日 星期一

android10的坑,sdcard不能讀寫,notification不會通知 (解決方法在此)

在安卓9執行的好好的app
升級到android 10就又不能正常運作

過程就不多說了,直接把我解決問題的方法,留下紀綠

1. sdcard
sdcard的讀寫要正常,不用改程式,只需在 androidmanifest.xml 加上一行,就可以了
<application    android:allowBackup="true"    android:icon="@mipmap/ic_launcher"
//  加上下面這行    android:requestLegacyExternalStorage="true"              

2.notification

問題的原因是 android 10 要求有 channel id
加上這樣,就ok了

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O)
{
    String channelId = "bpviwer_channel_id";
    NotificationChannel channel = new NotificationChannel(
            channelId,
            "bpviwer_channel",
            NotificationManager.IMPORTANCE_HIGH);
    mNotificationManager.createNotificationChannel(channel);
    mBuilder.setChannelId(channelId);
}


這樣就耗了兩天的時間了