رفتن به مطلب

دسترسی به تمام نقاط تنظیمات گوشی


ehsankhan

ارسال‌های توصیه شده

دسترسی به تمام نقاط تنظیمات گوشی

در برنامه نویسی گاهی نیاز می شود که به نقاط مختلف تنظیمات گوشی دسرسی داشته باشیم

در ابتدا یک متغیر به شکل زیر تعریف می کنیم

[font=monospace]Dim setting1 As Intent[/font]

سپس از کد زیر استفاده میکنیم :

[font=monospace]setting1.Initialize("android.settings.LOCATION_SOURCE_SETTINGS", "")[/font]
[font=monospace]    StartActivity(setting1)[/font]

بجای LOCATION_SOURCE_SETTINGS از کد های زیر میتونیم استفاده کنیم

[font=monospace]Action Details(Activity action)[/font]
[font=monospace]ACCESSIBILITY_SETTINGS = Show settings for accessibility modules.[/font]
[font=monospace]ADD_ACCOUNT = Show add account screen for creating a new account.[/font]
[font=monospace]AIRPLANE_MODE_SETTINGS = Show settings to allow entering/exiting airplane mode.[/font]
[font=monospace]APN_SETTINGS = Show settings to allow configuration of APNs.[/font]
[font=monospace]APPLICATION_DETAILS_SETTINGS = Show screen of details about a particular application.[/font]
[font=monospace]APPLICATION_DEVELOPMENT_SETTINGS = Show settings to allow configuration of application development-related settings.[/font]
[font=monospace]APPLICATION_SETTINGS = Show settings to allow configuration of application-related settings.[/font]
[font=monospace]BLUETOOTH_SETTINGS = Show settings to allow configuration of Bluetooth.[/font]
[font=monospace]DATA_ROAMING_SETTINGS = Show settings for selection of 2G/3G.[/font]
[font=monospace]DATE_SETTINGS = Show settings to allow configuration of date and time.[/font]
[font=monospace]DEVICE_INFO_SETTINGS = Show general device information settings (serial number, software version, phone number, etc.).[/font]
[font=monospace]DISPLAY_SETTINGS = Show settings to allow configuration of display.[/font]
[font=monospace]INPUT_METHOD_SETTINGS = Show settings to configure input methods, in particular allowing the user to enable input methods.[/font]
[font=monospace]INPUT_METHOD_SUBTYPE_SETTINGS = Show settings to enable/disable input method subtypes.[/font]
[font=monospace]INTERNAL_STORAGE_SETTINGS = Show settings for internal storage.[/font]
[font=monospace]LOCALE_SETTINGS = Show settings to allow configuration of locale.[/font]
[font=monospace]LOCATION_SOURCE_SETTINGS = Show settings to allow configuration of current location sources.[/font]
[font=monospace]MANAGE_ALL_APPLICATIONS_SETTINGS = Show settings to manage all applications.[/font]
[font=monospace]MANAGE_APPLICATIONS_SETTINGS = Show settings to manage installed applications.[/font]
[font=monospace]MEMORY_CARD_SETTINGS = Show settings for memory card storage.[/font]
[font=monospace]NETWORK_OPERATOR_SETTINGS = Show settings for selecting the network operator.[/font]
[font=monospace]NFCSHARING_SETTINGS = Show NFC Sharing settings.[/font]
[font=monospace]NFC_SETTINGS = Show NFC settings.[/font]
[font=monospace]PRIVACY_SETTINGS = Show settings to allow configuration of privacy options.[/font]
[font=monospace]QUICK_LAUNCH_SETTINGS = Show settings to allow configuration of quick launch shortcuts.[/font]
[font=monospace]SEARCH_SETTINGS = Show settings for global search.[/font]
[font=monospace]SECURITY_SETTINGS = Show settings to allow configuration of security and location privacy.[/font]
[font=monospace]SETTINGS = Show system settings.[/font]
[font=monospace]SOUND_SETTINGS = Show settings to allow configuration of sound and volume.[/font]
[font=monospace]SYNC_SETTINGS = Show settings to allow configuration of sync settings.[/font]
[font=monospace]USER_DICTIONARY_SETTINGS = Show settings to manage the user input dictionary.[/font]
[font=monospace]WIFI_IP_SETTINGS = Show settings to allow configuration of a static IP address for Wi-Fi.[/font]
[font=monospace]WIFI_SETTINGS = Show settings to allow configuration of Wi-Fi.[/font]
[font=monospace]WIRELESS_SETTINGS = Show settings to allow configuration of wireless controls such as Wi-Fi, Bluetooth and Mobile networks.[/font]
[font=monospace]EXTRA_AUTHORITIES = Limit available options in launched activity based on the given authority.[/font]

مثلا زمانی که برنامه ی ما به اینترنت نیاز داره با این کد باعث میشه که به قسمت اینترنت منتقل بشیم:

[font=monospace]DATE_SETTINGS = Show settings to allow configuration of date and time.[/font]

و برای رفتن به قسمت تنظیمات صدا از کد زیر استفاده می کنیم :

[font=monospace]SOUND_SETTINGS = Show settings to allow configuration of sound and volume.[/font]

صلوات برای سلامتی و تعجیل در فرج امام زمان (عج) فراموش نشه

لینک ارسال
به اشتراک گذاری در سایت های دیگر

  • 9 ماه بعد...

 

دسترسی به تمام نقاط تنظیمات گوشی

در برنامه نویسی گاهی نیاز می شود که به نقاط مختلف تنظیمات گوشی دسرسی داشته باشیم

در ابتدا یک متغیر به شکل زیر تعریف می کنیم


[FONT=monospace]Dim setting1 As Intent[/FONT]

سپس از کد زیر استفاده میکنیم :


[FONT=monospace]setting1.Initialize("android.settings.LOCATION_SOURCE_SETTINGS", "")[/FONT]
[FONT=monospace]    StartActivity(setting1)[/FONT]
بجای LOCATION_SOURCE_SETTINGS از کد های زیر میتونیم استفاده کنیم


[FONT=monospace]Action Details(Activity action)[/FONT]
[FONT=monospace]ACCESSIBILITY_SETTINGS = Show settings for accessibility modules.[/FONT]
[FONT=monospace]ADD_ACCOUNT = Show add account screen for creating a new account.[/FONT]
[FONT=monospace]AIRPLANE_MODE_SETTINGS = Show settings to allow entering/exiting airplane mode.[/FONT]
[FONT=monospace]APN_SETTINGS = Show settings to allow configuration of APNs.[/FONT]
[FONT=monospace]APPLICATION_DETAILS_SETTINGS = Show screen of details about a particular application.[/FONT]
[FONT=monospace]APPLICATION_DEVELOPMENT_SETTINGS = Show settings to allow configuration of application development-related settings.[/FONT]
[FONT=monospace]APPLICATION_SETTINGS = Show settings to allow configuration of application-related settings.[/FONT]
[FONT=monospace]BLUETOOTH_SETTINGS = Show settings to allow configuration of Bluetooth.[/FONT]
[FONT=monospace]DATA_ROAMING_SETTINGS = Show settings for selection of 2G/3G.[/FONT]
[FONT=monospace]DATE_SETTINGS = Show settings to allow configuration of date and time.[/FONT]
[FONT=monospace]DEVICE_INFO_SETTINGS = Show general device information settings (serial number, software version, phone number, etc.).[/FONT]
[FONT=monospace]DISPLAY_SETTINGS = Show settings to allow configuration of display.[/FONT]
[FONT=monospace]INPUT_METHOD_SETTINGS = Show settings to configure input methods, in particular allowing the user to enable input methods.[/FONT]
[FONT=monospace]INPUT_METHOD_SUBTYPE_SETTINGS = Show settings to enable/disable input method subtypes.[/FONT]
[FONT=monospace]INTERNAL_STORAGE_SETTINGS = Show settings for internal storage.[/FONT]
[FONT=monospace]LOCALE_SETTINGS = Show settings to allow configuration of locale.[/FONT]
[FONT=monospace]LOCATION_SOURCE_SETTINGS = Show settings to allow configuration of current location sources.[/FONT]
[FONT=monospace]MANAGE_ALL_APPLICATIONS_SETTINGS = Show settings to manage all applications.[/FONT]
[FONT=monospace]MANAGE_APPLICATIONS_SETTINGS = Show settings to manage installed applications.[/FONT]
[FONT=monospace]MEMORY_CARD_SETTINGS = Show settings for memory card storage.[/FONT]
[FONT=monospace]NETWORK_OPERATOR_SETTINGS = Show settings for selecting the network operator.[/FONT]
[FONT=monospace]NFCSHARING_SETTINGS = Show NFC Sharing settings.[/FONT]
[FONT=monospace]NFC_SETTINGS = Show NFC settings.[/FONT]
[FONT=monospace]PRIVACY_SETTINGS = Show settings to allow configuration of privacy options.[/FONT]
[FONT=monospace]QUICK_LAUNCH_SETTINGS = Show settings to allow configuration of quick launch shortcuts.[/FONT]
[FONT=monospace]SEARCH_SETTINGS = Show settings for global search.[/FONT]
[FONT=monospace]SECURITY_SETTINGS = Show settings to allow configuration of security and location privacy.[/FONT]
[FONT=monospace]SETTINGS = Show system settings.[/FONT]
[FONT=monospace]SOUND_SETTINGS = Show settings to allow configuration of sound and volume.[/FONT]
[FONT=monospace]SYNC_SETTINGS = Show settings to allow configuration of sync settings.[/FONT]
[FONT=monospace]USER_DICTIONARY_SETTINGS = Show settings to manage the user input dictionary.[/FONT]
[FONT=monospace]WIFI_IP_SETTINGS = Show settings to allow configuration of a static IP address for Wi-Fi.[/FONT]
[FONT=monospace]WIFI_SETTINGS = Show settings to allow configuration of Wi-Fi.[/FONT]
[FONT=monospace]WIRELESS_SETTINGS = Show settings to allow configuration of wireless controls such as Wi-Fi, Bluetooth and Mobile networks.[/FONT]
[FONT=monospace]EXTRA_AUTHORITIES = Limit available options in launched activity based on the given authority.[/FONT]
مثلا زمانی که برنامه ی ما به اینترنت نیاز داره با این کد باعث میشه که به قسمت اینترنت منتقل بشیم:


[FONT=monospace]DATE_SETTINGS = Show settings to allow configuration of date and time.[/FONT]
و برای رفتن به قسمت تنظیمات صدا از کد زیر استفاده می کنیم :


[FONT=monospace]SOUND_SETTINGS = Show settings to allow configuration of sound and volume.[/FONT]

صلوات برای سلامتی و تعجیل در فرج امام زمان (عج) فراموش نشه

 

ببخشید.واسه رفتن به بخش device Administrarorچه کدی هست.من فقط تونستم بخش امنیتی رو بیارم....

هر کی میدونه دریغ نکنه.ممنون

لینک ارسال
به اشتراک گذاری در سایت های دیگر

  • 2 هفته بعد...

سلام میشه بفرمایید از این کدها کجا باید و چه جوری استفاده کنیم

سلام ، توضیح دادند که. ابتدا یک متغیر تعریف کنید و بعد اون رو با نام یک قسمت از تنظیمات گوشی اینشالایز کنید. حالا با متد StartActivity در هر کجای برنامه مثل ساب کلیک یک باتون ، برید به تنظیمات. اگر مشکلی بود بفرمایید.

لینک ارسال
به اشتراک گذاری در سایت های دیگر

بایگانی شده

این موضوع بایگانی و قفل شده و دیگر امکان ارسال پاسخ نیست.

  • کاربران آنلاین در این صفحه   0 کاربر

    • هیچ کاربر عضوی،در حال مشاهده این صفحه نیست.
×
×
  • اضافه کردن...