我需要找到所有大写字母中string。例如
输入:Electronics and Communication Engineering
输出:ECE
我正在使用下载管理器从url下载文件。并且文件下载成功。
问题
文件正在静默下载,通知区域中没有通知。
下载管理器在运行android 6.0的设备上显示了通知(带有进度条)。我将设备更新为android 7.0后,下载管理器在通知区域未显示任何通知。
这是我的代码
Uri uri = Uri.parse("file://" + destination);
url = "http:....."; //Valid File URL
//Set up download manager request
DownloadManager.Request request = new DownloadManager.Request(Uri.parse(url));
request.setDescription("Downloading " + file_name);
request.setTitle("My Downloader");
request.setDestinationUri(uri); //URI is valid
//Start the download
DownloadManager manager = (DownloadManager) getContext()
.getSystemService(Context.DOWNLOAD_SERVICE);
Run Code Online (Sandbox Code Playgroud)
另外添加request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE);也无济于事。
建造信息
这是我的Gradle Build信息。
minSdkVersion 22
targetSdkVersion 23
compileSdkVersion 25
buildToolsVersion "25.0.2"
Run Code Online (Sandbox Code Playgroud)