android铃声总结

2024-03-30 21:08
文章标签 android 总结 铃声

本文主要是介绍android铃声总结,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

感谢 大明同志辛苦制作。

        最近研究源码程序,改了改手机短信铃声的源码,总结了下铃声的代码,写个activity继承PreferenceActivity有:手机短信铃声,手机铃声,闹钟铃声,还有sdcard中的铃声,通过选择相应的铃声,然后读取到xml文件里面,通过读取preference.xml文件,intent传个参数进去intent.putExtra(RingtoneManager.EXTRA_RINGTONE_EXISTING_URI, phoneUri);打开对话框的时候就默认选中上次被选中的音乐。程序流程:在onCreate()方法中加入addPreferencesFromResource(R.xml.preferences);加载xml文件。@Override重写onPreferenceTreeClick()方法,处理点击事件,在打开对话框铃声的时候,先读取xml文件,判断是否有值,如果有值,就传值intent.putExtra(RingtoneManager.EXTRA_RINGTONE_EXISTING_URI, phoneUri);然后进行选择铃声。通过onActivityResult()接受传递过来的uri,系统默认的铃声是通过data.getParcelableExtra(RingtoneManager.EXTRA_RINGTONE_PICKED_URI);方法来获取uri的,而sdcard中的铃声通过Uri pickedUri = data.getData();来获得选中的uri的,再然后通过editor.commit();  来提交接受过来的uri和音乐的名字整个流程大概就是这样。


 SoundSettingActivity.apk (49.5 KB, 下载次数: 14)  SoundSettingActivity.rar (198.83 KB, 下载次数: 288) 



33333.png  777777.png  666666.png 888888.png 


下面代码附上:

在SoundSettingActivity这个工程下面:

一、在com.cn.android.daming包的SoundSettingMainActivity.java类中的代码:
  1. <span style="font-size:16px;color:#000000;">package com.cn.android.daming;

  2. import android.content.Intent;
  3. import android.content.SharedPreferences;
  4. import android.media.Ringtone;
  5. import android.media.RingtoneManager;
  6. import android.net.Uri;
  7. import android.os.Bundle;
  8. import android.preference.Preference;
  9. import android.preference.PreferenceActivity;
  10. import android.preference.PreferenceManager;
  11. import android.preference.PreferenceScreen;

  12. public class SoundSettingMainActivity extends PreferenceActivity  {

  13.         private static final int SMS_RINGTONE_PICKED = 1;
  14.         private static final int PHONE_RINGTONE_PICKED = 2;
  15.         private static final int ALARM_RINGTONE_PICKED = 3;
  16.         private static final int SDCARD_RINGTONE_PICKED = 4;
  17.         
  18.         public static final String NOTIFICATION_RINGTONE    = "pref_notification_ringtone";
  19.         public static final String NOTIFICATION_RINGTONE_TITLE_NAME = "pref_notification_ringtone_name";
  20.         public static final String PHONE_RINGTONE    = "pref_phone_ringtone";
  21.         public static final String PHONE_RINGTONE_TITLE_NAME    = "pref_phone_ringtone_title_name";
  22.         public static final String ALARM_RINGTONE    = "pref_alarm_ringtone";
  23.         public static final String ALARM_RINGTONE_TITLE_NAME    = "pref_alarm_ringtone_title_name";
  24.         public static final String SDCARD_RINGTONE    = "pref_sdcard_ringtone";
  25.         public static final String SDCARD_RINGTONE_TITLE_NAME    = "pref_sdcard_ringtone_title_name";
  26.         
  27.         private String notificationStr;
  28.         private String phoneStr;
  29.         private String alarmStr;
  30.         private String sdcardStr;
  31.         
  32.         private Preference mMmsSoundsPref;
  33.         private Preference mPhoneSoundsPref;
  34.         private Preference mAlarmSoundsPref;
  35.         private Preference mSdcardSoundsPref;
  36.         
  37.         @Override
  38.     public void onCreate(Bundle savedInstanceState) {
  39.         super.onCreate(savedInstanceState);
  40.         addPreferencesFromResource(R.xml.preferences);
  41.         setMessagePreferences();
  42.         setDefaultPreferences();
  43.     }
  44.     
  45.     private void setMessagePreferences() {
  46.             mMmsSoundsPref = findPreference("pref_sms_ringtone");
  47.             mPhoneSoundsPref = findPreference("pref_phone_ringtone");
  48.             mAlarmSoundsPref = findPreference("pref_alarm_ringtone");
  49.             mSdcardSoundsPref = findPreference("pref_sdcard_ringtone");
  50.     }
  51.     
  52.     private void setDefaultPreferences(){
  53.             SharedPreferences innersharedPreferences = PreferenceManager.getDefaultSharedPreferences(SoundSettingMainActivity.this);
  54.             String notificationRingtoneTitleName = innersharedPreferences.getString(NOTIFICATION_RINGTONE_TITLE_NAME, null);
  55.             if(notificationRingtoneTitleName!=null){
  56.                     mMmsSoundsPref.setSummary(notificationRingtoneTitleName);
  57.             }else{
  58.                     mMmsSoundsPref.setSummary(getString(R.string.pref_summary_notification_ringtone));
  59.             }
  60.             
  61.             String phoneRingtoneTitleName = innersharedPreferences.getString(PHONE_RINGTONE_TITLE_NAME, null);
  62.             if(phoneRingtoneTitleName!=null){
  63.                     mPhoneSoundsPref.setSummary(phoneRingtoneTitleName);
  64.             }else{
  65.                     mPhoneSoundsPref.setSummary(getString(R.string.pref_summary_phone_ringtone));
  66.             }
  67.             
  68.             String alarmRingtoneTitleName = innersharedPreferences.getString(ALARM_RINGTONE_TITLE_NAME, null);
  69.             if(alarmRingtoneTitleName!=null){
  70.                     mAlarmSoundsPref.setSummary(alarmRingtoneTitleName);
  71.             }else{
  72.                     mAlarmSoundsPref.setSummary(getString(R.string.pref_summary_alarm_ringtone));
  73.             }
  74.             
  75.             String sdcardRingtoneTitleName = innersharedPreferences.getString(SDCARD_RINGTONE_TITLE_NAME, null);
  76.             if(sdcardRingtoneTitleName!=null){
  77.                     mSdcardSoundsPref.setSummary(sdcardRingtoneTitleName);
  78.             }else{
  79.                     mSdcardSoundsPref.setSummary(getString(R.string.pref_summary_sdcard_ringtone));
  80.             }
  81.     }

  82.         @Override
  83.         public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen,
  84.                         Preference preference) {
  85.                 if (preference == mMmsSoundsPref){
  86.                         doPickSmsRingtone();
  87.                 }
  88.                 else if(preference == mPhoneSoundsPref){
  89.                         doPickPhoneRingtone();
  90.                 }
  91.         else if(preference == mAlarmSoundsPref){
  92.                 doPickAlarmRingtone();
  93.                 }
  94.         else if(preference == mSdcardSoundsPref){
  95.                 doPickSdcardRingtone();
  96.         }
  97.                 return super.onPreferenceTreeClick(preferenceScreen, preference);
  98.         }
  99.         
  100.         private void doPickSmsRingtone(){
  101.                 SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);  
  102.                 notificationStr = sharedPreferences.getString(NOTIFICATION_RINGTONE, null); 
  103.             
  104.         Intent intent = new Intent(RingtoneManager.ACTION_RINGTONE_PICKER);
  105.         // Allow user to pick 'Default'
  106.         intent.putExtra(RingtoneManager.EXTRA_RINGTONE_SHOW_DEFAULT, true);
  107.         // Show only ringtones
  108.         intent.putExtra(RingtoneManager.EXTRA_RINGTONE_TYPE, RingtoneManager.TYPE_NOTIFICATION);
  109.         //set the default Notification value
  110.         intent.putExtra(RingtoneManager.EXTRA_RINGTONE_DEFAULT_URI, RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION));
  111.         // Don't show 'Silent'
  112.         intent.putExtra(RingtoneManager.EXTRA_RINGTONE_SHOW_SILENT, true);

  113.         Uri notificationUri;
  114.         if (notificationStr != null) {
  115.                 notificationUri = Uri.parse(notificationStr);
  116.             // Put checkmark next to the current ringtone for this contact
  117.             intent.putExtra(RingtoneManager.EXTRA_RINGTONE_EXISTING_URI, notificationUri);
  118.         } else {
  119.             // Otherwise pick default ringtone Uri so that something is selected.
  120.                 notificationUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
  121.             // Put checkmark next to the current ringtone for this contact
  122.             intent.putExtra(RingtoneManager.EXTRA_RINGTONE_EXISTING_URI, notificationUri);
  123.         }

  124.         // Launch!
  125.         startActivityForResult(intent, SMS_RINGTONE_PICKED);
  126.         }
  127.         
  128.         private void doPickPhoneRingtone(){
  129.                 SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);  
  130.                 phoneStr = sharedPreferences.getString(PHONE_RINGTONE, null); 
  131.                 
  132.                 Intent intent = new Intent(RingtoneManager.ACTION_RINGTONE_PICKER);
  133.         // Allow user to pick 'Default'
  134.         intent.putExtra(RingtoneManager.EXTRA_RINGTONE_SHOW_DEFAULT, true);
  135.         // Show only ringtones
  136.         intent.putExtra(RingtoneManager.EXTRA_RINGTONE_TYPE, RingtoneManager.TYPE_RINGTONE);
  137.         //set the default Notification value
  138.         intent.putExtra(RingtoneManager.EXTRA_RINGTONE_DEFAULT_URI, RingtoneManager.getDefaultUri(RingtoneManager.TYPE_RINGTONE));
  139.         // Don't show 'Silent'
  140.         intent.putExtra(RingtoneManager.EXTRA_RINGTONE_SHOW_SILENT, true);
  141.         
  142.         Uri phoneUri;
  143.         if (phoneStr != null) {
  144.                 phoneUri = Uri.parse(phoneStr);
  145.             // Put checkmark next to the current ringtone for this contact
  146.             intent.putExtra(RingtoneManager.EXTRA_RINGTONE_EXISTING_URI, phoneUri);
  147.         } else {
  148.             // Otherwise pick default ringtone Uri so that something is selected.
  149.                 phoneUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_RINGTONE);
  150.             // Put checkmark next to the current ringtone for this contact
  151.             intent.putExtra(RingtoneManager.EXTRA_RINGTONE_EXISTING_URI, phoneUri);
  152.         }
  153.         
  154.         startActivityForResult(intent, PHONE_RINGTONE_PICKED);
  155.         }
  156.         
  157.         private void doPickAlarmRingtone(){
  158.                 SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);  
  159.                 alarmStr = sharedPreferences.getString(ALARM_RINGTONE, null); 
  160.                 
  161.                 Intent intent = new Intent(RingtoneManager.ACTION_RINGTONE_PICKER);
  162.         // Allow user to pick 'Default'
  163.         intent.putExtra(RingtoneManager.EXTRA_RINGTONE_SHOW_DEFAULT, true);
  164.         // Show only ringtones
  165.         intent.putExtra(RingtoneManager.EXTRA_RINGTONE_TYPE, RingtoneManager.TYPE_ALARM);
  166.         //set the default Notification value
  167.         intent.putExtra(RingtoneManager.EXTRA_RINGTONE_DEFAULT_URI, RingtoneManager.getDefaultUri(RingtoneManager.TYPE_ALARM));
  168.         // Don't show 'Silent'
  169.         intent.putExtra(RingtoneManager.EXTRA_RINGTONE_SHOW_SILENT, true);
  170.         
  171.         Uri alarmUri;
  172.         if (alarmStr != null) {
  173.                 alarmUri = Uri.parse(alarmStr);
  174.             // Put checkmark next to the current ringtone for this contact
  175.             intent.putExtra(RingtoneManager.EXTRA_RINGTONE_EXISTING_URI, alarmUri);
  176.         } else {
  177.             // Otherwise pick default ringtone Uri so that something is selected.
  178.                 alarmUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_ALARM);
  179.             // Put checkmark next to the current ringtone for this contact
  180.             intent.putExtra(RingtoneManager.EXTRA_RINGTONE_EXISTING_URI, alarmUri);
  181.         }
  182.         
  183.         startActivityForResult(intent, ALARM_RINGTONE_PICKED);
  184.         }
  185.         
  186.         private void doPickSdcardRingtone(){
  187.                 SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);  
  188.                 sdcardStr = sharedPreferences.getString(SDCARD_RINGTONE, null); 
  189.                 
  190.                 Uri sdcardUri = null;
  191.             if (sdcardStr != null) {
  192.                     sdcardUri = Uri.parse(sdcardStr);
  193.             } 
  194.                 
  195.         Intent innerIntent = new Intent(Intent.ACTION_GET_CONTENT);
  196.         innerIntent.setType("audio/*");
  197.         //you could lookup the framework the type of audio,if you don`t want use the Recorder use the note code
  198. //        innerIntent.setType("audio/aac");
  199. //        innerIntent.setType("audio/mp3");
  200. //        innerIntent.setType("audio/midi");
  201.         // Put checkmark next to the current ringtone for this contact
  202.         innerIntent.putExtra(RingtoneManager.EXTRA_RINGTONE_EXISTING_URI, sdcardUri);
  203.         Intent wrapperIntent = Intent.createChooser(innerIntent, null);
  204.         startActivityForResult(wrapperIntent, SDCARD_RINGTONE_PICKED);
  205.         }

  206.         @Override
  207.         protected void onResume() {
  208.                 setDefaultPreferences();
  209.                 super.onResume();
  210.         }

  211.         @Override
  212.         protected void onActivityResult(int requestCode, int resultCode, Intent data) {
  213.                 SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);  
  214.         SharedPreferences.Editor editor = sharedPreferences.edit();  
  215.                 if (resultCode != RESULT_OK) {
  216.             return;
  217.         }
  218.                 
  219.                 switch (requestCode) {
  220.                       case SMS_RINGTONE_PICKED:{
  221.                               Uri pickedUri = data.getParcelableExtra(RingtoneManager.EXTRA_RINGTONE_PICKED_URI);
  222.                               if(null == pickedUri){
  223.                                       editor.putString(NOTIFICATION_RINGTONE_TITLE_NAME, getString(R.string.select_ringtone_slient));
  224.                                       editor.putString(NOTIFICATION_RINGTONE, null); 
  225.                                       editor.commit(); 
  226.                               }else{
  227.                                       Ringtone ringtone =  RingtoneManager.getRingtone(SoundSettingMainActivity.this, pickedUri);
  228.                                       String strRingtone = ringtone.getTitle(SoundSettingMainActivity.this);
  229.                                       editor.putString(NOTIFICATION_RINGTONE_TITLE_NAME, strRingtone);
  230.                                       editor.putString(NOTIFICATION_RINGTONE, pickedUri.toString());  
  231.                                       editor.commit();  
  232.                               }
  233.                               break;
  234.                       }
  235.                       case PHONE_RINGTONE_PICKED:{
  236.                               Uri pickedUri = data.getParcelableExtra(RingtoneManager.EXTRA_RINGTONE_PICKED_URI);
  237.                               if(null == pickedUri){
  238.                                       editor.putString(PHONE_RINGTONE_TITLE_NAME, getString(R.string.select_ringtone_slient));
  239.                                       editor.putString(PHONE_RINGTONE, null); 
  240.                                       editor.commit(); 
  241.                               }else{
  242.                                       phoneStr = pickedUri.toString();
  243.                                       Ringtone ringtone =  RingtoneManager.getRingtone(SoundSettingMainActivity.this, pickedUri);
  244.                                       String strRingtone = ringtone.getTitle(SoundSettingMainActivity.this);
  245.                                       editor.putString(PHONE_RINGTONE_TITLE_NAME, strRingtone);
  246.                                       editor.putString(PHONE_RINGTONE, pickedUri.toString());  
  247.                                       editor.commit();  
  248.                               }
  249.                               break;
  250.                       }
  251.                       case ALARM_RINGTONE_PICKED:{
  252.                               Uri pickedUri = data.getParcelableExtra(RingtoneManager.EXTRA_RINGTONE_PICKED_URI);
  253.                               if(null == pickedUri){
  254.                                       editor.putString(ALARM_RINGTONE_TITLE_NAME, getString(R.string.select_ringtone_slient));
  255.                                       editor.putString(ALARM_RINGTONE, null); 
  256.                                       editor.commit(); 
  257.                               }else{
  258.                                       Ringtone ringtone =  RingtoneManager.getRingtone(SoundSettingMainActivity.this, pickedUri);
  259.                                       String strRingtone = ringtone.getTitle(SoundSettingMainActivity.this);
  260.                                       editor.putString(ALARM_RINGTONE_TITLE_NAME, strRingtone);
  261.                                       editor.putString(ALARM_RINGTONE, pickedUri.toString());  
  262.                                       editor.commit();  
  263.                               }
  264.                               break;
  265.                       }
  266.                       case SDCARD_RINGTONE_PICKED:{
  267.                               Uri pickedUri = data.getData();
  268.                               if(null != pickedUri){
  269.                                       notificationStr = pickedUri.toString();
  270.                                       Ringtone ringtone =  RingtoneManager.getRingtone(SoundSettingMainActivity.this, pickedUri);
  271.                                       String strRingtone = ringtone.getTitle(SoundSettingMainActivity.this);
  272.                                       editor.putString(SDCARD_RINGTONE_TITLE_NAME, strRingtone);
  273.                                       editor.putString(SDCARD_RINGTONE, pickedUri.toString());  
  274.                                       editor.commit();  
  275.                               }
  276.                               break;
  277.                       }
  278.                       default:break;
  279.                 }
  280.         }
  281. }</span>
复制代码
二、在res目录下加入xml文件,加入preferences.xml中的代码:
  1. <span style="font-size:16px;"><?xml version="1.0" encoding="utf-8"?>
  2. <PreferenceScreen
  3.   xmlns:android="http://schemas.android.com/apk/res/android">
  4.           <PreferenceCategory android:title="@string/pref_sounds_storage_title"
  5.                               android:key="pref_key_storage_settings">
  6.                    <Preference         
  7.                             android:layout="?android:attr/preferenceLayoutChild"
  8.                         android:key="pref_sms_ringtone"
  9.                         android:ringtoneType="notification"
  10.                         android:title="@string/pref_title_notification_ringtone"
  11.                         android:summary="@string/pref_summary_notification_ringtone"
  12.                />
  13.                <Preference         
  14.                             android:layout="?android:attr/preferenceLayoutChild"
  15.                         android:key="pref_phone_ringtone"
  16.                         android:ringtoneType="notification"
  17.                         android:title="@string/pref_title_phone_ringtone"
  18.                         android:summary="@string/pref_summary_phone_ringtone"
  19.                />
  20.                <Preference         
  21.                             android:layout="?android:attr/preferenceLayoutChild"
  22.                         android:key="pref_alarm_ringtone"
  23.                         android:ringtoneType="notification"
  24.                         android:title="@string/pref_title_alarm_ringtone"
  25.                         android:summary="@string/pref_summary_alarm_ringtone"
  26.                />
  27.                <Preference         
  28.                             android:layout="?android:attr/preferenceLayoutChild"
  29.                         android:key="pref_sdcard_ringtone"
  30.                         android:ringtoneType="notification"
  31.                         android:title="@string/pref_title_sdcard_ringtone"
  32.                         android:summary="@string/pref_summary_sdcard_ringtone"
  33.                />
  34.           </PreferenceCategory>
  35. </PreferenceScreen>
  36. </span>
复制代码
三、在values目录下的string中的代码:
  1. <span style="font-size:16px;"><?xml version="1.0" encoding="utf-8"?>
  2. <resources>
  3.     <string name="hello">Hello World, SoundSettingMainActivity!</string>
  4.     <string name="app_name">SoundSettingApp</string>
  5.     <string name="pref_sounds_storage_title">大明原创SoundSetting</string>
  6.     <string name="pref_title_notification_ringtone">选择短信铃声</string>
  7.     <string name="pref_summary_notification_ringtone">默认短信铃声</string>
  8.     <string name="pref_title_phone_ringtone">选择手机铃声</string>
  9.     <string name="pref_summary_phone_ringtone">默认手机铃声</string>
  10.     <string name="pref_title_alarm_ringtone">选择闹钟铃声</string>
  11.     <string name="pref_summary_alarm_ringtone">默认闹钟铃声</string>
  12.     <string name="pref_title_sdcard_ringtone">选择Sdcard中的铃声</string>
  13.     <string name="pref_summary_sdcard_ringtone">默认Sdcard铃声</string>
  14.     <string name="select_ringtone_slient">静音</string>
  15. </resources>
  16. </span>
复制代码
四、在AndroidManifest.xml中的代码:
  1. <span style="font-size:16px;"><?xml version="1.0" encoding="utf-8"?>
  2. <manifest xmlns:android="http://schemas.android.com/apk/res/android"
  3.       package="com.cn.android.daming"
  4.       android:versionCode="1"
  5.       android:versionName="1.0">
  6.     <uses-sdk android:minSdkVersion="8" />

  7.     <application android:icon="@drawable/icon" android:label="@string/app_name">
  8.         <activity android:name=".SoundSettingMainActivity"
  9.                   android:label="@string/app_name">
  10.             <intent-filter>
  11.                 <action android:name="android.intent.action.MAIN" />
  12.                 <category android:name="android.intent.category.LAUNCHER" />
  13.             </intent-filter>
  14.         </activity>
  15.     </application>
  16. </manifest></span>
复制代码
原文地址:http://www.eoeandroid.com/forum.php?mod=viewthread&tid=111007

这篇关于android铃声总结的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/862583

相关文章

JavaSE正则表达式用法总结大全

《JavaSE正则表达式用法总结大全》正则表达式就是由一些特定的字符组成,代表的是一个规则,:本文主要介绍JavaSE正则表达式用法的相关资料,文中通过代码介绍的非常详细,需要的朋友可以参考下... 目录常用的正则表达式匹配符正则表China编程达式常用的类Pattern类Matcher类PatternSynta

Android DataBinding 与 MVVM使用详解

《AndroidDataBinding与MVVM使用详解》本文介绍AndroidDataBinding库,其通过绑定UI组件与数据源实现自动更新,支持双向绑定和逻辑运算,减少模板代码,结合MV... 目录一、DataBinding 核心概念二、配置与基础使用1. 启用 DataBinding 2. 基础布局

Android ViewBinding使用流程

《AndroidViewBinding使用流程》AndroidViewBinding是Jetpack组件,替代findViewById,提供类型安全、空安全和编译时检查,代码简洁且性能优化,相比Da... 目录一、核心概念二、ViewBinding优点三、使用流程1. 启用 ViewBinding (模块级

SQL中JOIN操作的条件使用总结与实践

《SQL中JOIN操作的条件使用总结与实践》在SQL查询中,JOIN操作是多表关联的核心工具,本文将从原理,场景和最佳实践三个方面总结JOIN条件的使用规则,希望可以帮助开发者精准控制查询逻辑... 目录一、ON与WHERE的本质区别二、场景化条件使用规则三、最佳实践建议1.优先使用ON条件2.WHERE用

Nginx Location映射规则总结归纳与最佳实践

《NginxLocation映射规则总结归纳与最佳实践》Nginx的location指令是配置请求路由的核心机制,其匹配规则直接影响请求的处理流程,下面给大家介绍NginxLocation映射规则... 目录一、Location匹配规则与优先级1. 匹配模式2. 优先级顺序3. 匹配示例二、Proxy_pa

Android学习总结之Java和kotlin区别超详细分析

《Android学习总结之Java和kotlin区别超详细分析》Java和Kotlin都是用于Android开发的编程语言,它们各自具有独特的特点和优势,:本文主要介绍Android学习总结之Ja... 目录一、空安全机制真题 1:Kotlin 如何解决 Java 的 NullPointerExceptio

MySQL基本查询示例总结

《MySQL基本查询示例总结》:本文主要介绍MySQL基本查询示例总结,本文通过实例代码给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友参考下吧... 目录Create插入替换Retrieve(读取)select(确定列)where条件(确定行)null查询order by语句li

Android NDK版本迭代与FFmpeg交叉编译完全指南

《AndroidNDK版本迭代与FFmpeg交叉编译完全指南》在Android开发中,使用NDK进行原生代码开发是一项常见需求,特别是当我们需要集成FFmpeg这样的多媒体处理库时,本文将深入分析A... 目录一、android NDK版本迭代分界线二、FFmpeg交叉编译关键注意事项三、完整编译脚本示例四

Android与iOS设备MAC地址生成原理及Java实现详解

《Android与iOS设备MAC地址生成原理及Java实现详解》在无线网络通信中,MAC(MediaAccessControl)地址是设备的唯一网络标识符,本文主要介绍了Android与iOS设备M... 目录引言1. MAC地址基础1.1 MAC地址的组成1.2 MAC地址的分类2. android与I

Linux区分SSD和机械硬盘的方法总结

《Linux区分SSD和机械硬盘的方法总结》在Linux系统管理中,了解存储设备的类型和特性是至关重要的,不同的存储介质(如固态硬盘SSD和机械硬盘HDD)在性能、可靠性和适用场景上有着显著差异,本文... 目录一、lsblk 命令简介基本用法二、识别磁盘类型的关键参数:ROTA查询 ROTA 参数ROTA