WO2023273350A1 - Application authorization method and apparatus, and terminal device - Google Patents

Application authorization method and apparatus, and terminal device Download PDF

Info

Publication number
WO2023273350A1
WO2023273350A1 PCT/CN2022/075491 CN2022075491W WO2023273350A1 WO 2023273350 A1 WO2023273350 A1 WO 2023273350A1 CN 2022075491 W CN2022075491 W CN 2022075491W WO 2023273350 A1 WO2023273350 A1 WO 2023273350A1
Authority
WO
WIPO (PCT)
Prior art keywords
application
authorization
interface
permission
terminal device
Prior art date
Application number
PCT/CN2022/075491
Other languages
French (fr)
Chinese (zh)
Inventor
陈栋
Original Assignee
荣耀终端有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 荣耀终端有限公司 filed Critical 荣耀终端有限公司
Publication of WO2023273350A1 publication Critical patent/WO2023273350A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/604Tools and structures for managing or administering access control systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2141Access rights, e.g. capability lists, access control lists, access tables, access matrices

Definitions

  • the present application relates to the technical field of terminals, in particular to an application authorization method, device and terminal equipment.
  • the application program needs to obtain corresponding permissions. For example, if an application wants to access and modify calendars, create schedules, etc., it needs to obtain the calendar permission; if the application wants to realize location-based services (Location Based Services, LBS) related functions, it needs to obtain the location service permission; If the application needs to implement the recording function, it needs to obtain the microphone permission.
  • LBS Location Based Services
  • terminal devices generally manage application permissions through a permission management mechanism.
  • the permission management mechanism may include an installation-time permission mode and a runtime permission mode.
  • the runtime permission mode means that the user does not need to grant permission to the application program when the application program is installed, but grants permission to the application program when the application program is running.
  • the terminal device can authorize the interface on the display screen, and the authorization interface can prompt the user for the permission content requested by the application and provide it to the user.
  • Allow always Allow only while in use
  • Deny Ask
  • Allow once Deny and never ask again. If the user clicks the option "Deny and don't ask again", then when the terminal device requests the permission again, the authorization interface will not pop up again, and the terminal device will guide the user to set the permission in the system's setting application.
  • the process requires the user to perform multiple click operations and application switching operations, which is very cumbersome and affects the user experience.
  • embodiments of the present application provide an application authorization method, device, and terminal device.
  • the embodiment of the present application provides an application authorization method, including: when the first application requests the first permission, the terminal device obtains the application identification of the first application in response to the user's first click operation on the first application and the permission name of the first permission, the first click operation is used to instruct the terminal device to jump to the second application, and the second application is used to set the permission of the first application; the terminal device determines the first authorization interface corresponding to the application ID and the permission name The view resource, the first authorization interface includes multiple authorization options of the first permission; the terminal device generates the first authorization interface on an upper layer of the interface of the first application according to the view resource.
  • the terminal device may not perform a complete jump of the interface (full jump can be understood as: the terminal is currently The displayed interface is switched from displaying the interface of the first application to displaying the interface of the second application, and the interface of the first application changes from visible to invisible.
  • the user After the complete jump occurs, after the user completes some operations on the interface of the second application, the user It is necessary to manually switch the currently displayed interface of the second application to the interface of the first application to perform subsequent operations, causing the user to operate back and forth between the interfaces of multiple applications, which is cumbersome and inefficient), but directly according to The application ID of the first application and the requested permission name obtain the view resource of the corresponding first authorization interface, and then directly generate the first authorization interface on the upper layer of the interface of the first application, thereby avoiding the user from performing cumbersome authorization in the second application operation, simplify the authorization process, and improve user experience.
  • the first application includes a first guide interface
  • the first guide interface is generated when the first application's previous request for the first permission is rejected
  • the first guide interface includes a jump option
  • the first click Actions include actions where the user clicks on a jump option.
  • the first application includes a second authorization interface
  • the second authorization interface is generated when the first application's previous request for the first permission is not rejected
  • the second authorization interface includes a jump option and a second authorization interface.
  • Multiple authorization options for one permission the first click operation includes the operation of the user clicking the jump option.
  • the multiple authorization options in the first authorization interface are partly or completely different from the multiple authorization options in the second authorization interface. In this way, if the permission to be granted is not in the second authorization interface, the first authorization interface can be opened by clicking the jump option on the second authorization interface, and the authorization is completed in the first authorization interface.
  • the terminal device generates the first authorization interface on the upper layer of the first application interface according to the view resource, including: the terminal device generates the first authorization interface on the upper layer of the first application interface in the form of a window according to the view resource, and the window
  • the height of the window is smaller than the height of the display screen of the terminal device
  • the width of the window is smaller than the width of the display screen.
  • the second application includes a first authorization switch
  • the terminal device acquires the application identifier of the first application and the permission name of the first permission in response to the user's first click operation, including: the terminal device responds to the user's The first click operation obtains the state of the first authorization switch; when the first authorization switch is on, the terminal device obtains the application ID and permission name; when the first authorization switch is off, the terminal device jumps from the first application to the second application. In this way, the terminal device allows the user to choose whether to jump to the second application to set the permission of the first application.
  • the terminal device includes a permission manager, and the terminal device obtains the view resource of the first authorization interface corresponding to the application identifier and the permission name, including: the permission manager obtains the application identifier and the permission name from the second application; permission management The server determines the view resource based on the application ID and permission name.
  • the terminal device generates the first authorization interface on the upper layer of the interface of the first application according to the view resource, including: the permission manager sends the view resource to the system user interface system_UI process of the terminal device; The upper layer of the interface of the first application draws the first authorization interface.
  • the terminal device generates the first authorization interface on the upper layer of the interface of the first application according to the view resource, including: the rights manager sends the view resource to the second application; the second application sends the view resource to the terminal device's The system user interface system_UI process; the system_UI process draws the first authorization interface on the upper layer of the interface of the first application according to the view resource.
  • the method further includes: when the terminal device detects that the user clicks any authorization option in the first authorization interface, updating the corresponding authorization result to the rights manager, so that the first application requests the second authorization option again.
  • the authorization result is obtained from the permission manager.
  • the first permission includes positioning permission
  • the first application includes at least a map application, a motion track recording application, and a taxi application
  • the second application includes terminal device operating system settings application
  • the size of the first authorization interface is smaller than the size of the interface of the first application.
  • the embodiment of the present application provides an application authorization device, which includes: a setting module, configured to obtain the first permission in response to the user's first click operation on the first application when the first application requests the first permission.
  • the application identifier of an application and the permission name of the first permission, the first click operation is used to instruct the terminal device to jump to the second application, and the second application is used to set the permission of the first application;
  • the setting module is also used to determine the application identifier
  • the view resource of the first authorization interface corresponding to the authority name, the first authorization interface includes multiple authorization options of the first authority;
  • the display module is used to generate the first authorization interface on the upper layer of the interface of the first application according to the view resource.
  • the terminal device may not execute the jump, but directly according to the application identification and request of the first application Obtain the view resources of the corresponding first authorization interface, and then directly generate the first authorization interface on the upper layer of the interface of the first application, thereby avoiding the user from performing cumbersome authorization operations in the second application, simplifying the authorization process, and improving the user experience. Use experience.
  • the first application includes a first guide interface
  • the first guide interface is generated when the first application's previous request for the first permission is rejected
  • the first guide interface includes a jump option
  • the first click Actions include actions where the user clicks on a jump option.
  • the first application includes a second authorization interface
  • the second authorization interface is generated when the first application's previous request for the first permission is not rejected
  • the second authorization interface includes a jump option and a second authorization interface.
  • Multiple authorization options for one permission the first click operation includes the operation of the user clicking the jump option.
  • the multiple authorization options in the first authorization interface are partly or completely different from the multiple authorization options in the second authorization interface. In this way, if the permission to be granted is not in the second authorization interface, the first authorization interface can be opened by clicking the jump option on the second authorization interface, and the authorization is completed in the first authorization interface.
  • the display module is configured to generate the first authorization interface on the upper layer of the first application interface in the form of a window according to the view resource, the height of the window is smaller than the height of the display screen, and the width of the window is smaller than the width of the display screen.
  • the first authorization interface can be displayed in the form of a small window on the upper layer of the interface of the first application, without affecting the user's viewing of the interface information of the first application while authorizing.
  • the second application includes a first authorization switch; the setting module is configured to acquire the state of the first authorization switch in response to the user's first click operation; the setting module is also configured to obtain the status of the first authorization switch when the first authorization switch is When in the on state, obtain the application identification and permission name; the setting module is also used to jump from the first application to the second application when the first authorization switch is in the off state. In this way, the terminal device allows the user to choose whether to jump to the second application to set the permission of the first application.
  • the permission control module is configured to obtain the application identifier and the permission name from the setting module; the permission control module is configured to determine the view resource according to the application identifier and the permission name.
  • the permission control module is further configured to send the view resource to the display module.
  • the permission control module is further configured to send the view resource to the setting module; the setting module is further configured to send the view resource to the display module.
  • the permission control module is further configured to update the corresponding authorization result when it is detected that the user clicks on any authorization option in the first authorization interface, so that when the first application requests the first permission again, from Obtain the authorization result in the authority control module.
  • the first permission includes positioning permission
  • the first application includes at least a map application, a motion track recording application, and a taxi application
  • the second application includes terminal device operating system settings application
  • the size of the first authorization interface is smaller than the size of the interface of the first application.
  • the embodiment of the present application also provides a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the instruction is run on a computer, the computer executes the above-mentioned aspects and the methods of each implementation manner.
  • the embodiment of the present application also provides a computer program product containing instructions, which when run on a computer, causes the computer to execute the above aspects and the methods of each implementation.
  • the embodiment of the present application further provides a chip system, the chip system includes a processor, configured to support the terminal device to implement the functions involved in the above aspect, for example, generate or process the information involved in the above method .
  • FIG. 1 is a scene diagram of granting permission in the runtime permission mode shown in the embodiment of the present application
  • Fig. 2 is a schematic diagram of scene A shown in the embodiment of the present application.
  • Fig. 3 is a schematic diagram of scene B shown in the embodiment of the present application.
  • FIG. 4 is a schematic diagram of a hardware structure of a terminal device provided in an embodiment of the present application.
  • FIG. 5 is a schematic diagram of a terminal device user interface corresponding to scenario A of the application authorization method provided by the embodiment of the present application;
  • FIG. 6 is a flow chart when the application authorization method provided by the embodiment of the present application is applied to scenario A;
  • FIG. 7 is a schematic diagram of a terminal device user interface corresponding to scenario B of the application authorization method provided by the embodiment of the present application;
  • FIG. 8 is a flow chart when the application authorization method provided by the embodiment of the present application is applied to scenario B;
  • FIG. 9 is a schematic diagram of a terminal device user interface corresponding to scenario B of the application authorization method provided by the embodiment of the present application.
  • Fig. 10 is a schematic diagram of a small window authorization switch realized by a global switch provided by the embodiment of the present application.
  • Fig. 11 is a schematic diagram of a small window authorization switch realized by a non-global switch provided in the embodiment of the present application;
  • Fig. 12 is another flow chart of the application authorization method provided by the embodiment of the present application.
  • FIG. 13 is a schematic diagram of a software module of a terminal device shown in an embodiment of the present application.
  • Fig. 14 is a schematic diagram of the implementation of the application authorization method provided by the embodiment of the present application at the software level;
  • Fig. 15 is another schematic diagram of the implementation of the application authorization method provided by the embodiment of the present application at the software level;
  • Fig. 16 is a schematic structural diagram of an application authorization device provided by an embodiment of the present application.
  • Fig. 17 is a schematic structural diagram of another application authorization device provided by the embodiment of the present application.
  • FIG. 18 is a schematic structural diagram of a chip system provided by an embodiment of the present application.
  • the application program needs to obtain corresponding permissions. For example, if an application wants to access and modify calendars, create schedules, etc., it needs to obtain the calendar permission; if the application wants to realize location-based services (Location Based Services, LBS) related functions, it needs to obtain the location service permission; If the application needs to implement the recording function, it needs to obtain the microphone permission.
  • LBS Location Based Services
  • a terminal device provides various types of permissions for an application program, and the permissions are slightly different for terminal devices with different operating systems.
  • the permissions are slightly different for terminal devices with different operating systems.
  • some of the permissions it can provide to the application include:
  • Body Sensors Obtain sensor information related to the user's vital signs.
  • Calendar Use the user's default calendar.
  • Call History View and change the user's call history.
  • Camera Take pictures or record videos with the user's camera.
  • Location information request to obtain the location information of the user equipment.
  • Microphone Record audio.
  • Physical activity Get the user's sports information, such as walking, cycling, steps, etc.
  • SMS View and send text messages.
  • Files and Media Photos, media and other files on the user's terminal device.
  • the application obtains these permissions, it will also obtain the user privacy related to the permissions. For example: if the application obtains the address book permission, the application The user's contact list can be read and uploaded; if the application has obtained the location information permission, it can know the user's location at any time; if the application has obtained the storage space permission, it can read the photos in the user's album.
  • terminal devices generally manage application program permissions through a permission management mechanism, so as to reduce leakage of user privacy and improve device security.
  • a permission management mechanism may include an installation-time permission mode and a runtime permission mode.
  • the permission mode at installation time refers to the mode in which the user grants permissions to the application when installing or updating the application.
  • the terminal device When the user installs the application, the terminal device will display all the permissions requested by the application to the user. After the user agrees to the authorization, the application The program starts to install and obtains all the permissions requested by it.
  • the permission mode exists in the early system version before Android 6.0 during installation, which is not within the scope of the discussion of the embodiment of this application, so no further explanation will be given.
  • the runtime permission mode means that the user does not need to grant permission to the application when the application is installed, but grants permission to the application when the application is running.
  • an app requests a permission for example, at app launch or when a user uses a specific feature is up to the app itself.
  • FIG. 1 is a scene diagram of permission granting in the runtime permission mode shown in the embodiment of the present application.
  • the terminal device can generate an authorization interface 10 as shown in Figure 1 on the display screen, the authorization interface 10 You can prompt the user for the permission content requested by the application and provide the user with multiple options, including but not limited to some or all of the following options: always allow, allow only in use, deny, ask, allow once, deny and not Ask again.
  • the authorization interface 10 is usually implemented in the form of N-state notifications, that is, includes N authorization options, and N is generally 3 or 4.
  • N is generally 3 or 4.
  • the number of authorization options included in the authorization interface 10 may be different.
  • the description of the same authorization option may also be different, for example, “allow only during use” can be called “allow only during use”, “allow Once” could be called “this time only”, and “deny and never ask again” could be called “always deny”.
  • the user can click any one of the authorization options in 21 according to his own wishes to complete the permission setting of the application. For example: when the user clicks "Allow”, the authorization interface 10 is closed, and the application program obtains the location permission, and uses the location function to realize corresponding functions, such as path planning, navigation, etc.; when the user clicks "Deny”, the authorization interface 10 is closed , the application is denied the location permission, at this time the location-based functions of the application will not be implemented.
  • scenario A considering user experience, after the user refuses to grant the application a certain permission, if the application continues to request the permission, the terminal device will not generate the authorization interface 10 again.
  • the application may generate a dialog box to guide the user to jump from the application to the application information page of the terminal device.
  • the application information page is provided by the system settings application of the terminal device. In the application information page to reset the app's permissions before returning to the app.
  • Fig. 2 is a schematic diagram of scenario A shown in the embodiment of the present application.
  • the application can generate a guide as shown in a in Figure 2 when starting Dialog box 30, which may include a go to "Settings" button 31, and explanatory information 32 explaining to the user why location permission is requested and how to grant location permission in the application information page.
  • the application starts the setting application of the terminal device system, and jumps from the current interface of the application to the interface of the setting application, specifically, it can jump to the interface shown in b in Figure 2 App information page displayed.
  • the application information page is a sub-interface for setting the application.
  • the name of the application information page may be different, for example, it may also be called the application details page.
  • each application program installed in the terminal device will have its corresponding application information page in the setting application.
  • its application information page can include its storage space usage, traffic consumption, power consumption and other information, permission related options and other setting options, so that users can view the application permissions on the application information page Status and permissions to set the application.
  • the user can click 34 Rights Management on the application information page to enter the rights management interface of the application as shown in c in Figure 2, and then click 35 "locate" option in the rights management interface to open the authorization interface 40 , and finally click any option 36 among multiple authorization options provided by the authorization interface 40 of the positioning authority to complete the authority setting, and finally manually switch back to the application program interface.
  • Scenario B In other scenarios (hereinafter referred to as Scenario B),
  • the authorization interface 10 of FIG. 1 may not contain options corresponding to the permissions required by the application.
  • the application program may also guide the user to jump from the application program to the application information page of the terminal device, grant the required permissions to the application program in the application information page, and then return to the application program.
  • Fig. 3 is a schematic diagram of scenario B shown in the embodiment of the present application.
  • the map application needs to obtain the user's location information in real time when implementing the navigation function. Obtain the user's location information when the screen or map application is in the system background.
  • the terminal device may not include the "always allow” option in the authorization interface 10 due to considerations such as security.
  • the authorization interface 10 may include an "Allow in "Settings”” button 37, and when the user clicks 38 the "Allow in "Settings” button 37, the application program jumps to the application information page of the terminal device, After the user completes permission setting on the application information page, he manually switches back to the application interface.
  • an embodiment of the present application provides an application authorization method.
  • terminal devices include but are not limited to mobile phones, tablet computers, personal computers, workstation devices, large-screen devices (such as: smart screens, smart TVs, etc.), wearable devices (such as: smart bracelets, smart watches) handheld game consoles, Home game consoles, virtual reality devices, augmented reality devices, mixed reality devices, etc., vehicle-mounted intelligent terminals, etc.
  • FIG. 4 is a schematic diagram of a hardware structure of a terminal device provided by an embodiment of the present application.
  • the terminal device 100 may include a processor 110, a memory 120, a universal serial bus (universal serial bus, USB) interface 130, a radio frequency circuit 140, a mobile communication module 150, a wireless communication module 160, a camera 170, a display screen 180, touch sensor 190, air pressure sensor 210 and buttons 220, etc.
  • the processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (graphics processing unit, GPU), an image signal processing Image signal processor (ISP), video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor (neural-network processing unit, NPU), etc. Wherein, different processing units may be independent devices, or may be integrated in one or more processors, such as integrated in a system chip (system on a chip, SoC).
  • a memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled.
  • the structure shown in the embodiment of the present application does not constitute a specific limitation on the terminal device 100 .
  • the terminal device may include more or fewer components than shown in the figure, or combine certain components, or separate certain components, or arrange different components.
  • the illustrated components can be realized in hardware, software or a combination of software and hardware.
  • the application authorization method provided in the embodiment of this application can be applied in scenario A.
  • the application may request a certain permission from the terminal device during running.
  • the running period of the application program here includes but is not limited to: when the application program is started, during the running period of the application program in the foreground after starting, and during the running period of the application program in the background after starting.
  • the application program can apply for permission from the operating system of the terminal device by calling the requestPermissions() method.
  • the application program requesting permission is called the target application program.
  • the terminal device When the terminal device discovers that the target application has applied for this permission before, but is permanently rejected by the user (for example, the user has selected "permanently reject” or “deny and no longer ask” in the authorization interface 10 shown in Figure 1), the Inform the target application of the rejected result of the target application's permission request.
  • the terminal device can notify the target application of the rejected result of the target application's permission request by calling the shouldShowRequestPermissionRationale() method.
  • the authorization interface 10 as shown in a in FIG. 1 is displayed on .
  • FIG. 5 is a schematic diagram of a terminal device user interface corresponding to scenario A of the application authorization method provided by the embodiment of the present application.
  • FIG. 6 is a flow chart when the application authorization method provided by the embodiment of the present application is applied to scenario A.
  • the target application After the target application learns that its request for a certain permission is rejected, it can generate a guide interface 30 as shown in a in FIG. 5 to guide the user to grant the required permission to the target application in the setting application of the terminal device system.
  • the operation of clicking 33 can be performed on the Go to “Settings” button 31 in the guidance interface 30 .
  • the terminal device detects that the user performs a click 33 operation on the go to "settings” button 31, it will respond to the click operation and jump from the current target application interface to the setting application of the terminal device system, for example, jump to Go to the application information page of the settings application, so that the user can complete the permission grant through multiple operations in the application information page.
  • the terminal device detects that the user performs an operation of clicking 33 on the "Settings” button 31 it will not jump to the setting application of the terminal device system, but execute the The following steps S101-S103:
  • step S101 the terminal device acquires the application identifier of the target application and the name of the permission requested by the target application in response to the user's click operation on the Go to "Settings" button.
  • the application identifier of the target application may be, for example, the package name (Package Name) and the application ID of the target application, or other information used to determine the unique identity of the target application, which is not limited in this embodiment of the present application.
  • the package name of the target application may be: com.xxx.xxx, where xxx.xxx may be information used to indicate the identity of the application developer, application type, and name.
  • the package name of the "Maps" application could be: com.honor.map.
  • the package name can be a string of numbers, and the numbers of different applications are different.
  • the permission name may include, for example, a permission name, such as location information, address book, body sensor, storage space, and the like. If the target application applies for one permission, the permission name may include the name of one permission, and if the target application applies for multiple permissions, the permission name may include the names of multiple permissions.
  • step S102 the terminal device determines the view resource of the first authorization interface corresponding to the application identifier and the authority name.
  • the terminal device After the terminal device detects that the user has clicked the "Settings" button in the guidance interface, it will not jump to the application information page, but will apply the settings of the operating system in the background according to the obtained application identification and permission name.
  • a search is performed to find the view resource of the first authorization interface corresponding to the permission requested by the target application, where the view resource includes text resources, image resources, style resources, etc. required for generating the first authorization interface. It should be added that the entire process of the terminal device performing step S102 will not be displayed on the display screen, and the user will not perceive this process.
  • the terminal device can set the package name com.honor.map in the system
  • the application information page of the "map” application is retrieved in the application, and then the authorization interface of the location permission is further retrieved in the application information page of the "map" application.
  • Step S103 the terminal device generates the first authorization interface on the upper layer of the interface of the target application according to the view resource.
  • the terminal device can draw the first authorization interface according to the text resources, image resources and style resources contained in the view resources, and display the first authorization interface 50 as a window (also called a small window) is displayed on the display screen, and the small window is displayed on the upper layer of the interface 60 of the target application.
  • the height of the window is smaller than the height of the display screen of the terminal device, and the width of the window is smaller than the width of the display screen.
  • the first authorization interface 50 can be understood as displaying the authorization interface 40 shown in d in FIG. 2 directly on the upper layer of the interface 60 of the target application.
  • the content can be the same or different. Specifically: if the terminal device directly generates the first authorization interface 50 with the style and content of the view resource after obtaining the view resource of the first authorization interface 50, then the first authorization interface 50 will be consistent with the style and content of the authorization interface 40 Similarly, if the terminal device optimizes and modifies the style and content of the view resource according to the current theme settings and user settings of the terminal device after obtaining the view resource of the first authorization interface 50, then the first authorization interface 50 will be consistent with the authorization interface. 40 may vary in style and content.
  • the first authorization interface 50 may include a description of the permission requested by the target application, and provide multiple authorization options for the user to choose from.
  • the first authorization interface 50 may include an application name 51 "map", an icon 52 of the "map” application, and a permission name 53 "location location” requested by the "map” application. ", and the description of the purpose of the "location” permission54 (for example: to provide you with surrounding information, accurate traffic conditions and navigation services), etc.
  • the first authorization interface 50 provides the user with four authorization options, which are: deny, ask, allow only in use, and always allow.
  • the user can click 55 any authorization option according to his/her will to complete the authority setting.
  • the terminal device detects that the user has clicked 55 on any option in the first authorization interface 50
  • the first authorization interface 50 is closed, and the authorization result corresponding to the user's click 55 is saved in the authority manager of the system, and re- Start the target application.
  • the terminal device can close the first authorization interface 50, update the positioning permission of the "map” application to "always allow”, and restart the "map” application .
  • the "map” application requests location permission again after restarting, it can request the result of "always allow", so that various functions based on location information can be performed.
  • the terminal device can close the first authorization interface 50, keep the location permission of "map” as “deny”, and restart the "map” application.
  • the "Maps” application requests location permission again after restarting, it can request the result of "denied”, so that it can perform functions related to the failure to obtain the location permission, such as: prompting the user that the location fails, closing the target application, regenerating Guidance interface etc.
  • the terminal device may display the first authorization interface 50 at any position on the display screen, which is not limited in the embodiment of the present application.
  • the first authorization interface 50 can be displayed in the central area of the display screen so as not to block the name of the target application .
  • the first authorization interface 50 can be displayed at the bottom of the display screen. This implementation can be applied to a terminal device that can be held with one hand, such as a smart phone, so that the user can hold the terminal device with one hand. At this time, the first authorization interface 50 can be operated with one hand.
  • the first authorization interface 50 may be displayed on the top of the display screen, so that the user can hold the terminal device with one hand and operate the first authorization interface 50 with the other hand to achieve two-handed operation.
  • the first authorization interface 50 may be displayed on the side of the display screen to avoid the bending area of the display screen.
  • the application authorization method provided in this embodiment of the present application can also be applied to scenario B.
  • FIG. 7 is a schematic diagram of a terminal device user interface corresponding to scenario B of the application authorization method provided by the embodiment of the present application.
  • FIG. 8 is a flow chart when the application authorization method provided by the embodiment of the present application is applied to scenario B.
  • the target application may request a certain permission from the terminal device during operation.
  • the running period of the target application includes but is not limited to: when the target application is started, during the running period of the target application in the foreground after starting, and during the running period of the target application in the background after starting.
  • the target application can apply for permission from the operating system of the terminal device by calling the requestPermissions() method. Take the target application requesting location permission as an example:
  • the second authorization interface 10 shown in Figure 7 can be displayed on the display screen so that the user can perform the authorization operation.
  • the terminal device can provide multiple authorization options for the user to choose, such as: always allow, only allow in use, deny, ask, allow once, always deny, etc.
  • the terminal device will only list some options on the second authorization interface 10 , resulting in some options not being displayed on the second authorization interface 10 .
  • the terminal device may display some prompt information on the second authorization interface 10 to prompt the user to select other authorization options in the setting application of the terminal device system, and provide the user with an option to skip Go to button 37 of the Settings app.
  • the second authorization interface 10 includes three authorization options (ie, three-state notification), which are respectively "permit only during use", “only this time” and "deny”.
  • the second authorization interface 10 also includes the following prompt information: "This app may want to get your location at any time (even if you're not using the app)” and also includes a jump button 37: "Allow in Settings”.
  • the operation of clicking 38 can be performed on the "Allow in "Settings” button 37 in the second authorization interface 10 .
  • the terminal device detects that the user performs a click 38 operation on the "Allow in "Settings” button 37, it will respond to the click operation and jump from the current target application interface to the setting application of the terminal device system , such as jumping to the application information page of the settings application, so that the user can complete permission granting through multiple operations on the application information page.
  • step S201 the terminal device obtains the application identifier of the target application and the name of the permission requested by the target application in response to the user's click operation on the "Allow in "Settings”" button.
  • the application identifier of the target application may be, for example, the package name (Package Name) and the application ID of the target application, or other information used to determine the unique identity of the target application, which is not limited in this embodiment of the present application.
  • the permission name may include, for example, a permission name, such as location information, address book, body sensor, storage space, and the like.
  • step S101 in the embodiment of the present application for other contents of step S201 that are not specifically expanded, and will not be repeated here.
  • step S202 the terminal device determines the view resource of the first authorization interface corresponding to the application identifier and the authority name.
  • Step S202 is similar to step S102.
  • the terminal device detects that the user has clicked the "Allow in "Settings” button in the notification interface, it will not jump to the interface of the setting application, but in the background according to the Search the setting application of the operating system with the obtained application identifier and permission name to find the view resource of the first authorization interface corresponding to the permission requested by the target application, and the view resource includes text resources required for generating the first authorization interface , image resources, style resources, etc.
  • the whole process of executing step S202 by the terminal device will not be displayed on the display screen, and the user will not perceive this process.
  • step S102 Please refer to step S102 in the embodiment of the present application for other contents of step S202 that are not specifically developed, and will not be repeated here.
  • Step S203 the terminal device generates the first authorization interface on the upper layer of the interface of the target application according to the view resource.
  • the first authorization interface is drawn according to the text resources, image resources and style resources contained in the view resources, and the first authorization interface 50 is represented by a window (also called The form of a small window) is displayed on the display screen, and the small window is displayed on the upper layer of the interface 60 of the target application.
  • the height of the window is smaller than the height of the display screen of the terminal device, and the width of the window is smaller than the width of the display screen.
  • the first authorization interface 50 may include a description of the permission requested by the target application, and provide multiple authorization options for the user to request permission for the user to choose.
  • the first authorization interface 50 may include an application name 51 "map", an icon 52 of the "map” application, and a permission name 53 "location location” requested by the "map” application. ", and the description of the purpose of the "location” permission54 (for example: to provide you with surrounding information, accurate traffic conditions and navigation services), etc.
  • the first authorization interface 50 provides the user with four authorization options, which are: deny, ask, allow only in use, and always allow.
  • the first authorization interface 50 may display more options.
  • the first authorization interface 50 can be here Add one or more options on the basis, such as adding the "always allow” option, and you can also add the "deny once” option, etc.
  • the first authorization interface 50 includes the same number of options as the second authorization interface 10, but the first authorization interface 50 may include different options from the second authorization interface 10, where the difference refers to the first The options in the authorization interface 50 are partially or completely different from those in the second authorization interface 10 .
  • the first authorization interface 50 may also include: “ Allow only during use”, “Always allow” and “Deny”. In this way, compared with the second authorization interface 10, the user can additionally select the "always allow” option on the first authorization interface 50, so that the target application obtains sufficient permissions for functions such as background navigation and recording of the user's movement track.
  • the user can click 55 on any option to complete the authority setting according to his own wishes.
  • the terminal device detects that the user has clicked 55 on any option in the first authorization interface 50, the first authorization interface 50 is closed, and the authorization result corresponding to the user's click 55 is saved in the authority manager of the system, and re- Start the target application.
  • step S203 Please refer to step S203 in the embodiment of the present application for other content in step S203 that is not specifically developed, and will not be repeated here.
  • the terminal device can provide a widget authorization switch in its system setting application, and the widget authorization switch is used to indicate whether to allow the generation of the first Authorization interface.
  • step S201-step S203 when the small window authorization switch is turned on, if the terminal device detects that the user has clicked the Allow button in "Settings" on the second authorization interface, it will not jump to the application information page, but Execute step S201-step S203; when the small window authorization switch is in the closed state, if the terminal device detects that the user has clicked the allow button in "Settings" in the second authorization interface, step S201-step S203 will not be executed, and It is to jump to the application information page, and the user finds the permission setting entry of the target application on the application information page, completes the corresponding authorization operation, and then manually switches back to the target application interface.
  • the widget authorization switch may be a global switch.
  • Fig. 10 is a schematic diagram of a small window authorization switch implemented by a global switch provided by the embodiment of the present application.
  • the widget authorization switch 71 may be located in the main interface of the setting application or in a certain secondary interface, for example, in the authority management interface 72 .
  • the user can turn on or off the small window authorization switch 71 by clicking 73.
  • the terminal device allows all target applications to generate the first authorization interface in the form of a small window.
  • the small window authorization switch When the small window authorization switch When 71 is closed, the terminal device does not allow all target applications to generate the first authorization interface in the form of a small window.
  • the widget authorization switch may be a non-global switch.
  • FIG. 11 is a schematic diagram of a small window authorization switch implemented by a non-global switch provided in the embodiment of the present application.
  • the small window authorization switch 71 can be located in the application information page 74, and the application information page 74 of each target application can include a small window authorization switch 71, and each small window authorization switch 71 only corresponds to it
  • One of the target apps works.
  • the user can turn on or off the small window authorization switch 71 of a certain target application by clicking.
  • the terminal device allows the target application to generate the first authorization interface in the form of a small window.
  • the window authorization switch is turned off, the terminal device is not allowed to generate the first authorization interface in the form of a small window.
  • the application authorization method in the embodiment of the present application may further include a process of judging whether widget authorization is allowed.
  • Fig. 12 is another flow chart of the application authorization method provided by the embodiment of the present application. As shown in Figure 12, taking the target application startup scenario as an example, the application authorization method including the process of judging whether to allow widget authorization may include the following steps:
  • step S301 the terminal device determines whether to jump to the application information page when the target application is started.
  • the terminal device when the terminal device requests for a certain permission and is rejected, it may generate a guidance interface as shown in FIG. 5 . If the terminal device allows direct jumping to the application information page from the target application, and it is detected that the user clicks the "Settings" button in the guidance interface, then it is determined that a jump to the application information page is required, and the terminal device executes step S302; if the terminal If the device does not allow direct jumping from the target application to the application information page, or detects that the user clicks the "Cancel" button on the guidance interface, the method flow ends.
  • Step S302 the terminal device judges whether the target application allows widget authorization.
  • the terminal device may determine whether to allow widget authorization for the target application according to the status of the global widget authorization switch or the non-global widget authorization switch of the target application. If the small window authorization switch is turned on, it means that the small window authorization is allowed. At this time, the terminal device executes steps S303-S304. If the small window authorization switch is turned off, it means that the small window authorization is not allowed, and at this time, the terminal device executes step S305.
  • Step S303 the terminal device acquires a first authorization interface corresponding to the permission requested by the target application.
  • the terminal device can obtain the application ID of the target application and the requested permission name, and then search the application information page of the target application according to the obtained application ID and permission name to find the first application ID corresponding to the permission name.
  • Authorization interface The whole process of executing step S303 by the terminal device will not be displayed on the display screen, and the user will not perceive this process. Please refer to step S101-step S102 in the embodiment of the present application for other contents of step S303 that are not specifically expanded, and will not be repeated here.
  • Step S304 the terminal device displays the first authorization interface in the form of a small window on the display screen.
  • Step S304 can be specifically implemented with reference to step S103 in the embodiment of the present application, and details are not repeated here.
  • the terminal device responds to the user's click operation, refreshes the interface to close the small window, and at the same time updates the authorization result corresponding to the user click operation in the system permission configuration, and Restart the target application.
  • Step S305 the terminal device jumps to the application information page.
  • the terminal device may include software modules corresponding to each function.
  • Fig. 13 is a schematic diagram of software modules of a terminal device shown in an embodiment of the present application.
  • the software modules involved in performing the application authorization method of the embodiment of the present application may at least include the setting application of the operating system, the permission controller, the system user interface main process system_UI and the requesting permission target application.
  • the setting application, the permission controller, system_UI and the target application are all located in the application layer of the Android system. It is a non-system-level application with low permissions.
  • the Android system also includes an application framework layer, a system runtime layer, a hardware abstraction layer, and a Linux kernel layer.
  • the above-mentioned hierarchical structure belongs to the conventional structure of the Android system, which is not limited in the embodiments of the present application.
  • Fig. 14 is a schematic diagram of the implementation of the application authorization method provided by the embodiment of the present application at the software level.
  • the application authorization method provided by the embodiment of the present application includes at least the following steps at the software level:
  • Step S401 when the setting application is started from the target application, obtain the application identification of the target application and the requested permission name.
  • launching the setting application from the target application may include the following two scenarios: In scenario A, when the user clicks the Go to "Settings" button in the guidance interface, The setting application will be launched from the target application; in scenario B, when the user clicks the "Allow in "Settings” button in the second authorization interface, the setting application will be launched from the target application.
  • the terminal device will continue to stay on the user interface of the target application, and will not jump from the user interface of the target application to the user interface of the setting application. Therefore, the setting application performs step S402 and step S403 in the background.
  • Step S402 the setting application sends the application identifier of the target application and the requested permission name to the permission controller.
  • Step S403 the permission controller obtains the view resource of the first authorization interface according to the application identifier of the target application and the requested permission name, and sends the view resource to system_UI.
  • Step S404 the system_UI draws the authorization interface in the form of a small window on the upper layer of the target application according to the view resource, so that the authorization interface is popped up and displayed in the form of a small window on the display screen.
  • Step S405 when the setting application detects that the user has clicked any option in the authorization interface, it updates the corresponding authorization result to the authority controller.
  • the terminal device application when the terminal device application requests the permission again after restarting, it can obtain the updated authorization result from the permission controller, so as to execute the corresponding function based on the permission according to the updated authorization result.
  • Step S406 system_UI refreshes the user interface to close the small window.
  • Fig. 15 is another schematic diagram of the implementation of the application authorization method provided by the embodiment of the present application at the software level.
  • the application authorization method provided by the embodiment of the present application includes at least the following steps at the software level:
  • Step S501 when the setting application is started from the target application, the application identifier and the requested permission name of the target application are acquired.
  • Step S501 is the same as step S401 and will not be repeated here.
  • Step S502 sending the application identifier of the target application and the requested permission name to the permission controller.
  • Step S503 the authority controller obtains the view resource of the first authorization interface according to the application identifier of the target application and the requested authority name, and sends the view resource to the setting application.
  • Step S504 the setting application sends the authorization interface to system_UI.
  • the permission controller after obtaining the view resource of the first authorization interface, the permission controller directly sends the view resource to system_UI, while in the implementation shown in FIG. 15 , After obtaining the view resource of the first authorization interface, the authority controller sends the view resource to the setting application, and the setting application sends the view resource to the system_UI. It can be seen that how to send view resources to system_UI can be implemented in different ways, which is not limited in this embodiment of the present application.
  • Step S505 the system_UI draws the authorization interface in the form of a small window on the upper layer of the target application, so that the authorization interface is popped up in the display screen in the form of a small window.
  • Step S506 when the setting application detects that the user has clicked any option in the authorization interface, it updates the corresponding authorization result into the permission configuration of the target application.
  • the terminal device application when the terminal device application requests the permission again after restarting, it can obtain the updated authorization result from the permission controller, so as to execute the corresponding function based on the permission according to the updated authorization result.
  • Step S507 system_UI refreshes the user interface to close the small window.
  • the terminal device includes hardware structures and/or software modules corresponding to each function.
  • the present application can be implemented in the form of hardware or a combination of hardware and computer software in combination with the units and algorithm steps of each example described in the embodiments disclosed herein. Whether a certain function is executed by hardware or computer software drives hardware depends on the specific application and design constraints of the technical solution. Skilled artisans may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the present application.
  • Fig. 16 is a schematic structural diagram of an application authorization device provided by an embodiment of the present application.
  • the terminal device may implement corresponding functions through the hardware device shown in FIG. 16 .
  • the application authorization device may include: a touch screen 601 , a memory 602 and a processor 603 .
  • the touch screen 601 may include a display screen and a touch sensor, wherein the display screen is used to display images, and the touch sensor may transmit the detected touch operation to the application processor to determine the type of the touch event.
  • the screen provides visual output related to touch operations.
  • the processor 603 may include one or more processing units, for example: the processor 603 may include an application processor, a modem processor, a graphics processor, an image signal processor, a controller, a video codec, a digital signal processor , baseband processor, and/or neural network processor, etc. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
  • the memory 602 is coupled with the processor 603 for storing various software programs and/or multiple sets of instructions, and the memory 602 may include volatile memory and/or non-volatile memory.
  • the terminal device is made to implement the following method steps: when the first application requests the first permission, responding to the user's first click operation on the first application , to obtain the application ID of the first application and the permission name of the first permission, the first click operation is used to indicate to jump to the second application, and the second application is used to set the permission of the first application; determine the corresponding application ID and permission name
  • the view resource of the first authorization interface, the first authorization interface includes multiple authorization options of the first authority; the first authorization interface is generated on the upper layer of the interface of the first application according to the view resource.
  • the terminal device may not execute the jump, but directly according to the application identification and request of the first application Obtain the view resources of the corresponding first authorization interface, and then directly generate the first authorization interface on the upper layer of the interface of the first application, thereby avoiding the user from performing cumbersome authorization operations in the second application, simplifying the authorization process, and improving the user experience. Use experience.
  • the first application includes a first guide interface
  • the first guide interface is generated when the first application's previous request for the first permission is rejected
  • the first guide interface includes a jump option
  • the first click Actions include actions where the user clicks on a jump option.
  • the first application includes a second authorization interface
  • the second authorization interface is generated when the first application's previous request for the first permission is not rejected
  • the second authorization interface includes a jump option and a second authorization interface.
  • Multiple authorization options for one permission the first click operation includes the operation of the user clicking the jump option.
  • the multiple authorization options in the first authorization interface are partly or completely different from the multiple authorization options in the second authorization interface. In this way, if the permission to be granted is not in the second authorization interface, the first authorization interface can be opened by clicking the jump option on the second authorization interface, and the authorization is completed in the first authorization interface.
  • the terminal device when the software program and/or multiple sets of instructions are executed by the processor 603, the terminal device is made to specifically implement the following method steps: generate the first authorization on the upper layer of the interface of the first application in the form of a window according to the view resource In the interface, the height of the window is smaller than the height of the display screen, and the width of the window is smaller than the width of the display screen.
  • the first authorization interface can be displayed in the form of a small window on the upper layer of the interface of the first application, without affecting the user's viewing of the interface information of the first application while authorizing.
  • the second application includes a first authorization switch.
  • the following method steps are specifically implemented: in response to the user's first click operation, obtain the second A state of the authorization switch; when the first authorization switch is on, obtain the application ID and permission name; when the first authorization switch is off, jump from the first application to the second application.
  • the terminal device allows the user to choose whether to jump to the second application to set the permission of the first application.
  • the software program and/or multiple sets of instructions include a rights manager, and when the software program and/or multiple sets of instructions are executed by the processor 603, the terminal device specifically implements the following method steps: the rights manager starts from the first The second application obtains the application ID and permission name; the permission manager determines the view resource according to the application ID and permission name.
  • the software program and/or multiple sets of instructions include a rights manager and a system user interface system_UI process.
  • the terminal device specifically implements the following method steps :
  • the permission manager sends the view resource to the system_UI process;
  • the system_UI process draws the first authorization interface on the upper layer of the interface of the first application according to the view resource.
  • the software program and/or multiple sets of instructions include a rights manager and a system_UI process.
  • the terminal device specifically implements the following method steps: rights management
  • the controller sends the view resource to the second application; the second application sends the view resource to the system user interface system_UI process of the terminal device; the system_UI process draws the first authorization interface on the upper layer of the interface of the first application according to the view resource.
  • the terminal device when the software program and/or multiple sets of instructions are executed by the processor 603, the terminal device is further made to implement the following method steps: when detecting that the user clicks on any authorization option in the first authorization interface, the corresponding The authorization result of is updated to the permission manager, so that when the first application requests the first permission again, the authorization result is obtained from the permission manager.
  • the first permission includes positioning permission; the first application includes at least a map application, a motion track recording application, and a taxi application; the second application includes a terminal device operating system setting application; the first authorization interface The size is smaller than the size of the interface of the first application.
  • FIG. 17 is a schematic structural diagram of another application authorization device provided by an embodiment of the present application.
  • the terminal device can implement corresponding functions through the software device shown in FIG. 17 .
  • the application authorization device may include: a setting module 701 , a display module 702 and a permission control module 703 . in:
  • the setting module 701 is configured to obtain the application identifier of the first application and the permission name of the first permission in response to the first click operation of the user on the first application when the first application requests the first permission, and the first click operation is used to Instruct the terminal device to jump to the second application, the second application is used to set the authority of the first application; the setting module 701 is also used to determine the view resource of the first authorization interface corresponding to the application identification and the authority name, the first authorization interface includes A plurality of authorization options for the first permission; a display module 702 configured to generate a first authorization interface on the upper layer of the interface of the first application according to the view resource.
  • the terminal device may not execute the jump, but directly according to the application identification and request of the first application Obtain the view resources of the corresponding first authorization interface, and then directly generate the first authorization interface on the upper layer of the interface of the first application, thereby avoiding the user from performing cumbersome authorization operations in the second application, simplifying the authorization process, and improving the user experience. Use experience.
  • the first application includes a first guide interface
  • the first guide interface is generated when the first application's previous request for the first permission is rejected
  • the first guide interface includes a jump option
  • the first click Actions include actions where the user clicks on a jump option.
  • the first application includes a second authorization interface
  • the second authorization interface is generated when the first application's previous request for the first permission is not rejected
  • the second authorization interface includes a jump option and a second authorization interface.
  • Multiple authorization options for one permission the first click operation includes the operation of the user clicking the jump option.
  • the multiple authorization options in the first authorization interface are partly or completely different from the multiple authorization options in the second authorization interface. In this way, if the permission to be granted is not in the second authorization interface, the first authorization interface can be opened by clicking the jump option on the second authorization interface, and the authorization is completed in the first authorization interface.
  • the display module 702 is configured to generate the first authorization interface on the upper layer of the first application interface in the form of a window according to the view resource, the height of the window is smaller than the height of the display screen, and the width of the window is smaller than the width of the display screen .
  • the first authorization interface can be displayed in the form of a small window on the upper layer of the interface of the first application, without affecting the user's viewing of the interface information of the first application while authorizing.
  • the second application includes a first authorization switch; the setting module 701 is configured to acquire the state of the first authorization switch in response to the user's first click operation; the setting module 701 is also configured to When the switch is in the on state, obtain the application identification and permission name; the setting module 701 is also used to jump from the first application to the second application when the first authorization switch is in the off state. In this way, the terminal device allows the user to choose whether to jump to the second application to set the permission of the first application.
  • the permission control module 703 is configured to obtain the application identifier and the permission name from the setting module 701; the permission control module 703 is configured to determine the view resource according to the application identifier and the permission name.
  • the permission control module 703 is further configured to send the view resource to the display module 702 .
  • the permission control module 703 is further configured to send the view resource to the setting module 701 ; the setting module 701 is further configured to send the view resource to the display module 702 .
  • the permission control module 703 is further configured to update the corresponding authorization result when it is detected that the user clicks any authorization option in the first authorization interface, so that when the first application requests the first permission again, Obtain the authorization result from the authority control module 703 .
  • the first permission includes positioning permission; the first application includes at least a map application, a motion track recording application, and a taxi application; the second application includes a terminal device operating system setting application; the first authorization interface The size is smaller than the size of the interface of the first application.
  • the embodiment of the present application also provides a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium is run on a computer, it causes the computer to execute the above-mentioned methods.
  • the embodiment of the present application also provides a computer program product containing instructions, which, when run on a computer, causes the computer to execute the methods in the above aspects.
  • FIG. 18 is a schematic structural diagram of the chip system.
  • the system-on-a-chip includes a processor 801 configured to support the above-mentioned device to implement the functions involved in the above-mentioned aspect, for example, generate or process the information involved in the above-mentioned method.
  • the chip system further includes a memory 802 for storing necessary computer instructions 803 and data of the private information generating device.
  • the system-on-a-chip may consist of chips, or may include chips and other discrete devices.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Telephone Function (AREA)
  • Stored Programmes (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

Embodiments of the present application provide an application authorization method and apparatus, and a terminal device. When a first application requests a first permission, the terminal device obtains an application identifier of the first application and the permission name of the first permission in response to a user's first click operation in the first application, the first click operation being used for instructing the terminal device to jump to a second application, and the second application being used for setting permissions of the first application; the terminal device determines a view resource of a first authorization interface corresponding to the application identifier and the permission name, the first authorization interface comprising multiple authorization options of the first permission; and the terminal device generates the first authorization interface over an interface of the first application according to the view resource. In this way, when permissions are to be set for the first application in the second application, the interface of the terminal device does not need to completely jump to the second application, but the first authorization interface is directly generated over the interface of the first application, such that the user can complete an authorization operation in the first authorization interface, thus simplifying the authorization interaction process.

Description

一种应用授权方法、装置和终端设备An application authorization method, device and terminal equipment
本申请要求于2021年6月30日提交到国家知识产权局、申请号为202110739596.7、发明名称为“一种应用授权方法、装置和终端设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202110739596.7 and the title of the invention "A method, device and terminal device for application authorization" submitted to the State Intellectual Property Office on June 30, 2021, the entire contents of which are incorporated by reference incorporated in this application.
技术领域technical field
本申请涉及终端技术领域,尤其涉及一种应用授权方法、装置和终端设备。The present application relates to the technical field of terminals, in particular to an application authorization method, device and terminal equipment.
背景技术Background technique
在终端设备中,应用程序为了实现一些功能,需要获取相应的权限。例如,如果应用程序要实现访问和修改日历、创建日程等功能,则需要获取日历权限;如果应用程序要实现基于位置的服务(Location Based Services,LBS)的相关功能,则需要获取位置服务权限;如果应用程序要实现录音功能,则需要获取麦克风权限。In the terminal device, in order to realize some functions, the application program needs to obtain corresponding permissions. For example, if an application wants to access and modify calendars, create schedules, etc., it needs to obtain the calendar permission; if the application wants to realize location-based services (Location Based Services, LBS) related functions, it needs to obtain the location service permission; If the application needs to implement the recording function, it needs to obtain the microphone permission.
目前,终端设备一般通过权限管理机制来管理应用程序的权限,以运行Android系统的终端设备为例,其权限管理机制可以包括安装时权限模式和运行时权限模式。其中,运行时权限模式是指用户在应用程序安装时不需要向应用程序授予权限,而是在应用程序运行时向应用程序授予权限。以运行时权限模式为例,如果某个应用程序在运行期间向终端设备请求某一个权限,终端设备可以在显示屏上授权界面,授权界面可以向用户提示应用程序请求的权限内容并且提供给用户多个选项,包括但不限于以下选项中的部分或者全部:始终允许、仅在使用中允许、拒绝、询问、允许一次、拒绝且不再询问。如果用户点击了“拒绝且不再询问”选项,那么当终端设备再次请求该权限时,授权界面不会再次弹出,此时终端设备会引导用户到系统的设置应用中进行权限设置,然而这一过程需要用户执行多次的点击操作和应用程序切换操作,十分繁琐,影响了用户使用体验。At present, terminal devices generally manage application permissions through a permission management mechanism. Taking a terminal device running an Android system as an example, the permission management mechanism may include an installation-time permission mode and a runtime permission mode. Wherein, the runtime permission mode means that the user does not need to grant permission to the application program when the application program is installed, but grants permission to the application program when the application program is running. Taking the runtime permission mode as an example, if an application requests a certain permission from the terminal device during operation, the terminal device can authorize the interface on the display screen, and the authorization interface can prompt the user for the permission content requested by the application and provide it to the user. Multiple options, including but not limited to some or all of the following options: Allow always, Allow only while in use, Deny, Ask, Allow once, Deny and never ask again. If the user clicks the option "Deny and don't ask again", then when the terminal device requests the permission again, the authorization interface will not pop up again, and the terminal device will guide the user to set the permission in the system's setting application. The process requires the user to perform multiple click operations and application switching operations, which is very cumbersome and affects the user experience.
发明内容Contents of the invention
为了提升用户对应用程序进行权限设置时的用户体验,本申请实施例提供了一种应用授权方法、装置和终端设备。In order to improve user experience when a user sets permissions for an application program, embodiments of the present application provide an application authorization method, device, and terminal device.
第一方面,本申请实施例提供了一种应用授权方法,包括:终端设备在第一应用请求第一权限时,响应于用户在第一应用的第一点击操作,获取第一应用的应用标识和第一权限的权限名称,第一点击操作用于指示终端设备跳转至第二应用,第二应用用于设置第一应用的权限;终端设备确定应用标识和权限名称对应的第一授权界面的视图资源,第一授权界面包括第一权限的多个授权选项;终端设备根据视图资源在第一应用的界面上层生成第一授权界面。In the first aspect, the embodiment of the present application provides an application authorization method, including: when the first application requests the first permission, the terminal device obtains the application identification of the first application in response to the user's first click operation on the first application and the permission name of the first permission, the first click operation is used to instruct the terminal device to jump to the second application, and the second application is used to set the permission of the first application; the terminal device determines the first authorization interface corresponding to the application ID and the permission name The view resource, the first authorization interface includes multiple authorization options of the first permission; the terminal device generates the first authorization interface on an upper layer of the interface of the first application according to the view resource.
这样,当需要从第一应用跳转至第二应用,以在第二应用中对第一应用进行权限设置时,终端设备可以不执行界面的完全跳转(完全跳转可以理解为:终端当前显示的界面从显示第一应用的界面切换为显示第二应用的界面,第一应用的界面从可见变得不可见。完全跳转发生后,用户在第二应用的界面完成一些操作后,用户需要再手动将当前显示的第二应用的界面切换到第一应用的界面去执行后续操作,导致用户需要在多个应用的界面间来回操作,操 作繁琐,效率也不高),而是直接根据第一应用的应用标识和请求的权限名称获取相应的第一授权界面的视图资源,然后直接在第一应用的界面上层生成第一授权界面,从而避免了用户在第二应用中执行繁琐的授权操作,简化授权流程,提升用户使用体验。In this way, when it is necessary to jump from the first application to the second application to set the authority of the first application in the second application, the terminal device may not perform a complete jump of the interface (full jump can be understood as: the terminal is currently The displayed interface is switched from displaying the interface of the first application to displaying the interface of the second application, and the interface of the first application changes from visible to invisible. After the complete jump occurs, after the user completes some operations on the interface of the second application, the user It is necessary to manually switch the currently displayed interface of the second application to the interface of the first application to perform subsequent operations, causing the user to operate back and forth between the interfaces of multiple applications, which is cumbersome and inefficient), but directly according to The application ID of the first application and the requested permission name obtain the view resource of the corresponding first authorization interface, and then directly generate the first authorization interface on the upper layer of the interface of the first application, thereby avoiding the user from performing cumbersome authorization in the second application operation, simplify the authorization process, and improve user experience.
在一种实现方式中,第一应用包括第一引导界面,第一引导界面在第一应用在先请求第一权限被拒绝的情况下生成的,第一引导界面包括跳转选项,第一点击操作包括用户点击跳转选项的操作。这样,在第一应用在线请求第一权限被拒绝的情况下,用户不需要在第二应用中执行繁琐的授权操作,简化授权流程,提升用户使用体验。In one implementation, the first application includes a first guide interface, the first guide interface is generated when the first application's previous request for the first permission is rejected, the first guide interface includes a jump option, and the first click Actions include actions where the user clicks on a jump option. In this way, when the online request of the first application for the first permission is rejected, the user does not need to perform cumbersome authorization operations in the second application, which simplifies the authorization process and improves user experience.
在一种实现方式中,第一应用包括第二授权界面,第二授权界面是在第一应用在先请求第一权限未被拒绝的情况下生成的,第二授权界面包括跳转选项和第一权限的多个授权选项,第一点击操作包括用户点击跳转选项的操作。这样,在第一应用在线请求第一权限未被拒绝的情况下,用户不需要在第二应用中执行繁琐的授权操作,简化授权流程,提升用户使用体验。In one implementation, the first application includes a second authorization interface, the second authorization interface is generated when the first application's previous request for the first permission is not rejected, and the second authorization interface includes a jump option and a second authorization interface. Multiple authorization options for one permission, the first click operation includes the operation of the user clicking the jump option. In this way, when the online request of the first application for the first permission is not rejected, the user does not need to perform cumbersome authorization operations in the second application, which simplifies the authorization process and improves user experience.
在一种实现方式中,第一授权界面中的多个授权选项与第二授权界面中的多个授权选项部分不同或者全部不同。这样,如果想要授予的权限不在第二授权界面中,则可以通过点击第二授权界面的跳转选项的方式打开第一授权界面,在第一授权界面中完成授权。In an implementation manner, the multiple authorization options in the first authorization interface are partly or completely different from the multiple authorization options in the second authorization interface. In this way, if the permission to be granted is not in the second authorization interface, the first authorization interface can be opened by clicking the jump option on the second authorization interface, and the authorization is completed in the first authorization interface.
在一种实现方式中,终端设备根据视图资源在第一应用的界面上层生成第一授权界面,包括:终端设备根据视图资源以窗口的形式在第一应用的界面上层生成第一授权界面,窗口的高度小于终端设备的显示屏的高度,窗口的宽度小于显示屏的宽度。这样,第一授权界面可以在第一应用的界面上层以小窗的形式展示,不影响用户在授权的同时查看第一应用的界面信息。In an implementation manner, the terminal device generates the first authorization interface on the upper layer of the first application interface according to the view resource, including: the terminal device generates the first authorization interface on the upper layer of the first application interface in the form of a window according to the view resource, and the window The height of the window is smaller than the height of the display screen of the terminal device, and the width of the window is smaller than the width of the display screen. In this way, the first authorization interface can be displayed in the form of a small window on the upper layer of the interface of the first application, without affecting the user's viewing of the interface information of the first application while authorizing.
在一种实现方式中,第二应用包括第一授权开关,终端设备响应于用户的第一点击操作,获取第一应用的应用标识和第一权限的权限名称,包括:终端设备响应于用户的第一点击操作,获取第一授权开关的状态;当第一授权开关为开启状态时,终端设备获取应用标识和权限名称;当第一授权开关为关闭状态时,终端设备从第一应用跳转至第二应用。这样,终端设备允许用户选择是否跳转至第二应用对第一应用进行权限设置。In one implementation, the second application includes a first authorization switch, and the terminal device acquires the application identifier of the first application and the permission name of the first permission in response to the user's first click operation, including: the terminal device responds to the user's The first click operation obtains the state of the first authorization switch; when the first authorization switch is on, the terminal device obtains the application ID and permission name; when the first authorization switch is off, the terminal device jumps from the first application to the second application. In this way, the terminal device allows the user to choose whether to jump to the second application to set the permission of the first application.
在一种实现方式中,终端设备包括权限管理器,终端设备获取应用标识和权限名称对应的第一授权界面的视图资源,包括:权限管理器从第二应用获取应用标识和权限名称;权限管理器根据应用标识和权限名称确定视图资源。In one implementation, the terminal device includes a permission manager, and the terminal device obtains the view resource of the first authorization interface corresponding to the application identifier and the permission name, including: the permission manager obtains the application identifier and the permission name from the second application; permission management The server determines the view resource based on the application ID and permission name.
在一种实现方式中,终端设备根据视图资源在第一应用的界面上层生成第一授权界面,包括:权限管理器将视图资源发送给终端设备的系统用户界面system_UI进程;system_UI进程根据视图资源在第一应用的界面上层绘制第一授权界面。In one implementation, the terminal device generates the first authorization interface on the upper layer of the interface of the first application according to the view resource, including: the permission manager sends the view resource to the system user interface system_UI process of the terminal device; The upper layer of the interface of the first application draws the first authorization interface.
在一种实现方式中,终端设备根据视图资源在第一应用的界面上层生成第一授权界面,包括:权限管理器将视图资源发送给第二应用;第二应用将视图资源发送给终端设备的系统用户界面system_UI进程;system_UI进程根据视图资源在第一应用的界面上层绘制第一授权界面。In an implementation manner, the terminal device generates the first authorization interface on the upper layer of the interface of the first application according to the view resource, including: the rights manager sends the view resource to the second application; the second application sends the view resource to the terminal device's The system user interface system_UI process; the system_UI process draws the first authorization interface on the upper layer of the interface of the first application according to the view resource.
在一种实现方式中,该方法还包括:终端设备检测到用户点击第一授权界面中的任一授权选项时,将相应的授权结果更新到权限管理器中,以使得第一应用再次请求第一权限时,从权限管理器中获取授权结果。In an implementation manner, the method further includes: when the terminal device detects that the user clicks any authorization option in the first authorization interface, updating the corresponding authorization result to the rights manager, so that the first application requests the second authorization option again. When a permission is granted, the authorization result is obtained from the permission manager.
在一种实现方式中,还包括以下至少一项:第一权限包括定位权限;第一应用至少包括地图类应用、运动轨迹记录类应用、打车类应用;第二应用包括终端设备操作系统的设置应 用;所述第一授权界面的大小小于所述第一应用的界面的大小。In one implementation, it also includes at least one of the following: the first permission includes positioning permission; the first application includes at least a map application, a motion track recording application, and a taxi application; the second application includes terminal device operating system settings application; the size of the first authorization interface is smaller than the size of the interface of the first application.
第二方面,本申请实施例提供了一种应用授权装置,该装置包括:设置模块,用于在第一应用请求第一权限时,响应于用户在第一应用的第一点击操作,获取第一应用的应用标识和第一权限的权限名称,第一点击操作用于指示终端设备跳转至第二应用,第二应用用于设置第一应用的权限;设置模块,还用于确定应用标识和权限名称对应的第一授权界面的视图资源,第一授权界面包括第一权限的多个授权选项;显示模块,用于根据视图资源在第一应用的界面上层生成第一授权界面。In the second aspect, the embodiment of the present application provides an application authorization device, which includes: a setting module, configured to obtain the first permission in response to the user's first click operation on the first application when the first application requests the first permission. The application identifier of an application and the permission name of the first permission, the first click operation is used to instruct the terminal device to jump to the second application, and the second application is used to set the permission of the first application; the setting module is also used to determine the application identifier The view resource of the first authorization interface corresponding to the authority name, the first authorization interface includes multiple authorization options of the first authority; the display module is used to generate the first authorization interface on the upper layer of the interface of the first application according to the view resource.
这样,当需要从第一应用跳转至第二应用,以在第二应用中对第一应用进行权限设置时,终端设备可以不执行跳转,而是直接根据第一应用的应用标识和请求的权限名称获取相应的第一授权界面的视图资源,然后直接在第一应用的界面上层生成第一授权界面,从而避免了用户在第二应用中执行繁琐的授权操作,简化授权流程,提升用户使用体验。In this way, when it is necessary to jump from the first application to the second application to set the permission of the first application in the second application, the terminal device may not execute the jump, but directly according to the application identification and request of the first application Obtain the view resources of the corresponding first authorization interface, and then directly generate the first authorization interface on the upper layer of the interface of the first application, thereby avoiding the user from performing cumbersome authorization operations in the second application, simplifying the authorization process, and improving the user experience. Use experience.
在一种实现方式中,第一应用包括第一引导界面,第一引导界面在第一应用在先请求第一权限被拒绝的情况下生成的,第一引导界面包括跳转选项,第一点击操作包括用户点击跳转选项的操作。这样,在第一应用在线请求第一权限被拒绝的情况下,用户不需要在第二应用中执行繁琐的授权操作,简化授权流程,提升用户使用体验。In one implementation, the first application includes a first guide interface, the first guide interface is generated when the first application's previous request for the first permission is rejected, the first guide interface includes a jump option, and the first click Actions include actions where the user clicks on a jump option. In this way, when the online request of the first application for the first permission is rejected, the user does not need to perform cumbersome authorization operations in the second application, which simplifies the authorization process and improves user experience.
在一种实现方式中,第一应用包括第二授权界面,第二授权界面是在第一应用在先请求第一权限未被拒绝的情况下生成的,第二授权界面包括跳转选项和第一权限的多个授权选项,第一点击操作包括用户点击跳转选项的操作。这样,在第一应用在线请求第一权限未被拒绝的情况下,用户不需要在第二应用中执行繁琐的授权操作,简化授权流程,提升用户使用体验。In one implementation, the first application includes a second authorization interface, the second authorization interface is generated when the first application's previous request for the first permission is not rejected, and the second authorization interface includes a jump option and a second authorization interface. Multiple authorization options for one permission, the first click operation includes the operation of the user clicking the jump option. In this way, when the online request of the first application for the first permission is not rejected, the user does not need to perform cumbersome authorization operations in the second application, which simplifies the authorization process and improves user experience.
在一种实现方式中,第一授权界面中的多个授权选项与第二授权界面中的多个授权选项部分不同或者全部不同。这样,如果想要授予的权限不在第二授权界面中,则可以通过点击第二授权界面的跳转选项的方式打开第一授权界面,在第一授权界面中完成授权。In an implementation manner, the multiple authorization options in the first authorization interface are partly or completely different from the multiple authorization options in the second authorization interface. In this way, if the permission to be granted is not in the second authorization interface, the first authorization interface can be opened by clicking the jump option on the second authorization interface, and the authorization is completed in the first authorization interface.
在一种实现方式中,显示模块,用于根据视图资源以窗口的形式在第一应用的界面上层生成第一授权界面,窗口的高度小于显示屏的高度,窗口的宽度小于显示屏的宽度。这样,第一授权界面可以在第一应用的界面上层以小窗的形式展示,不影响用户在授权的同时查看第一应用的界面信息。In one implementation, the display module is configured to generate the first authorization interface on the upper layer of the first application interface in the form of a window according to the view resource, the height of the window is smaller than the height of the display screen, and the width of the window is smaller than the width of the display screen. In this way, the first authorization interface can be displayed in the form of a small window on the upper layer of the interface of the first application, without affecting the user's viewing of the interface information of the first application while authorizing.
在一种实现方式中,第二应用包括第一授权开关;设置模块,用于响应于用户的第一点击操作,获取第一授权开关的状态;设置模块,还用于当第一授权开关为开启状态时,获取应用标识和权限名称;设置模块,还用于当第一授权开关为关闭状态时,从第一应用跳转至第二应用。这样,终端设备允许用户选择是否跳转至第二应用对第一应用进行权限设置。In one implementation, the second application includes a first authorization switch; the setting module is configured to acquire the state of the first authorization switch in response to the user's first click operation; the setting module is also configured to obtain the status of the first authorization switch when the first authorization switch is When in the on state, obtain the application identification and permission name; the setting module is also used to jump from the first application to the second application when the first authorization switch is in the off state. In this way, the terminal device allows the user to choose whether to jump to the second application to set the permission of the first application.
在一种实现方式中,权限控制模块,用于从设置模块获取应用标识和权限名称;权限控制模块,用于根据应用标识和权限名称确定视图资源。In an implementation manner, the permission control module is configured to obtain the application identifier and the permission name from the setting module; the permission control module is configured to determine the view resource according to the application identifier and the permission name.
在一种实现方式中,权限控制模块,还用于将视图资源发送给显示模块。In an implementation manner, the permission control module is further configured to send the view resource to the display module.
在一种实现方式中,权限控制模块,还用于将视图资源发送给设置模块;设置模块,还用于将视图资源发送给显示模块。In an implementation manner, the permission control module is further configured to send the view resource to the setting module; the setting module is further configured to send the view resource to the display module.
在一种实现方式中,权限控制模块,还用于当测到用户点击第一授权界面中的任一授权选项时,更新相应的授权结果,以使得第一应用再次请求第一权限时,从权限控制模块中获取授权结果。In one implementation, the permission control module is further configured to update the corresponding authorization result when it is detected that the user clicks on any authorization option in the first authorization interface, so that when the first application requests the first permission again, from Obtain the authorization result in the authority control module.
在一种实现方式中,还包括以下至少一项:第一权限包括定位权限;第一应用至少包括 地图类应用、运动轨迹记录类应用、打车类应用;第二应用包括终端设备操作系统的设置应用;所述第一授权界面的大小小于所述第一应用的界面的大小。In one implementation, it also includes at least one of the following: the first permission includes positioning permission; the first application includes at least a map application, a motion track recording application, and a taxi application; the second application includes terminal device operating system settings application; the size of the first authorization interface is smaller than the size of the interface of the first application.
第三方面,本申请实施例还提供一种计算机可读存储介质,计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述各方面及其各个实现方式的方法。In the third aspect, the embodiment of the present application also provides a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the instruction is run on a computer, the computer executes the above-mentioned aspects and the methods of each implementation manner.
第四方面,本申请实施例还提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述各方面及其各个实现方式的方法。In a fourth aspect, the embodiment of the present application also provides a computer program product containing instructions, which when run on a computer, causes the computer to execute the above aspects and the methods of each implementation.
第五方面,本申请实施例还提供了一种芯片系统,该芯片系统包括处理器,用于支持上述终端设备实现上述方面中所涉及的功能,例如,生成或处理上述方法中所涉及的信息。In the fifth aspect, the embodiment of the present application further provides a chip system, the chip system includes a processor, configured to support the terminal device to implement the functions involved in the above aspect, for example, generate or process the information involved in the above method .
附图说明Description of drawings
图1是本申请实施例示出的运行时权限模式的授予权限场景图;FIG. 1 is a scene diagram of granting permission in the runtime permission mode shown in the embodiment of the present application;
图2是本申请实施例示出的场景A的示意图;Fig. 2 is a schematic diagram of scene A shown in the embodiment of the present application;
图3是本申请实施例示出的场景B的示意图;Fig. 3 is a schematic diagram of scene B shown in the embodiment of the present application;
图4是本申请实施例提供的终端设备的硬件结构示意图;FIG. 4 is a schematic diagram of a hardware structure of a terminal device provided in an embodiment of the present application;
图5是本申请实施例提供的应用授权方法对应场景A的终端设备用户界面示意图;FIG. 5 is a schematic diagram of a terminal device user interface corresponding to scenario A of the application authorization method provided by the embodiment of the present application;
图6是本申请实施例提供的应用授权方法应用于场景A时的流程图;FIG. 6 is a flow chart when the application authorization method provided by the embodiment of the present application is applied to scenario A;
图7是本申请实施例提供的应用授权方法的场景B对应的终端设备用户界面示意图;FIG. 7 is a schematic diagram of a terminal device user interface corresponding to scenario B of the application authorization method provided by the embodiment of the present application;
图8是本申请实施例提供的应用授权方法应用于场景B时的流程图;FIG. 8 is a flow chart when the application authorization method provided by the embodiment of the present application is applied to scenario B;
图9是本申请实施例提供的应用授权方法的场景B对应的终端设备用户界面示意图;FIG. 9 is a schematic diagram of a terminal device user interface corresponding to scenario B of the application authorization method provided by the embodiment of the present application;
图10是本申请实施例提供的以全局开关实现的小窗授权开关的示意图;Fig. 10 is a schematic diagram of a small window authorization switch realized by a global switch provided by the embodiment of the present application;
图11是本申请实施例提供的以非全局开关实现的小窗授权开关的示意图;Fig. 11 is a schematic diagram of a small window authorization switch realized by a non-global switch provided in the embodiment of the present application;
图12是本申请实施例提供的应用授权方法的另一个流程图;Fig. 12 is another flow chart of the application authorization method provided by the embodiment of the present application;
图13是本申请实施例示出的终端设备的软件模块的示意图;FIG. 13 is a schematic diagram of a software module of a terminal device shown in an embodiment of the present application;
图14是本申请实施例提供的应用授权方法在软件层面实现的一个示意图;Fig. 14 is a schematic diagram of the implementation of the application authorization method provided by the embodiment of the present application at the software level;
图15是本申请实施例提供的应用授权方法在软件层面实现的另一个示意图;Fig. 15 is another schematic diagram of the implementation of the application authorization method provided by the embodiment of the present application at the software level;
图16是本申请实施例提供的一种应用授权装置的结构示意图;Fig. 16 is a schematic structural diagram of an application authorization device provided by an embodiment of the present application;
图17是本申请实施例提供的另一种应用授权装置的结构示意图;Fig. 17 is a schematic structural diagram of another application authorization device provided by the embodiment of the present application;
图18是本申请实施例提供的芯片系统的结构示意图。FIG. 18 is a schematic structural diagram of a chip system provided by an embodiment of the present application.
具体实施方式detailed description
在终端设备中,应用程序为了实现一些功能,需要获取相应的权限。例如,如果应用程序要实现访问和修改日历、创建日程等功能,则需要获取日历权限;如果应用程序要实现基于位置的服务(Location Based Services,LBS)的相关功能,则需要获取位置服务权限;如果应用程序要实现录音功能,则需要获取麦克风权限。In the terminal device, in order to realize some functions, the application program needs to obtain corresponding permissions. For example, if an application wants to access and modify calendars, create schedules, etc., it needs to obtain the calendar permission; if the application wants to realize location-based services (Location Based Services, LBS) related functions, it needs to obtain the location service permission; If the application needs to implement the recording function, it needs to obtain the microphone permission.
一般来说,终端设备为应用程序提供了多种不同类型的权限,对于不同操作系统的终端设备,其权限略有不同。以运行Android系统的终端设备为例,其可以提供给应用程序的部分权限包括:Generally speaking, a terminal device provides various types of permissions for an application program, and the permissions are slightly different for terminal devices with different operating systems. Taking a terminal device running the Android system as an example, some of the permissions it can provide to the application include:
身体传感器:获取与用户的关生命体征相关的传感器信息。Body Sensors: Obtain sensor information related to the user's vital signs.
日历:使用用户的默认日历。Calendar: Use the user's default calendar.
通话记录:查看和更改用户的通话记录。Call History: View and change the user's call history.
相机:使用用户的相机拍照或录制视频。Camera: Take pictures or record videos with the user's camera.
通讯录:查看用户的联系人列表。Contacts: View the user's contact list.
位置信息(定位):请求获取用户设备的位置信息。Location information (positioning): request to obtain the location information of the user equipment.
麦克风:录制音频。Microphone: Record audio.
电话:拨打和管理通话。Phone: Make and manage calls.
身体活动:获取用户的运动信息,如步行、骑车、步数等。Physical activity: Get the user's sports information, such as walking, cycling, steps, etc.
短信:查看和发送短信。SMS: View and send text messages.
存储空间:获取终端设备上的照片和其他文件。Storage: Get photos and other files on the end device.
文件和媒体:用户终端设备上的照片、媒体和其他文件。Files and Media: Photos, media and other files on the user's terminal device.
通过以上示例出的权限可以看出,一些权限与用户隐私紧密相关,当应用程序获取这些权限时,会同时获取与权限相关的用户隐私,例如:如果应用程序获取到了通讯录权限,则应用程序可以读取并上传用户的联系人列表;如果应用程序获取到了位置信息权限,则可以随时掌握用户的位置;如果应用程序获取到了存储空间权限,则可以读取用户相册中的照片。From the permissions shown in the above example, it can be seen that some permissions are closely related to user privacy. When the application obtains these permissions, it will also obtain the user privacy related to the permissions. For example: if the application obtains the address book permission, the application The user's contact list can be read and uploaded; if the application has obtained the location information permission, it can know the user's location at any time; if the application has obtained the storage space permission, it can read the photos in the user's album.
目前,终端设备一般通过权限管理机制来管理应用程序的权限,以减少用户隐私泄露,提高设备的安全性。同样以运行Android系统的终端设备为例,其权限管理机制可以包括安装时权限模式和运行时权限模式。At present, terminal devices generally manage application program permissions through a permission management mechanism, so as to reduce leakage of user privacy and improve device security. Also taking a terminal device running an Android system as an example, its permission management mechanism may include an installation-time permission mode and a runtime permission mode.
安装时权限模式是指用户在安装或者更新应用程序时向应用程序授予权限的模式,当用户安装应用程序时,终端设备会将该应用程序请求的所有权限显示给用户,用户同意授权后,应用程序才开始安装,并且获得其请求的所有权限,安装时权限模式存在于早期的Android 6.0以前的系统版本中,不在本申请实施例的讨论范围内,因此不做展开说明。The permission mode at installation time refers to the mode in which the user grants permissions to the application when installing or updating the application. When the user installs the application, the terminal device will display all the permissions requested by the application to the user. After the user agrees to the authorization, the application The program starts to install and obtains all the permissions requested by it. The permission mode exists in the early system version before Android 6.0 during installation, which is not within the scope of the discussion of the embodiment of this application, so no further explanation will be given.
运行时权限模式是指用户在应用程序安装时不需要向应用程序授予权限,而是在应用程序运行时向应用程序授予权限。应用程序何时申请权限(例如,在应用程序启动时或用户使用特定功能时)取决于应用程序本身。The runtime permission mode means that the user does not need to grant permission to the application when the application is installed, but grants permission to the application when the application is running. When an app requests a permission (for example, at app launch or when a user uses a specific feature) is up to the app itself.
图1是本申请实施例示出的运行时权限模式的授予权限场景图。如图1所示,在应用程序运行期间,如果应用程序向终端设备请求某一个权限(例如定位权限),则终端设备可以在显示屏上生成如图1所示的授权界面10,该授权界面10可以向用户提示应用程序请求的权限内容并且提供给用户多个选项,包括但不限于以下选项中的部分或者全部:始终允许、仅在使用中允许、拒绝、询问、允许一次、拒绝且不再询问。FIG. 1 is a scene diagram of permission granting in the runtime permission mode shown in the embodiment of the present application. As shown in Figure 1, during the running of the application program, if the application program requests a certain permission (such as location permission) from the terminal device, the terminal device can generate an authorization interface 10 as shown in Figure 1 on the display screen, the authorization interface 10 You can prompt the user for the permission content requested by the application and provide the user with multiple options, including but not limited to some or all of the following options: always allow, allow only in use, deny, ask, allow once, deny and not Ask again.
在Android、IOS、鸿蒙HarmonyOS等操作系统中,授权界面10通常以N态通知的方式实现,即包含N个授权选项,N一般为3或者4。在不同的操作系统、或者同一操作系统的不同版本或者不同定制ROM中,授权界面10包含的授权选项的数量可能不同。在不同的操作系统、或者同一操作系统的不同版本或者不同定制ROM中,同一授权选项的描述也可能不同,例如“仅在使用中允许”可以被称为“仅在使用期间允许”,“允许一次”可以被称为“仅限这一次”,“拒绝且不再询问”可以被称为“始终拒绝”。In operating systems such as Android, IOS, and HarmonyOS, the authorization interface 10 is usually implemented in the form of N-state notifications, that is, includes N authorization options, and N is generally 3 or 4. In different operating systems, or different versions of the same operating system, or different custom ROMs, the number of authorization options included in the authorization interface 10 may be different. In different operating systems, or in different versions of the same operating system or in different custom ROMs, the description of the same authorization option may also be different, for example, "allow only during use" can be called "allow only during use", "allow Once" could be called "this time only", and "deny and never ask again" could be called "always deny".
接下来,用户可以依据自身意愿点击21任意一个授权选项以完成应用程序的权限设置。举例来说:当用户点击“允许”时,授权界面10关闭,应用程序获得定位权限,利用定位功能实现相应的功能,例如路径规划、导航等;当用户点击“拒绝”时,授权界面10关闭,应用程序被拒绝授予位置权限,这时应用程序基于定位的功能将无法实现。Next, the user can click any one of the authorization options in 21 according to his own wishes to complete the permission setting of the application. For example: when the user clicks "Allow", the authorization interface 10 is closed, and the application program obtains the location permission, and uses the location function to realize corresponding functions, such as path planning, navigation, etc.; when the user clicks "Deny", the authorization interface 10 is closed , the application is denied the location permission, at this time the location-based functions of the application will not be implemented.
这里需要补充说明的是,“始终允许”属于一种高危授权行为,以定位权限为例,当用户“始终允许”应用程序获取定位权限时,意味着该应用程序无论是在前台运行期间还是在后台驻留期间都能够无限制地获取用户的位置信息,会给用户带来隐私泄露的风险。因此,为 了保护用户的隐私,避免用户由于误操作等授予应用“始终允许”获取某个权限,在Android11以及后续的版本中,授权界面10已经不再提供“始终允许”选项,如果用户希望应用程序能够“始终允许”获取某个权限时,需要到系统的设置中授予。What needs to be added here is that "always allow" is a high-risk authorization behavior. Taking location permission as an example, when the user "always allows" an application to obtain location permission, it means that the application is running in the foreground or During the period of staying in the background, the user's location information can be obtained without restriction, which will bring the risk of privacy leakage to the user. Therefore, in order to protect the user's privacy and prevent the user from granting the application "always allow" to obtain a certain permission due to misoperation, etc., in Android 11 and subsequent versions, the authorization interface 10 no longer provides the "always allow" option. If the user wants the application When a program can "always allow" to obtain a certain permission, it needs to be granted in the system settings.
在一些场景中(以下称作场景A),考虑到用户体验,在用户拒绝授予应用程序某个权限之后,如果应用程序继续请求获得该权限,终端设备也不会再次生成授权界面10。在这种情况下,应用程序可能会生成一个引导对话框,以引导用户从应用程序内跳转到终端设备的应用信息页,该应用信息页由终端设备的系统的设置应用提供,在应用信息页中对该应用程序的权限进行重新设置,然后再返回到该应用程序。In some scenarios (hereinafter referred to as scenario A), considering user experience, after the user refuses to grant the application a certain permission, if the application continues to request the permission, the terminal device will not generate the authorization interface 10 again. In this case, the application may generate a dialog box to guide the user to jump from the application to the application information page of the terminal device. The application information page is provided by the system settings application of the terminal device. In the application information page to reset the app's permissions before returning to the app.
图2是本申请实施例示出的场景A的示意图。Fig. 2 is a schematic diagram of scenario A shown in the embodiment of the present application.
如图2所示,以某一应用程序请求获得定位权限为例,在该应用程序已经被拒绝授予定位权限的情况下,该应用程序可以在启动时生成如图2中的a所示的引导对话框30,该引导对话框30可以包括转至“设置”按钮31,以及向用户解释为何请求定位权限以及如何在应用信息页中授予定位权限的说明信息32。当用户点击33转至“设置”按钮31时,应用程序启动终端设备系统的设置应用,并且从应用程序的当前界面跳转至设置应用的界面,具体可以跳转至如图2中的b所示的应用信息页。其中,应用信息页是设置应用的一个子界面,在不同的操作系统、或者同一操作系统的不同版本或者不同定制ROM中,应用信息页名称可能不同,例如也可以称作应用详情页。一般来说,每一个在终端设备中安装的应用程序,在设置应用中都会有其对应的应用信息页。对于任一应用程序,其应用信息页中可以包括它的存储空间占用、流量消耗、电量消耗等信息,权限相关选项和其他的设置选项,这样,用户可以在应用信息页中查看应用程序的权限状态以及设置应用程序的权限。As shown in Figure 2, taking an application requesting location permission as an example, in the case that the application has been denied the location permission, the application can generate a guide as shown in a in Figure 2 when starting Dialog box 30, which may include a go to "Settings" button 31, and explanatory information 32 explaining to the user why location permission is requested and how to grant location permission in the application information page. When the user clicks 33 to go to the "Settings" button 31, the application starts the setting application of the terminal device system, and jumps from the current interface of the application to the interface of the setting application, specifically, it can jump to the interface shown in b in Figure 2 App information page displayed. Wherein, the application information page is a sub-interface for setting the application. In different operating systems, or different versions of the same operating system or different custom ROMs, the name of the application information page may be different, for example, it may also be called the application details page. Generally speaking, each application program installed in the terminal device will have its corresponding application information page in the setting application. For any application, its application information page can include its storage space usage, traffic consumption, power consumption and other information, permission related options and other setting options, so that users can view the application permissions on the application information page Status and permissions to set the application.
接下来,用户可以在应用信息页点击34权限管理进入到如图2中的c所示该应用程序的权限管理界面,然后在权限管理界面中点击35“定位”选项打开定位权限的授权界面40,最后在定位权限的授权界面40提供的多个授权选项中点击36任意一个选项以完成权限设置,最后手动切换回应用程序界面。Next, the user can click 34 Rights Management on the application information page to enter the rights management interface of the application as shown in c in Figure 2, and then click 35 "locate" option in the rights management interface to open the authorization interface 40 , and finally click any option 36 among multiple authorization options provided by the authorization interface 40 of the positioning authority to complete the authority setting, and finally manually switch back to the application program interface.
在另一些场景中(以下称作场景B),In other scenarios (hereinafter referred to as Scenario B),
图1的授权界面10可能没有包含与应用程序需要的权限相对应的选项。在这种情况下,应用程序也可能引导用户从应用程序内跳转到终端设备的应用信息页,在应用信息页中授予该应用程序所需要的权限,然后再返回到该应用程序。The authorization interface 10 of FIG. 1 may not contain options corresponding to the permissions required by the application. In this case, the application program may also guide the user to jump from the application program to the application information page of the terminal device, grant the required permissions to the application program in the application information page, and then return to the application program.
图3是本申请实施例示出的场景B的示意图。Fig. 3 is a schematic diagram of scenario B shown in the embodiment of the present application.
如图3所示,以地图应用请求获得定位权限为例,地图应用在实现导航功能时,需要实时获取用户的位置信息,因此地图应用希望获得“始终允许”的位置权限,以便在终端设备熄屏或者地图应用位于系统后台时获取用户的位置信息。然而,终端设备出于安全等角度考虑,可能不会在授权界面10中包含“始终允许”的选项。在这种情况下,授权界面10可以包括“在“设置”中允许”按钮37,当用户点击38“在“设置”中允许”按钮37时,应用程序跳转至终端设备的应用信息页,用户在应用信息页完成权限设置之后,再手动切换回应用程序界面。As shown in Figure 3, taking the location permission requested by the map application as an example, the map application needs to obtain the user's location information in real time when implementing the navigation function. Obtain the user's location information when the screen or map application is in the system background. However, the terminal device may not include the "always allow" option in the authorization interface 10 due to considerations such as security. In this case, the authorization interface 10 may include an "Allow in "Settings"" button 37, and when the user clicks 38 the "Allow in "Settings" button 37, the application program jumps to the application information page of the terminal device, After the user completes permission setting on the application information page, he manually switches back to the application interface.
结合图2和3可以看出,在应用程序已经被拒绝授予某个权限的情况下,或者在授权界面10未包括应用程序请求得到的权限的情况下,应用程序可以跳转到终端设备的应用信息页,让用户在应用信息页中执行操作以授予该权限,然而这一过程需要用户执行多次的点击操作和应用程序切换操作,十分繁琐,影响了用户使用体验。Combining Figures 2 and 3, it can be seen that in the case that the application program has been denied a certain permission, or in the case that the authorization interface 10 does not include the permission requested by the application program, the application program can jump to the application program of the terminal device. The information page allows users to perform operations on the application information page to grant the permission. However, this process requires the user to perform multiple click operations and application switching operations, which is very cumbersome and affects the user experience.
为了避免用户对应用程序授予权限的过程中出现界面跳转,简化用户操作,提升用户使用体验,本申请实施例提供了一种应用授权方法。In order to avoid interface jumps during the process of the user granting permissions to the application program, simplify user operations, and improve user experience, an embodiment of the present application provides an application authorization method.
本申请实施例的应用授权方法可以应用程序于终端设备。其中,终端设备包括但不限于手机、平板电脑、个人电脑、工作站设备、大屏设备(例如:智慧屏、智能电视等)、可穿戴设备(例如:智能手环、智能手表)掌上游戏机、家用游戏机、虚拟现实设备、增强现实设备、混合现实设备等、车载智能终端等。The application authorization method in the embodiment of the present application can be applied to a terminal device. Among them, terminal devices include but are not limited to mobile phones, tablet computers, personal computers, workstation devices, large-screen devices (such as: smart screens, smart TVs, etc.), wearable devices (such as: smart bracelets, smart watches) handheld game consoles, Home game consoles, virtual reality devices, augmented reality devices, mixed reality devices, etc., vehicle-mounted intelligent terminals, etc.
图4是本申请实施例提供的终端设备的硬件结构示意图。如图4所示,终端设备100可以包括处理器110,存储器120,通用串行总线(universal serial bus,USB)接口130,射频电路140,移动通信模块150,无线通信模块160,摄像头170,显示屏180,触摸传感器190,气压传感器210和按键220等。FIG. 4 is a schematic diagram of a hardware structure of a terminal device provided by an embodiment of the present application. As shown in Figure 4, the terminal device 100 may include a processor 110, a memory 120, a universal serial bus (universal serial bus, USB) interface 130, a radio frequency circuit 140, a mobile communication module 150, a wireless communication module 160, a camera 170, a display screen 180, touch sensor 190, air pressure sensor 210 and buttons 220, etc.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用程序处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中,例如集成在系统芯片(system on a chip,SoC)中。处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。The processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (graphics processing unit, GPU), an image signal processing Image signal processor (ISP), video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor (neural-network processing unit, NPU), etc. Wherein, different processing units may be independent devices, or may be integrated in one or more processors, such as integrated in a system chip (system on a chip, SoC). A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled.
可以理解的是,本申请实施例示意的结构并不构成对终端设备100的具体限定。在本申请另一些实施例中,终端设备可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件组合实现。It can be understood that, the structure shown in the embodiment of the present application does not constitute a specific limitation on the terminal device 100 . In other embodiments of the present application, the terminal device may include more or fewer components than shown in the figure, or combine certain components, or separate certain components, or arrange different components. The illustrated components can be realized in hardware, software or a combination of software and hardware.
下面对本申请实施例提供的应用授权方法的各方法步骤进行示例性说明。Each method step of the application authorization method provided by the embodiment of the present application is illustrated below.
本申请实施例提供的应用授权方法可以应用于场景A中。The application authorization method provided in the embodiment of this application can be applied in scenario A.
在场景A中,应用程序在运行期间可以向终端设备请求获取某个权限。这里的应用程序在运行期间包括但不限于:应用程序启动时,应用程序启动后在前台运行期间、应用程序启动后在后台运行期间。在Android系统中,应用程序可以通过调requestPermissions()方法向终端设备的操作系统申请权限。在以下实施例中,为便于描述,将请求权限的应用程序称作目标应用。In scenario A, the application may request a certain permission from the terminal device during running. The running period of the application program here includes but is not limited to: when the application program is started, during the running period of the application program in the foreground after starting, and during the running period of the application program in the background after starting. In the Android system, the application program can apply for permission from the operating system of the terminal device by calling the requestPermissions() method. In the following embodiments, for ease of description, the application program requesting permission is called the target application program.
以目标应用请求定位权限为例:Take the target application requesting location permission as an example:
终端设备发现目标应用之前申请过这个权限,但是被用户永久拒绝时(例如用户之前在如图1所示的授权界面10中选择了“永久拒绝”或者“拒绝且不再询问”),可以将目标应用请求权限被拒绝的结果告知给目标应用,在Android系统中,终端设备可以通过调用shouldShowRequestPermissionRationale()方法将目标应用请求权限被拒绝的结果告知给目标应用,另外,终端设备不会在显示屏上显示如图1中的a所示的授权界面10。When the terminal device discovers that the target application has applied for this permission before, but is permanently rejected by the user (for example, the user has selected "permanently reject" or "deny and no longer ask" in the authorization interface 10 shown in Figure 1), the Inform the target application of the rejected result of the target application's permission request. In the Android system, the terminal device can notify the target application of the rejected result of the target application's permission request by calling the shouldShowRequestPermissionRationale() method. The authorization interface 10 as shown in a in FIG. 1 is displayed on .
图5是本申请实施例提供的应用授权方法对应场景A的终端设备用户界面示意图。FIG. 5 is a schematic diagram of a terminal device user interface corresponding to scenario A of the application authorization method provided by the embodiment of the present application.
图6是本申请实施例提供的应用授权方法应用于场景A时的流程图。FIG. 6 is a flow chart when the application authorization method provided by the embodiment of the present application is applied to scenario A.
目标应用在获知其请求某一权限被拒绝之后,可以生成如图5中的a所示的引导界面30,以引导用户在终端设备系统的设置应用中授予目标应用所需要的权限。After the target application learns that its request for a certain permission is rejected, it can generate a guide interface 30 as shown in a in FIG. 5 to guide the user to grant the required permission to the target application in the setting application of the terminal device system.
如果用户想要在终端设备系统的设置应用中设置目标应用的权限,可以在引导界面30中的转至“设置”按钮31上执行点击33操作。一般来说,终端设备在检测到用户在转至“设 置”按钮31上执行点击33操作时,会响应于该点击操作,从当前的目标应用界面跳转至终端设备系统的设置应用,例如跳转至设置应用的应用信息页,以使得用户自行在应用信息页中通过多个操作完成权限授予。但是,在本申请实施例中,终端设备在检测到用户在转至“设置”按钮31上执行点击33操作时,不会跳转至终端设备系统的设置应用,而是执行如图6所示的以下步骤S101-S103:If the user wants to set the permission of the target application in the setting application of the terminal device system, the operation of clicking 33 can be performed on the Go to “Settings” button 31 in the guidance interface 30 . Generally speaking, when the terminal device detects that the user performs a click 33 operation on the go to "settings" button 31, it will respond to the click operation and jump from the current target application interface to the setting application of the terminal device system, for example, jump to Go to the application information page of the settings application, so that the user can complete the permission grant through multiple operations in the application information page. However, in the embodiment of the present application, when the terminal device detects that the user performs an operation of clicking 33 on the "Settings" button 31, it will not jump to the setting application of the terminal device system, but execute the The following steps S101-S103:
步骤S101,终端设备响应于用户在转至“设置”按钮上的点击操作,获取目标应用的应用标识和目标应用请求的权限名称。In step S101, the terminal device acquires the application identifier of the target application and the name of the permission requested by the target application in response to the user's click operation on the Go to "Settings" button.
其中,目标应用的应用标识例如可以是目标应用的包名(Package Name)、应用ID,也可以是其他用于确定目标应用的唯一身份的信息,本申请实施例对此不做限定。Wherein, the application identifier of the target application may be, for example, the package name (Package Name) and the application ID of the target application, or other information used to determine the unique identity of the target application, which is not limited in this embodiment of the present application.
示例地,在Android终端设备中,目标应用的包名可以是:com.xxx.xxx,其中,xxx.xxx可以是用于表明应用开发者和应用类型、名称等身份的信息。例如,“地图”应用的包名可以是:com.honor.map。在IOS终端设备中,包名可以是一串数字,不同的应用程序的数字不同。For example, in an Android terminal device, the package name of the target application may be: com.xxx.xxx, where xxx.xxx may be information used to indicate the identity of the application developer, application type, and name. For example, the package name of the "Maps" application could be: com.honor.map. In the IOS terminal device, the package name can be a string of numbers, and the numbers of different applications are different.
其中,权限名称例如可以包括权限名称,例如:位置信息、通讯录、身体传感器、存储空间等。如果目标应用申请一项权限,则权限名称可以包括一项权限的名称,如果目标应用申请多项权限,则权限名称可以包括多项权限的名称。Wherein, the permission name may include, for example, a permission name, such as location information, address book, body sensor, storage space, and the like. If the target application applies for one permission, the permission name may include the name of one permission, and if the target application applies for multiple permissions, the permission name may include the names of multiple permissions.
步骤S102,终端设备确定应用标识和权限名称对应的第一授权界面的视图资源。In step S102, the terminal device determines the view resource of the first authorization interface corresponding to the application identifier and the authority name.
具体实现中,终端设备在检测到用户点击了引导界面中的“设置”按钮之后,不会跳转到应用信息页,而是在后台根据已获得的应用标识和权限名称对操作系统的设置应用进行检索,以找到与目标应用所请求的权限相对应的第一授权界面的视图资源,该视图资源包括生成第一授权界面所需的文字资源、图像资源、样式资源等。需要补充说明的是,终端设备执行步骤S102的整个过程不会在显示屏中体现,用户不会感知到这一过程。In the specific implementation, after the terminal device detects that the user has clicked the "Settings" button in the guidance interface, it will not jump to the application information page, but will apply the settings of the operating system in the background according to the obtained application identification and permission name. A search is performed to find the view resource of the first authorization interface corresponding to the permission requested by the target application, where the view resource includes text resources, image resources, style resources, etc. required for generating the first authorization interface. It should be added that the entire process of the terminal device performing step S102 will not be displayed on the display screen, and the user will not perceive this process.
示例地,当终端设备获取到的包名是com.honor.map(“地图”应用的包名),请求的权限为定位权限时,终端设备可以根据包名com.honor.map在系统的设置应用中检索到“地图”应用的应用信息页,然后在“地图”应用的应用信息页中进一步检索定位权限的授权界面。For example, when the package name obtained by the terminal device is com.honor.map (the package name of the "map" application), and the requested permission is the positioning permission, the terminal device can set the package name com.honor.map in the system The application information page of the "map" application is retrieved in the application, and then the authorization interface of the location permission is further retrieved in the application information page of the "map" application.
步骤S103,终端设备根据视图资源在目标应用的界面上层生成所述第一授权界面。Step S103, the terminal device generates the first authorization interface on the upper layer of the interface of the target application according to the view resource.
如图5中的b所示,在一种实现方式中,终端设备可以根据视图资源中所包含的文字资源、图像资源和样式资源等绘制出第一授权界面,将第一授权界面50以窗口(也称小窗)的形式在显示屏中显示,并且小窗显示在目标应用的界面60上层。窗口的高度小于终端设备的显示屏的高度,窗口的宽度小于显示屏的宽度,这样,在第一授权界面50显示之后,用户依然可以看到目标应用的界面60的部分内容。As shown in b in Figure 5, in one implementation, the terminal device can draw the first authorization interface according to the text resources, image resources and style resources contained in the view resources, and display the first authorization interface 50 as a window (also called a small window) is displayed on the display screen, and the small window is displayed on the upper layer of the interface 60 of the target application. The height of the window is smaller than the height of the display screen of the terminal device, and the width of the window is smaller than the width of the display screen. In this way, after the first authorization interface 50 is displayed, the user can still see part of the content of the interface 60 of the target application.
本申请实施例中,第一授权界面50可以理解为将图2中的d示出的授权界面40直接在目标应用的界面60的上层显示,因此第一授权界面50与授权界面40的样式和内容可以相同,也可以不同。具体来说:如果终端设备在获取第一授权界面50的视图资源之后,直接以视图资源的样式和内容生成第一授权界面50,那么第一授权界面50就会与授权界面40的样式和内容相同,如果终端设备在获取第一授权界面50的视图资源之后,根据终端设备当前的主题设置、用户设置等对视图资源的样式和内容进行优化修改,那么第一授权界面50就会与授权界面40的样式和内容就可能不同。In the embodiment of the present application, the first authorization interface 50 can be understood as displaying the authorization interface 40 shown in d in FIG. 2 directly on the upper layer of the interface 60 of the target application. The content can be the same or different. Specifically: if the terminal device directly generates the first authorization interface 50 with the style and content of the view resource after obtaining the view resource of the first authorization interface 50, then the first authorization interface 50 will be consistent with the style and content of the authorization interface 40 Similarly, if the terminal device optimizes and modifies the style and content of the view resource according to the current theme settings and user settings of the terminal device after obtaining the view resource of the first authorization interface 50, then the first authorization interface 50 will be consistent with the authorization interface. 40 may vary in style and content.
如图5中的b所示,在一种实现方式中,第一授权界面50可以包括目标应用请求权限的说明,并且提供用户请求权限的多个授权选项供用户选择。以“地图”应用的定位权限的第一授权界面50为例,第一授权界面50可以包括应用名称51“地图”、“地图”应用的图标 52、“地图”应用请求的权限名称53“定位”、以及“定位”权限的用途描述54(例如:为您提供周边信息、精准路况和导航服务)等。作为示例,第一授权界面50提供给用户四个授权选项,分别为:拒绝、询问、仅在使用中允许、始终允许。As shown in b in FIG. 5 , in an implementation manner, the first authorization interface 50 may include a description of the permission requested by the target application, and provide multiple authorization options for the user to choose from. Taking the first authorization interface 50 of the positioning authority of the "Maps" application as an example, the first authorization interface 50 may include an application name 51 "map", an icon 52 of the "map" application, and a permission name 53 "location location" requested by the "map" application. ", and the description of the purpose of the "location" permission54 (for example: to provide you with surrounding information, accurate traffic conditions and navigation services), etc. As an example, the first authorization interface 50 provides the user with four authorization options, which are: deny, ask, allow only in use, and always allow.
在第一授权界面50以窗口形式的生成之后,用户可以依据自身意愿点击55任意一个授权选项以完成权限设置。具体实现中,终端设备在检测到用户点击55了第一授权界面50中的任意一个选项时关闭第一授权界面50,将用户点击55对应的授权结果保存在系统的权限管理器中,并且重新启动目标应用。以“地图”应用的定位权限为例:After the first authorization interface 50 is generated in the form of a window, the user can click 55 any authorization option according to his/her will to complete the authority setting. In a specific implementation, when the terminal device detects that the user has clicked 55 on any option in the first authorization interface 50, the first authorization interface 50 is closed, and the authorization result corresponding to the user's click 55 is saved in the authority manager of the system, and re- Start the target application. Take the location permission of the "Maps" application as an example:
当用户点击了第一授权界面50中的“始终允许”选项时,终端设备可以关闭第一授权界面50,将“地图”应用的定位权限更新为“始终允许”,并且重新启动“地图”应用。这样,“地图”应用在重启之后再次请求定位权限时,能请求到“始终允许”的结果,从而可以执行基于位置信息的各种功能。When the user clicks the "always allow" option in the first authorization interface 50, the terminal device can close the first authorization interface 50, update the positioning permission of the "map" application to "always allow", and restart the "map" application . In this way, when the "map" application requests location permission again after restarting, it can request the result of "always allow", so that various functions based on location information can be performed.
当用户点击了第一授权界面50中的“拒绝”选项时,终端设备可以关闭第一授权界面50,将“地图”的定位权限保持为“拒绝”,并且重新启动“地图”应用。这样,“地图”应用在重启之后再次请求定位权限时,能请求到“拒绝”的结果,从而可以执行与未获取到定位权限相关的功能,例如:提示用户定位失败、关闭目标应用、重新生成引导界面等。When the user clicks the "deny" option in the first authorization interface 50, the terminal device can close the first authorization interface 50, keep the location permission of "map" as "deny", and restart the "map" application. In this way, when the "Maps" application requests location permission again after restarting, it can request the result of "denied", so that it can perform functions related to the failure to obtain the location permission, such as: prompting the user that the location fails, closing the target application, regenerating Guidance interface etc.
这里需要补充说明的是,在本申请实施例的步骤S103中,终端设备可以将第一授权界面50在显示屏的任意位置显示,本申请实施例对此不做限定。It should be added here that, in step S103 of the embodiment of the present application, the terminal device may display the first authorization interface 50 at any position on the display screen, which is not limited in the embodiment of the present application.
在一种实现方式中,考虑到目标应用在启动时通常会在开屏界面的下方显示目标应用的名称,因此第一授权界面50可以在显示屏的中心区域显示,从而不遮挡目标应用的名称。In one implementation, considering that the target application usually displays the name of the target application at the bottom of the screen opening interface when it is started, the first authorization interface 50 can be displayed in the central area of the display screen so as not to block the name of the target application .
在一种实现方式中,第一授权界面50可以在显示屏的底部显示,这种实现方式可以应用于智能手机等可以单手握持的终端设备中,以便于用户在单手握持终端设备时能够对第一授权界面50进行单手操作。In one implementation, the first authorization interface 50 can be displayed at the bottom of the display screen. This implementation can be applied to a terminal device that can be held with one hand, such as a smart phone, so that the user can hold the terminal device with one hand. At this time, the first authorization interface 50 can be operated with one hand.
在一种实现方式中,第一授权界面50可以在显示屏的顶部显示,这样用户可以一只手握持终端设备,另一只手操作第一授权界面50,实现双手操作。In an implementation manner, the first authorization interface 50 may be displayed on the top of the display screen, so that the user can hold the terminal device with one hand and operate the first authorization interface 50 with the other hand to achieve two-handed operation.
在一种实现方式中,当终端设备为折叠屏手机,或者其他显示屏宽度较大的设备时,第一授权界面50可以在显示屏的侧面显示,以避开显示屏的弯折区域。In an implementation manner, when the terminal device is a folding screen mobile phone or other devices with a large display screen width, the first authorization interface 50 may be displayed on the side of the display screen to avoid the bending area of the display screen.
由以上技术方案可知,本申请实施例提供的应用授权方法,在目标应用请求的某个权限之前已经被用户永久拒绝的情况下,如果用户在目标应用内执行的操作表明用户想要跳转到终端设备系统的设置应用进行权限设置,终端设备会获取目标应用的应用标识和请求权限的权限名称,在目标应用的界面商城直接生成与应用标识和权限名称对应的第一授权界面,使用户直接在第一授权界面中完成对目标应用的权限设置,不需要跳转到设置应用,也不需要在不同应用之间切换,简化用户操作,提升用户使用体验。It can be seen from the above technical solutions that in the application authorization method provided by the embodiment of the present application, if a permission requested by the target application has been permanently rejected by the user before, if the operation performed by the user in the target application indicates that the user wants to jump to The setting application of the terminal device system performs permission setting, and the terminal device will obtain the application ID of the target application and the permission name of the requested permission, and directly generate the first authorization interface corresponding to the application ID and permission name in the interface mall of the target application, so that the user can directly In the first authorization interface, the permission setting of the target application is completed without jumping to the setting application or switching between different applications, which simplifies user operations and improves user experience.
本申请实施例提供的应用授权方法还可以目标应用于场景B中。The application authorization method provided in this embodiment of the present application can also be applied to scenario B.
图7是本申请实施例提供的应用授权方法的场景B对应的终端设备用户界面示意图。FIG. 7 is a schematic diagram of a terminal device user interface corresponding to scenario B of the application authorization method provided by the embodiment of the present application.
图8是本申请实施例提供的应用授权方法应用于场景B时的流程图。FIG. 8 is a flow chart when the application authorization method provided by the embodiment of the present application is applied to scenario B.
在场景B中,目标应用在运行期间可以向终端设备请求获取某个权限。这里的目标应用在运行期间包括但不限于:目标应用启动时,目标应用启动后在前台运行期间、目标应用启动后在后台运行期间。在Android系统中,目标应用可以通过调用requestPermissions()方法向终端设备的操作系统申请权限。以目标应用请求定位权限为例:In scenario B, the target application may request a certain permission from the terminal device during operation. Here, the running period of the target application includes but is not limited to: when the target application is started, during the running period of the target application in the foreground after starting, and during the running period of the target application in the background after starting. In the Android system, the target application can apply for permission from the operating system of the terminal device by calling the requestPermissions() method. Take the target application requesting location permission as an example:
终端设备发现目标应用没有这个权限,并且用户之前也没有永久拒绝过目标应用获取这 个权限时,可以在显示屏上显示如图7所示的第二授权界面10,以便用户执行授权操作。对于某一权限,终端设备可以提供多种授权选项供用户选择,例如:始终允许、仅在使用中允许、拒绝、询问、允许一次、始终拒绝等。但是,基于系统设置或者从安全性角度考虑,终端设备在第二授权界面10中只会列出部分选项,导致一些选项没有在第二授权界面10中显示。When the terminal device finds that the target application does not have this permission, and the user has not permanently denied the target application to obtain this permission before, the second authorization interface 10 shown in Figure 7 can be displayed on the display screen so that the user can perform the authorization operation. For a certain permission, the terminal device can provide multiple authorization options for the user to choose, such as: always allow, only allow in use, deny, ask, allow once, always deny, etc. However, based on system settings or from the perspective of security, the terminal device will only list some options on the second authorization interface 10 , resulting in some options not being displayed on the second authorization interface 10 .
如图7中的a所示,终端设备可以在第二授权界面10中显示一些提示信息,以提示用户可以在终端设备系统的设置应用中选择其他的授权选项,并提供给用户一个用于跳转到设置应用的按钮37。例如:第二授权界面10中包含有三个授权选项(即三态通知),分别为“仅在使用期间允许”“仅限这一次”和“拒绝”。考虑到一些应用程序需要在后台时也能获取到用户的位置信息(对应“始终允许”选项),以完成后台导航、记录用户运动轨迹等功能,第二授权界面10还包含有以下提示信息:“该应用程序可能想要随时获取您的位置信息(即使您并未使用该应用程序)”,并且还包含一个跳转按钮37:“在“设置”中允许”。As shown in a in FIG. 7, the terminal device may display some prompt information on the second authorization interface 10 to prompt the user to select other authorization options in the setting application of the terminal device system, and provide the user with an option to skip Go to button 37 of the Settings app. For example: the second authorization interface 10 includes three authorization options (ie, three-state notification), which are respectively "permit only during use", "only this time" and "deny". Considering that some application programs need to obtain the user's location information (corresponding to the "always allow" option) when they are in the background, so as to complete functions such as background navigation and recording the user's movement track, the second authorization interface 10 also includes the following prompt information: "This app may want to get your location at any time (even if you're not using the app)" and also includes a jump button 37: "Allow in Settings".
如果用户想要在终端设备系统的设置应用中设置目标应用的权限,可以在第二授权界面10中的“在“设置”中允许”按钮37上执行点击38操作。一般来说,终端设备在检测到用户在“在“设置”中允许”按钮37上执行点击38操作时,会响应于该点击操作,从当前的目标应用界面跳转至终端设备系统的设置应用,例如跳转至设置应用的应用信息页,以使得用户自行在应用信息页中通过多个操作完成权限授予。但是,在本申请实施例中,终端设备在检测到在“在“设置”中允许”按钮37上执行点击38操作时,不会跳转至终端设备系统的设置应用,而是执行如图8所示的依稀按步骤S201-S203。If the user wants to set the permission of the target application in the setting application of the terminal device system, the operation of clicking 38 can be performed on the "Allow in "Settings" button 37 in the second authorization interface 10 . Generally speaking, when the terminal device detects that the user performs a click 38 operation on the "Allow in "Settings" button 37, it will respond to the click operation and jump from the current target application interface to the setting application of the terminal device system , such as jumping to the application information page of the settings application, so that the user can complete permission granting through multiple operations on the application information page. However, in the embodiment of the present application, when the terminal device detects that the click 38 operation is performed on the "Allow in "Settings" button 37, it will not jump to the setting application of the terminal device system, but execute the The shown vaguely follows steps S201-S203.
步骤S201,终端设备响应于用户在“在“设置”中允许”按钮上的点击操作,获取目标应用的应用标识和目标应用请求的权限名称。In step S201, the terminal device obtains the application identifier of the target application and the name of the permission requested by the target application in response to the user's click operation on the "Allow in "Settings"" button.
其中,目标应用的应用标识例如可以是目标应用的包名(Package Name)、应用ID,也可以是其他用于确定目标应用的唯一身份的信息,本申请实施例对此不做限定。权限名称例如可以包括权限名称,例如:位置信息、通讯录、身体传感器、存储空间等。Wherein, the application identifier of the target application may be, for example, the package name (Package Name) and the application ID of the target application, or other information used to determine the unique identity of the target application, which is not limited in this embodiment of the present application. The permission name may include, for example, a permission name, such as location information, address book, body sensor, storage space, and the like.
步骤S201其他未具体展开的内容请参照本申请实施例的步骤S101实现,此处不再赘述。Please refer to step S101 in the embodiment of the present application for other contents of step S201 that are not specifically expanded, and will not be repeated here.
步骤S202,终端设备确定应用标识和权限名称对应的第一授权界面的视图资源。In step S202, the terminal device determines the view resource of the first authorization interface corresponding to the application identifier and the authority name.
步骤S202与步骤S102类似,具体实现中,终端设备在检测到用户点击了通知界面中的“在“设置”中允许”按钮之后,不会跳转到设置应用的界面,而是在后台根据已获得的应用标识和权限名称对操作系统的设置应用进行检索,以找到与目标应用所请求的权限相对应的第一授权界面的视图资源,该视图资源包括生成第一授权界面所需的文字资源、图像资源、样式资源等。终端设备执行步骤S202的整个过程不会在显示屏中体现,用户不会感知到这一过程。Step S202 is similar to step S102. In specific implementation, after the terminal device detects that the user has clicked the "Allow in "Settings" button in the notification interface, it will not jump to the interface of the setting application, but in the background according to the Search the setting application of the operating system with the obtained application identifier and permission name to find the view resource of the first authorization interface corresponding to the permission requested by the target application, and the view resource includes text resources required for generating the first authorization interface , image resources, style resources, etc. The whole process of executing step S202 by the terminal device will not be displayed on the display screen, and the user will not perceive this process.
步骤S202其他未具体展开的内容请参照本申请实施例的步骤S102实现,此处不再赘述。Please refer to step S102 in the embodiment of the present application for other contents of step S202 that are not specifically developed, and will not be repeated here.
步骤S203,终端设备根据视图资源在目标应用的界面上层生成所述第一授权界面。Step S203, the terminal device generates the first authorization interface on the upper layer of the interface of the target application according to the view resource.
如图7中的b所示,在一种实现方式中,根据视图资源中所包含的文字资源、图像资源和样式资源等绘制出第一授权界面,将第一授权界面50以窗口(也称小窗)的形式在显示屏中显示,并且小窗显示在目标应用的界面60上层。窗口的高度小于终端设备的显示屏的高度,窗口的宽度小于显示屏的宽度,这样,在第一授权界面50显示之后,用户依然可以看到目标应用的界面60的部分内容。As shown in b in Figure 7, in one implementation, the first authorization interface is drawn according to the text resources, image resources and style resources contained in the view resources, and the first authorization interface 50 is represented by a window (also called The form of a small window) is displayed on the display screen, and the small window is displayed on the upper layer of the interface 60 of the target application. The height of the window is smaller than the height of the display screen of the terminal device, and the width of the window is smaller than the width of the display screen. In this way, after the first authorization interface 50 is displayed, the user can still see part of the content of the interface 60 of the target application.
与步骤S103类似,进一步如图5中的b所示,第一授权界面50可以包括目标应用请求 权限的说明,并且提供用户请求权限的多个授权选项供用户选择。以“地图”应用的定位权限的第一授权界面50为例,第一授权界面50可以包括应用名称51“地图”、“地图”应用的图标52、“地图”应用请求的权限名称53“定位”、以及“定位”权限的用途描述54(例如:为您提供周边信息、精准路况和导航服务)等。作为示例,第一授权界面50提供给用户四个授权选项,分别为:拒绝、询问、仅在使用中允许、始终允许。Similar to step S103, as further shown in b in FIG. 5 , the first authorization interface 50 may include a description of the permission requested by the target application, and provide multiple authorization options for the user to request permission for the user to choose. Taking the first authorization interface 50 of the positioning authority of the "Maps" application as an example, the first authorization interface 50 may include an application name 51 "map", an icon 52 of the "map" application, and a permission name 53 "location location" requested by the "map" application. ", and the description of the purpose of the "location" permission54 (for example: to provide you with surrounding information, accurate traffic conditions and navigation services), etc. As an example, the first authorization interface 50 provides the user with four authorization options, which are: deny, ask, allow only in use, and always allow.
在一种实现方式中,相比于第二授权界面10,第一授权界面50可以显示更多的选项。作为示例,如图8中的b所示,当第二授权界面10中包含“仅在使用期间允许”“仅限这一次”和“拒绝”三个选项时,第一授权界面50可以在此基础上增加一个或者多个选项,例如增加“始终允许”选项,另外还可以增加“拒绝一次”选项等。In an implementation manner, compared with the second authorization interface 10, the first authorization interface 50 may display more options. As an example, as shown in b in FIG. 8, when the second authorization interface 10 includes three options of "permit only during use", "only this time" and "deny", the first authorization interface 50 can be here Add one or more options on the basis, such as adding the "always allow" option, and you can also add the "deny once" option, etc.
在一种实现方式中,第一授权界面50与第二授权界面10包含的选项数量相同,但是第一授权界面50可以包含与第二授权界面10不同的选项,这里的不同指的是第一授权界面50与第二授权界面10中的选项部分不同或者全部不同。作为示例,如图9所示,当第二授权界面10中包含“仅在使用期间允许”“仅限这一次”和“拒绝”三个选项时,第一授权界面50中也可以包含:“仅在使用期间允许”“始终允许”“拒绝”。这样,相比于第二授权界面10,用户在第一授权界面50可以额外选择“始终允许”选项,以使得目标应用获得用于实现后台导航、记录用户运动轨迹等功能的充分权限。In one implementation, the first authorization interface 50 includes the same number of options as the second authorization interface 10, but the first authorization interface 50 may include different options from the second authorization interface 10, where the difference refers to the first The options in the authorization interface 50 are partially or completely different from those in the second authorization interface 10 . As an example, as shown in FIG. 9, when the second authorization interface 10 includes three options of "permit only during use", "only this time" and "deny", the first authorization interface 50 may also include: " Allow only during use", "Always allow" and "Deny". In this way, compared with the second authorization interface 10, the user can additionally select the "always allow" option on the first authorization interface 50, so that the target application obtains sufficient permissions for functions such as background navigation and recording of the user's movement track.
在第一授权界面50以小窗形式的生成之后,用户可以依据自身意愿点击55任意一个选项以完成权限设置。具体实现中,终端设备在检测到用户点击55了第一授权界面50中的任意一个选项时关闭第一授权界面50,将用户点击55对应的授权结果保存在系统的权限管理器中,并且重新启动目标应用。After the first authorization interface 50 is generated in the form of a small window, the user can click 55 on any option to complete the authority setting according to his own wishes. In a specific implementation, when the terminal device detects that the user has clicked 55 on any option in the first authorization interface 50, the first authorization interface 50 is closed, and the authorization result corresponding to the user's click 55 is saved in the authority manager of the system, and re- Start the target application.
步骤S203其他未具体展开的内容请参照本申请实施例的步骤S203实现,此处不再赘述。Please refer to step S203 in the embodiment of the present application for other content in step S203 that is not specifically developed, and will not be repeated here.
由以上技术方案可知,本申请实施例提供的应用授权方法,在目标应用请求的某个权限之前未被拒绝的情况下,如果用户在目标应用内执行的操作表明用户想要跳转到终端设备系统的设置应用进行权限设置,终端设备会获取目标应用的应用标识和请求权限的权限名称,在目标应用的界面商城直接生成与应用标识和权限名称对应的第一授权界面,使用户直接在第一授权界面中完成对目标应用的权限设置,不需要跳转到设置应用,也不需要在不同应用之间切换,简化用户操作,提升用户使用体验。It can be seen from the above technical solutions that in the application authorization method provided by the embodiment of the present application, if a certain permission requested by the target application has not been rejected before, if the operation performed by the user in the target application indicates that the user wants to jump to the terminal device The system's setting application performs permission setting, and the terminal device will obtain the application ID of the target application and the permission name of the requested permission, and directly generate the first authorization interface corresponding to the application ID and permission name in the interface mall of the target application, so that the user can directly The permission setting of the target application is completed in the authorization interface, without jumping to the setting application, and without switching between different applications, which simplifies user operations and improves user experience.
在一个实施例中,终端设备可以在其系统的设置应用中提供小窗授权开关,该小窗授权开关用于指示在场景A和场景B中是否允许以小窗(窗口)的形式生成第一授权界面。In an embodiment, the terminal device can provide a widget authorization switch in its system setting application, and the widget authorization switch is used to indicate whether to allow the generation of the first Authorization interface.
以场景A为例,当小窗授权开关为开启状态时,如果终端设备在检测到用户点击了引导界面中的转至“设置”按钮,不会跳转至应用信息页,而是执行步骤S101-步骤S103;当小窗授权开关为关闭状态时,如果终端设备在检测到用户点击了引导界面中的转至“设置”按钮,不会执行步骤S101-步骤S103,而是跳转到应用信息页,由用户自行在应用信息页中找到目标应用的权限设置入口,并完成相应的授权操作,再手动切换回目标应用界面。Taking scenario A as an example, when the small window authorization switch is turned on, if the terminal device detects that the user has clicked the Go to "Settings" button in the guidance interface, it will not jump to the application information page, but execute step S101 - Step S103; when the small window authorization switch is turned off, if the terminal device detects that the user has clicked the Go to "Settings" button in the guidance interface, it will not execute steps S101-step S103, but jump to the application information page, the user finds the permission setting entry of the target application on the application information page, completes the corresponding authorization operation, and then manually switches back to the target application interface.
以场景B为例,当小窗授权开关为开启状态时,如果终端设备在检测到用户点击了第二授权界面中的在“设置”中允许按钮,不会跳转至应用信息页,而是执行步骤S201-步骤S203;当小窗授权开关为关闭状态时,如果终端设备在检测到用户点击了第二授权界面中的在“设置”中允许按钮,不会执行步骤S201-步骤S203,而是跳转到应用信息页,由用户自行在应用信息页中找到目标应用的权限设置入口,并完成相应的授权操作,再手动切换回目标应用界面。Taking Scenario B as an example, when the small window authorization switch is turned on, if the terminal device detects that the user has clicked the Allow button in "Settings" on the second authorization interface, it will not jump to the application information page, but Execute step S201-step S203; when the small window authorization switch is in the closed state, if the terminal device detects that the user has clicked the allow button in "Settings" in the second authorization interface, step S201-step S203 will not be executed, and It is to jump to the application information page, and the user finds the permission setting entry of the target application on the application information page, completes the corresponding authorization operation, and then manually switches back to the target application interface.
在一种实现方式中,小窗授权开关可以是全局开关。In one implementation, the widget authorization switch may be a global switch.
图10是本申请实施例提供的以全局开关实现的小窗授权开关的示意图。如图10所示,小窗授权开关71可以位于设置应用的主界面或者某个次级界面中,例如位于权限管理界面72中。用户可以通过点击73的方式开启或者关闭小窗授权开关71,当小窗授权开关71被开启时,终端设备对所有目标应用都允许以小窗的形式生成第一授权界面,当小窗授权开关71被关闭时,终端设备对所有目标应用都不允许以小窗的形式生成第一授权界面。Fig. 10 is a schematic diagram of a small window authorization switch implemented by a global switch provided by the embodiment of the present application. As shown in FIG. 10 , the widget authorization switch 71 may be located in the main interface of the setting application or in a certain secondary interface, for example, in the authority management interface 72 . The user can turn on or off the small window authorization switch 71 by clicking 73. When the small window authorization switch 71 is turned on, the terminal device allows all target applications to generate the first authorization interface in the form of a small window. When the small window authorization switch When 71 is closed, the terminal device does not allow all target applications to generate the first authorization interface in the form of a small window.
在一种实现方式中,小窗授权开关可以是非全局开关。In one implementation, the widget authorization switch may be a non-global switch.
图11是本申请实施例提供的以非全局开关实现的小窗授权开关的示意图。如图11所示,小窗授权开关71可以位于应用信息页74中,每个目标应用的应用信息页74都可以包括一个小窗授权开关71,并且每一个小窗授权开关71仅对其对应的一个目标应用起作用。用户可以通过点击的方式开启或者关闭某个目标应用的小窗授权开关71,当小窗授权开关71被开启时,终端设备对这个目标应用允许以小窗的形式生成第一授权界面,当小窗授权开关被关闭时,终端设备对这个不允许以小窗的形式生成第一授权界面。FIG. 11 is a schematic diagram of a small window authorization switch implemented by a non-global switch provided in the embodiment of the present application. As shown in Figure 11, the small window authorization switch 71 can be located in the application information page 74, and the application information page 74 of each target application can include a small window authorization switch 71, and each small window authorization switch 71 only corresponds to it One of the target apps works. The user can turn on or off the small window authorization switch 71 of a certain target application by clicking. When the small window authorization switch 71 is turned on, the terminal device allows the target application to generate the first authorization interface in the form of a small window. When the window authorization switch is turned off, the terminal device is not allowed to generate the first authorization interface in the form of a small window.
在一种实现方式中,当终端设备提供小窗授权开关时,本申请实施例的应用授权方法还可以包含判断是否允许小窗授权的过程。In an implementation manner, when the terminal device provides a widget authorization switch, the application authorization method in the embodiment of the present application may further include a process of judging whether widget authorization is allowed.
图12是本申请实施例提供的应用授权方法的另一个流程图。如图12所示,以目标应用启动场景为例,包含是否允许小窗授权的判断过程的应用授权方法可以包括以下步骤:Fig. 12 is another flow chart of the application authorization method provided by the embodiment of the present application. As shown in Figure 12, taking the target application startup scenario as an example, the application authorization method including the process of judging whether to allow widget authorization may include the following steps:
步骤S301,终端设备在目标应用启动时,判断是否需要跳转到应用信息页。In step S301, the terminal device determines whether to jump to the application information page when the target application is started.
具体实现中,终端设备在请求某个权限被拒绝时,可以生成如图5中的a引导界面。如果终端设备允许从目标应用直接跳转到应用信息页,并且检测到了用户点击了引导界面中的“设置”按钮,则确定需要跳转到应用信息页,此时终端设备执行步骤S302;如果终端设备不允许从目标应用直接跳转到应用信息页,或者检测到了用户点击了引导界面中的“取消”按钮,则结束方法流程。In a specific implementation, when the terminal device requests for a certain permission and is rejected, it may generate a guidance interface as shown in FIG. 5 . If the terminal device allows direct jumping to the application information page from the target application, and it is detected that the user clicks the "Settings" button in the guidance interface, then it is determined that a jump to the application information page is required, and the terminal device executes step S302; if the terminal If the device does not allow direct jumping from the target application to the application information page, or detects that the user clicks the "Cancel" button on the guidance interface, the method flow ends.
步骤S302,终端设备判断目标应用是否允许小窗授权。Step S302, the terminal device judges whether the target application allows widget authorization.
具体实现中,终端设备可以根据全局的小窗授权开关或者该目标应用的非全局的小窗授权开关的状态来判断对于该目标应用是否允许小窗授权。如果小窗授权开关被开启,则表示允许小窗授权,此时终端设备执行步骤S303-步骤S304。如果小窗授权开关被关闭,则表示不允许小窗授权,此时终端设备执行步骤S305。In a specific implementation, the terminal device may determine whether to allow widget authorization for the target application according to the status of the global widget authorization switch or the non-global widget authorization switch of the target application. If the small window authorization switch is turned on, it means that the small window authorization is allowed. At this time, the terminal device executes steps S303-S304. If the small window authorization switch is turned off, it means that the small window authorization is not allowed, and at this time, the terminal device executes step S305.
步骤S303,终端设备获取与目标应用所请求的权限相对应的第一授权界面。Step S303, the terminal device acquires a first authorization interface corresponding to the permission requested by the target application.
具体实现中,终端设备可以获取目标应用的应用标识和请求的权限名称然后,根据已获得的应用标识和权限名称对目标应用的应用信息页进行检索,以找到应用标识和权限名称对应的第一授权界面。终端设备执行步骤S303的整个过程不会在显示屏中体现,用户不会感知到这一过程。步骤S303其他未具体展开的内容请参照本申请实施例的步骤S101-步骤S102实现,此处不再赘述。In a specific implementation, the terminal device can obtain the application ID of the target application and the requested permission name, and then search the application information page of the target application according to the obtained application ID and permission name to find the first application ID corresponding to the permission name. Authorization interface. The whole process of executing step S303 by the terminal device will not be displayed on the display screen, and the user will not perceive this process. Please refer to step S101-step S102 in the embodiment of the present application for other contents of step S303 that are not specifically expanded, and will not be repeated here.
步骤S304,终端设备将第一授权界面以小窗的形式在显示屏中显示。Step S304, the terminal device displays the first authorization interface in the form of a small window on the display screen.
步骤S304具体可以参照本申请实施例的步骤S103实现,此处不再赘述。Step S304 can be specifically implemented with reference to step S103 in the embodiment of the present application, and details are not repeated here.
接下来,在用户点击了授权界面中的任意一个选项时,终端设备响应于用户的点击操作,刷新界面以关闭小窗,同时将用户点击操作对应的授权结果更新在系统的权限配置中,并且重新启动目标应用。Next, when the user clicks any option in the authorization interface, the terminal device responds to the user's click operation, refreshes the interface to close the small window, and at the same time updates the authorization result corresponding to the user click operation in the system permission configuration, and Restart the target application.
步骤S305,终端设备跳转至应用信息页。Step S305, the terminal device jumps to the application information page.
上述本申请提供的实施例对本申请提供的应用授权方法的各方案进行了介绍。可以理解的是,终端设备为了实现上述功能,其可以包含执行各个功能相应的软件模块。The above-mentioned embodiments provided by this application introduce various solutions of the application authorization method provided by this application. It can be understood that, in order to realize the above functions, the terminal device may include software modules corresponding to each function.
图13是本申请实施例示出的终端设备的软件模块的示意图。如图13所示,在Android系统中,用于执行本申请实施例的应用授权方法所涉及的软件模块至少可以包括操作系统的设置应用、权限控制器、系统用户界面主进程system_UI和正在请求权限的目标应用。Fig. 13 is a schematic diagram of software modules of a terminal device shown in an embodiment of the present application. As shown in FIG. 13 , in the Android system, the software modules involved in performing the application authorization method of the embodiment of the present application may at least include the setting application of the operating system, the permission controller, the system user interface main process system_UI and the requesting permission target application.
其中,设置应用、权限控制器、system_UI和目标应用均位于Android系统的应用层,不同之处在于,设置应用、权限控制器、system_UI属于Android系统的系统级应用,权限较高,而目标应用则属于非系统级应用,权限较低。另外,Android系统还包括应用框架层、系统运行库层、硬件抽象层和Linux内核层,上述层级结构属于Android系统的常规结构,本申请实施例对此不做限定。Among them, the setting application, the permission controller, system_UI and the target application are all located in the application layer of the Android system. It is a non-system-level application with low permissions. In addition, the Android system also includes an application framework layer, a system runtime layer, a hardware abstraction layer, and a Linux kernel layer. The above-mentioned hierarchical structure belongs to the conventional structure of the Android system, which is not limited in the embodiments of the present application.
图14是本申请实施例提供的应用授权方法在软件层面实现的一个示意图。Fig. 14 is a schematic diagram of the implementation of the application authorization method provided by the embodiment of the present application at the software level.
如图14所示,在一种实现方式中,本申请实施例提供的应用授权方法在软件层面至少包括以下步骤实现:As shown in Figure 14, in an implementation manner, the application authorization method provided by the embodiment of the present application includes at least the following steps at the software level:
步骤S401,设置应用从目标应用内启动时,获取目标应用的应用标识和请求的权限名称。Step S401, when the setting application is started from the target application, obtain the application identification of the target application and the requested permission name.
结合图2和图3所示,在本申请实施例中,设置应用从目标应用内启动可以包括以下两种场景:在场景A中,当用户点击引导界面中的转至“设置”按钮时,设置应用会从目标应用内启动;在场景B中,当用户点击第二授权界面中的“在“设置”中允许”按钮时,设置应用会从目标应用内启动。As shown in FIG. 2 and FIG. 3 , in the embodiment of the present application, launching the setting application from the target application may include the following two scenarios: In scenario A, when the user clicks the Go to "Settings" button in the guidance interface, The setting application will be launched from the target application; in scenario B, when the user clicks the "Allow in "Settings" button in the second authorization interface, the setting application will be launched from the target application.
这里需要补充说明的是,设置应用被目标应用启动后,终端设备会继续停留在目标应用的用户界面,不会从目标应用的用户界面跳转到设置应用的用户界面。因此设置应用执行步骤S402和步骤S403都是在后台进行的。What needs to be added here is that after the setting application is started by the target application, the terminal device will continue to stay on the user interface of the target application, and will not jump from the user interface of the target application to the user interface of the setting application. Therefore, the setting application performs step S402 and step S403 in the background.
步骤S402,设置应用将目标应用的应用标识和请求的权限名称发送给权限控制器。Step S402, the setting application sends the application identifier of the target application and the requested permission name to the permission controller.
步骤S403,权限控制器根据目标应用的应用标识和请求的权限名称获取第一授权界面的视图资源,将视图资源发送给system_UI。Step S403, the permission controller obtains the view resource of the first authorization interface according to the application identifier of the target application and the requested permission name, and sends the view resource to system_UI.
步骤S404,system_UI根据视图资源在目标应用的上层以小窗的形式绘制授权界面,使授权界面以小窗的形式在显示屏中弹出显示。Step S404, the system_UI draws the authorization interface in the form of a small window on the upper layer of the target application according to the view resource, so that the authorization interface is popped up and displayed in the form of a small window on the display screen.
步骤S405,设置应用检测到用户点击了授权界面中的任一选项时,将相应的授权结果更新到权限控制器中。Step S405, when the setting application detects that the user has clicked any option in the authorization interface, it updates the corresponding authorization result to the authority controller.
这样,终端设备应用在重启之后再次请求权限时,能够从权限控制器中得到更新后的授权结果,从而根据更新后的授权结果执行基于权限的相应功能。In this way, when the terminal device application requests the permission again after restarting, it can obtain the updated authorization result from the permission controller, so as to execute the corresponding function based on the permission according to the updated authorization result.
步骤S406,system_UI刷新用户界面以关闭小窗。Step S406, system_UI refreshes the user interface to close the small window.
图15是本申请实施例提供的应用授权方法在软件层面实现的另一个示意图。Fig. 15 is another schematic diagram of the implementation of the application authorization method provided by the embodiment of the present application at the software level.
如图15所示,在一种实现方式中,本申请实施例提供的应用授权方法在软件层面至少包括以下步骤实现:As shown in Figure 15, in an implementation manner, the application authorization method provided by the embodiment of the present application includes at least the following steps at the software level:
步骤S501,设置应用从目标应用内启动时,获取目标应用的应用标识和请求的权限名称。Step S501 , when the setting application is started from the target application, the application identifier and the requested permission name of the target application are acquired.
步骤S501与步骤S401相同,此处不再赘述。Step S501 is the same as step S401 and will not be repeated here.
步骤S502,将目标应用的应用标识和请求的权限名称发送给权限控制器。Step S502, sending the application identifier of the target application and the requested permission name to the permission controller.
步骤S503,权限控制器根据目标应用的应用标识和请求的权限名称获取第一授权界面的视图资源,将视图资源发送给设置应用。Step S503, the authority controller obtains the view resource of the first authorization interface according to the application identifier of the target application and the requested authority name, and sends the view resource to the setting application.
步骤S504,设置应用将授权界面发送给system_UI。Step S504, the setting application sends the authorization interface to system_UI.
这里需要说明的是,在图14示出的实现方式中,权限控制器在获取到第一授权界面的视图资源之后,直接将视图资源发送给system_UI,而在图15示出的实现方式中,权限控制器在获取到第一授权界面的视图资源之后,将视图资源发送给设置应用,由设置应用将视图资源发送给system_UI。可见对于视图资源如何发送给system_UI,可以有不同的方式实现,本申请实施例对此不做限定。What needs to be explained here is that in the implementation shown in FIG. 14 , after obtaining the view resource of the first authorization interface, the permission controller directly sends the view resource to system_UI, while in the implementation shown in FIG. 15 , After obtaining the view resource of the first authorization interface, the authority controller sends the view resource to the setting application, and the setting application sends the view resource to the system_UI. It can be seen that how to send view resources to system_UI can be implemented in different ways, which is not limited in this embodiment of the present application.
步骤S505,system_UI在目标应用的上层以小窗的形式绘制授权界面,使授权界面以小窗的形式在显示屏中弹出显示。Step S505, the system_UI draws the authorization interface in the form of a small window on the upper layer of the target application, so that the authorization interface is popped up in the display screen in the form of a small window.
步骤S506,设置应用检测到用户点击了授权界面中的任一选项时,将相应的授权结果更新到目标应用的权限配置中。Step S506, when the setting application detects that the user has clicked any option in the authorization interface, it updates the corresponding authorization result into the permission configuration of the target application.
这样,终端设备应用在重启之后再次请求权限时,能够从权限控制器中得到更新后的授权结果,从而根据更新后的授权结果执行基于权限的相应功能。In this way, when the terminal device application requests the permission again after restarting, it can obtain the updated authorization result from the permission controller, so as to execute the corresponding function based on the permission according to the updated authorization result.
步骤S507,system_UI刷新用户界面以关闭小窗。Step S507, system_UI refreshes the user interface to close the small window.
上述本申请提供的实施例对本申请提供的应用授权方法的各方案进行了介绍。可以理解的是,终端设备为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。The above-mentioned embodiments provided by this application introduce various solutions of the application authorization method provided by this application. It can be understood that, in order to realize the above functions, the terminal device includes hardware structures and/or software modules corresponding to each function. Those skilled in the art should easily realize that the present application can be implemented in the form of hardware or a combination of hardware and computer software in combination with the units and algorithm steps of each example described in the embodiments disclosed herein. Whether a certain function is executed by hardware or computer software drives hardware depends on the specific application and design constraints of the technical solution. Skilled artisans may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the present application.
图16是本申请实施例提供的一种应用授权装置的结构示意图。在一个实施例中,终端设备可以通过图16所示的硬件装置实现相应的功能。如图16所示,该应用授权装置可以包括:触控屏601、存储器602和处理器603。Fig. 16 is a schematic structural diagram of an application authorization device provided by an embodiment of the present application. In an embodiment, the terminal device may implement corresponding functions through the hardware device shown in FIG. 16 . As shown in FIG. 16 , the application authorization device may include: a touch screen 601 , a memory 602 and a processor 603 .
在一个实施例中,触控屏601可以包括显示屏和触摸传感器,其中,显示屏用于显示图像,触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型,通过显示屏提供与触摸操作相关的视觉输出。处理器603可以包括一个或多个处理单元,例如:处理器603可以包括应用处理器,调制解调处理器,图形处理器,图像信号处理器,控制器,视频编解码器,数字信号处理器,基带处理器,和/或神经网络处理器等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。存储器602与处理器603耦合,用于存储各种软件程序和/或多组指令,存储器602可包括易失性存储器和/或非易失性存储器。In one embodiment, the touch screen 601 may include a display screen and a touch sensor, wherein the display screen is used to display images, and the touch sensor may transmit the detected touch operation to the application processor to determine the type of the touch event. The screen provides visual output related to touch operations. The processor 603 may include one or more processing units, for example: the processor 603 may include an application processor, a modem processor, a graphics processor, an image signal processor, a controller, a video codec, a digital signal processor , baseband processor, and/or neural network processor, etc. Wherein, different processing units may be independent devices, or may be integrated in one or more processors. The memory 602 is coupled with the processor 603 for storing various software programs and/or multiple sets of instructions, and the memory 602 may include volatile memory and/or non-volatile memory.
当存储器602中的软件程序和/或多组指令被处理器603执行时,使得终端设备实现如下方法步骤:在第一应用请求第一权限时,响应于用户在第一应用的第一点击操作,获取第一应用的应用标识和第一权限的权限名称,第一点击操作用于指示跳转至第二应用,第二应用用于设置第一应用的权限;确定应用标识和权限名称对应的第一授权界面的视图资源,第一授权界面包括第一权限的多个授权选项;根据视图资源在第一应用的界面上层生成第一授权界面。这样,当需要从第一应用跳转至第二应用,以在第二应用中对第一应用进行权限设置时,终端设备可以不执行跳转,而是直接根据第一应用的应用标识和请求的权限名称获取相应的第一授权界面的视图资源,然后直接在第一应用的界面上层生成第一授权界面,从而避免了用户在第二应用中执行繁琐的授权操作,简化授权流程,提升用户使用体验。When the software program and/or multiple sets of instructions in the memory 602 are executed by the processor 603, the terminal device is made to implement the following method steps: when the first application requests the first permission, responding to the user's first click operation on the first application , to obtain the application ID of the first application and the permission name of the first permission, the first click operation is used to indicate to jump to the second application, and the second application is used to set the permission of the first application; determine the corresponding application ID and permission name The view resource of the first authorization interface, the first authorization interface includes multiple authorization options of the first authority; the first authorization interface is generated on the upper layer of the interface of the first application according to the view resource. In this way, when it is necessary to jump from the first application to the second application to set the permission of the first application in the second application, the terminal device may not execute the jump, but directly according to the application identification and request of the first application Obtain the view resources of the corresponding first authorization interface, and then directly generate the first authorization interface on the upper layer of the interface of the first application, thereby avoiding the user from performing cumbersome authorization operations in the second application, simplifying the authorization process, and improving the user experience. Use experience.
在一种实现方式中,第一应用包括第一引导界面,第一引导界面在第一应用在先请求第一权限被拒绝的情况下生成的,第一引导界面包括跳转选项,第一点击操作包括用户点击跳 转选项的操作。这样,在第一应用在线请求第一权限被拒绝的情况下,用户不需要在第二应用中执行繁琐的授权操作,简化授权流程,提升用户使用体验。In one implementation, the first application includes a first guide interface, the first guide interface is generated when the first application's previous request for the first permission is rejected, the first guide interface includes a jump option, and the first click Actions include actions where the user clicks on a jump option. In this way, when the online request of the first application for the first permission is rejected, the user does not need to perform cumbersome authorization operations in the second application, which simplifies the authorization process and improves user experience.
在一种实现方式中,第一应用包括第二授权界面,第二授权界面是在第一应用在先请求第一权限未被拒绝的情况下生成的,第二授权界面包括跳转选项和第一权限的多个授权选项,第一点击操作包括用户点击跳转选项的操作。这样,在第一应用在线请求第一权限未被拒绝的情况下,用户不需要在第二应用中执行繁琐的授权操作,简化授权流程,提升用户使用体验。In one implementation, the first application includes a second authorization interface, the second authorization interface is generated when the first application's previous request for the first permission is not rejected, and the second authorization interface includes a jump option and a second authorization interface. Multiple authorization options for one permission, the first click operation includes the operation of the user clicking the jump option. In this way, when the online request of the first application for the first permission is not rejected, the user does not need to perform cumbersome authorization operations in the second application, which simplifies the authorization process and improves user experience.
在一种实现方式中,第一授权界面中的多个授权选项与第二授权界面中的多个授权选项部分不同或者全部不同。这样,如果想要授予的权限不在第二授权界面中,则可以通过点击第二授权界面的跳转选项的方式打开第一授权界面,在第一授权界面中完成授权。In an implementation manner, the multiple authorization options in the first authorization interface are partly or completely different from the multiple authorization options in the second authorization interface. In this way, if the permission to be granted is not in the second authorization interface, the first authorization interface can be opened by clicking the jump option on the second authorization interface, and the authorization is completed in the first authorization interface.
在一种实现方式中,当软件程序和/或多组指令被处理器603执行时,使得终端设备具体实现如下方法步骤:根据视图资源以窗口的形式在第一应用的界面上层生成第一授权界面,窗口的高度小于显示屏的高度,窗口的宽度小于显示屏的宽度。这样,第一授权界面可以在第一应用的界面上层以小窗的形式展示,不影响用户在授权的同时查看第一应用的界面信息。In one implementation, when the software program and/or multiple sets of instructions are executed by the processor 603, the terminal device is made to specifically implement the following method steps: generate the first authorization on the upper layer of the interface of the first application in the form of a window according to the view resource In the interface, the height of the window is smaller than the height of the display screen, and the width of the window is smaller than the width of the display screen. In this way, the first authorization interface can be displayed in the form of a small window on the upper layer of the interface of the first application, without affecting the user's viewing of the interface information of the first application while authorizing.
在一种实现方式中,第二应用包括第一授权开关,当软件程序和/或多组指令被处理器603执行时,使得具体实现如下方法步骤:响应于用户的第一点击操作,获取第一授权开关的状态;当第一授权开关为开启状态时,获取应用标识和权限名称;当第一授权开关为关闭状态时,从第一应用跳转至第二应用。这样,终端设备允许用户选择是否跳转至第二应用对第一应用进行权限设置。In one implementation, the second application includes a first authorization switch. When the software program and/or multiple sets of instructions are executed by the processor 603, the following method steps are specifically implemented: in response to the user's first click operation, obtain the second A state of the authorization switch; when the first authorization switch is on, obtain the application ID and permission name; when the first authorization switch is off, jump from the first application to the second application. In this way, the terminal device allows the user to choose whether to jump to the second application to set the permission of the first application.
在一种实现方式中,软件程序和/或多组指令包括权限管理器,当软件程序和/或多组指令被处理器603执行时,使得终端设备具体实现如下方法步骤:权限管理器从第二应用获取应用标识和权限名称;权限管理器根据应用标识和权限名称确定视图资源。In one implementation, the software program and/or multiple sets of instructions include a rights manager, and when the software program and/or multiple sets of instructions are executed by the processor 603, the terminal device specifically implements the following method steps: the rights manager starts from the first The second application obtains the application ID and permission name; the permission manager determines the view resource according to the application ID and permission name.
在一种实现方式中,软件程序和/或多组指令包括权限管理器和系统用户界面system_UI进程,当软件程序和/或多组指令被处理器603执行时,使得终端设备具体实现如下方法步骤:权限管理器将视图资源发送给system_UI进程;system_UI进程根据视图资源在第一应用的界面上层绘制第一授权界面。In one implementation, the software program and/or multiple sets of instructions include a rights manager and a system user interface system_UI process. When the software program and/or multiple sets of instructions are executed by the processor 603, the terminal device specifically implements the following method steps : The permission manager sends the view resource to the system_UI process; the system_UI process draws the first authorization interface on the upper layer of the interface of the first application according to the view resource.
在一种实现方式中,软件程序和/或多组指令包括权限管理器和system_UI进程,当软件程序和/或多组指令被处理器603执行时,使得终端设备具体实现如下方法步骤:权限管理器将视图资源发送给第二应用;第二应用将视图资源发送给终端设备的系统用户界面system_UI进程;system_UI进程根据视图资源在第一应用的界面上层绘制第一授权界面。In one implementation, the software program and/or multiple sets of instructions include a rights manager and a system_UI process. When the software program and/or multiple sets of instructions are executed by the processor 603, the terminal device specifically implements the following method steps: rights management The controller sends the view resource to the second application; the second application sends the view resource to the system user interface system_UI process of the terminal device; the system_UI process draws the first authorization interface on the upper layer of the interface of the first application according to the view resource.
在一种实现方式中,当软件程序和/或多组指令被处理器603执行时,还使得终端设备实现如下方法步骤:检测到用户点击第一授权界面中的任一授权选项时,将相应的授权结果更新到权限管理器中,以使得第一应用再次请求第一权限时,从权限管理器中获取授权结果。In one implementation, when the software program and/or multiple sets of instructions are executed by the processor 603, the terminal device is further made to implement the following method steps: when detecting that the user clicks on any authorization option in the first authorization interface, the corresponding The authorization result of is updated to the permission manager, so that when the first application requests the first permission again, the authorization result is obtained from the permission manager.
在一种实现方式中,第一权限包括定位权限;第一应用至少包括地图类应用、运动轨迹记录类应用、打车类应用;第二应用包括终端设备操作系统的设置应用;第一授权界面的大小小于第一应用的界面的大小。In one implementation, the first permission includes positioning permission; the first application includes at least a map application, a motion track recording application, and a taxi application; the second application includes a terminal device operating system setting application; the first authorization interface The size is smaller than the size of the interface of the first application.
图17是本申请实施例提供的另一种应用授权装置的结构示意图。在一个实施例中,终端设备可以通过图17所示的软件装置实现相应的功能。如图17所示,该应用授权装置可以包括:设置模块701、显示模块702和权限控制模块703。其中:FIG. 17 is a schematic structural diagram of another application authorization device provided by an embodiment of the present application. In an embodiment, the terminal device can implement corresponding functions through the software device shown in FIG. 17 . As shown in FIG. 17 , the application authorization device may include: a setting module 701 , a display module 702 and a permission control module 703 . in:
设置模块701,用于在第一应用请求第一权限时,响应于用户在第一应用的第一点击操 作,获取第一应用的应用标识和第一权限的权限名称,第一点击操作用于指示终端设备跳转至第二应用,第二应用用于设置第一应用的权限;设置模块701,还用于确定应用标识和权限名称对应的第一授权界面的视图资源,第一授权界面包括第一权限的多个授权选项;显示模块702,用于根据视图资源在第一应用的界面上层生成第一授权界面。这样,当需要从第一应用跳转至第二应用,以在第二应用中对第一应用进行权限设置时,终端设备可以不执行跳转,而是直接根据第一应用的应用标识和请求的权限名称获取相应的第一授权界面的视图资源,然后直接在第一应用的界面上层生成第一授权界面,从而避免了用户在第二应用中执行繁琐的授权操作,简化授权流程,提升用户使用体验。The setting module 701 is configured to obtain the application identifier of the first application and the permission name of the first permission in response to the first click operation of the user on the first application when the first application requests the first permission, and the first click operation is used to Instruct the terminal device to jump to the second application, the second application is used to set the authority of the first application; the setting module 701 is also used to determine the view resource of the first authorization interface corresponding to the application identification and the authority name, the first authorization interface includes A plurality of authorization options for the first permission; a display module 702 configured to generate a first authorization interface on the upper layer of the interface of the first application according to the view resource. In this way, when it is necessary to jump from the first application to the second application to set the permission of the first application in the second application, the terminal device may not execute the jump, but directly according to the application identification and request of the first application Obtain the view resources of the corresponding first authorization interface, and then directly generate the first authorization interface on the upper layer of the interface of the first application, thereby avoiding the user from performing cumbersome authorization operations in the second application, simplifying the authorization process, and improving the user experience. Use experience.
在一种实现方式中,第一应用包括第一引导界面,第一引导界面在第一应用在先请求第一权限被拒绝的情况下生成的,第一引导界面包括跳转选项,第一点击操作包括用户点击跳转选项的操作。这样,在第一应用在线请求第一权限被拒绝的情况下,用户不需要在第二应用中执行繁琐的授权操作,简化授权流程,提升用户使用体验。In one implementation, the first application includes a first guide interface, the first guide interface is generated when the first application's previous request for the first permission is rejected, the first guide interface includes a jump option, and the first click Actions include actions where the user clicks on a jump option. In this way, when the online request of the first application for the first permission is rejected, the user does not need to perform cumbersome authorization operations in the second application, which simplifies the authorization process and improves user experience.
在一种实现方式中,第一应用包括第二授权界面,第二授权界面是在第一应用在先请求第一权限未被拒绝的情况下生成的,第二授权界面包括跳转选项和第一权限的多个授权选项,第一点击操作包括用户点击跳转选项的操作。这样,在第一应用在线请求第一权限未被拒绝的情况下,用户不需要在第二应用中执行繁琐的授权操作,简化授权流程,提升用户使用体验。In one implementation, the first application includes a second authorization interface, the second authorization interface is generated when the first application's previous request for the first permission is not rejected, and the second authorization interface includes a jump option and a second authorization interface. Multiple authorization options for one permission, the first click operation includes the operation of the user clicking the jump option. In this way, when the online request of the first application for the first permission is not rejected, the user does not need to perform cumbersome authorization operations in the second application, which simplifies the authorization process and improves user experience.
在一种实现方式中,第一授权界面中的多个授权选项与第二授权界面中的多个授权选项部分不同或者全部不同。这样,如果想要授予的权限不在第二授权界面中,则可以通过点击第二授权界面的跳转选项的方式打开第一授权界面,在第一授权界面中完成授权。In an implementation manner, the multiple authorization options in the first authorization interface are partly or completely different from the multiple authorization options in the second authorization interface. In this way, if the permission to be granted is not in the second authorization interface, the first authorization interface can be opened by clicking the jump option on the second authorization interface, and the authorization is completed in the first authorization interface.
在一种实现方式中,显示模块702,用于根据视图资源以窗口的形式在第一应用的界面上层生成第一授权界面,窗口的高度小于显示屏的高度,窗口的宽度小于显示屏的宽度。这样,第一授权界面可以在第一应用的界面上层以小窗的形式展示,不影响用户在授权的同时查看第一应用的界面信息。In one implementation, the display module 702 is configured to generate the first authorization interface on the upper layer of the first application interface in the form of a window according to the view resource, the height of the window is smaller than the height of the display screen, and the width of the window is smaller than the width of the display screen . In this way, the first authorization interface can be displayed in the form of a small window on the upper layer of the interface of the first application, without affecting the user's viewing of the interface information of the first application while authorizing.
在一种实现方式中,第二应用包括第一授权开关;设置模块701,用于响应于用户的第一点击操作,获取第一授权开关的状态;设置模块701,还用于当第一授权开关为开启状态时,获取应用标识和权限名称;设置模块701,还用于当第一授权开关为关闭状态时,从第一应用跳转至第二应用。这样,终端设备允许用户选择是否跳转至第二应用对第一应用进行权限设置。In one implementation, the second application includes a first authorization switch; the setting module 701 is configured to acquire the state of the first authorization switch in response to the user's first click operation; the setting module 701 is also configured to When the switch is in the on state, obtain the application identification and permission name; the setting module 701 is also used to jump from the first application to the second application when the first authorization switch is in the off state. In this way, the terminal device allows the user to choose whether to jump to the second application to set the permission of the first application.
在一种实现方式中,权限控制模块703,用于从设置模块701获取应用标识和权限名称;权限控制模块703,用于根据应用标识和权限名称确定视图资源。In one implementation manner, the permission control module 703 is configured to obtain the application identifier and the permission name from the setting module 701; the permission control module 703 is configured to determine the view resource according to the application identifier and the permission name.
在一种实现方式中,权限控制模块703,还用于将视图资源发送给显示模块702。In an implementation manner, the permission control module 703 is further configured to send the view resource to the display module 702 .
在一种实现方式中,权限控制模块703,还用于将视图资源发送给设置模块701;设置模块701,还用于将视图资源发送给显示模块702。In one implementation manner, the permission control module 703 is further configured to send the view resource to the setting module 701 ; the setting module 701 is further configured to send the view resource to the display module 702 .
在一种实现方式中,权限控制模块703,还用于当测到用户点击第一授权界面中的任一授权选项时,更新相应的授权结果,以使得第一应用再次请求第一权限时,从权限控制模块703中获取授权结果。In one implementation, the permission control module 703 is further configured to update the corresponding authorization result when it is detected that the user clicks any authorization option in the first authorization interface, so that when the first application requests the first permission again, Obtain the authorization result from the authority control module 703 .
在一种实现方式中,第一权限包括定位权限;第一应用至少包括地图类应用、运动轨迹记录类应用、打车类应用;第二应用包括终端设备操作系统的设置应用;第一授权界面的大小小于所述第一应用的界面的大小。In one implementation, the first permission includes positioning permission; the first application includes at least a map application, a motion track recording application, and a taxi application; the second application includes a terminal device operating system setting application; the first authorization interface The size is smaller than the size of the interface of the first application.
本申请实施例还提供一种计算机可读存储介质,该计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述各方面的方法。The embodiment of the present application also provides a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium is run on a computer, it causes the computer to execute the above-mentioned methods.
本申请实施例还提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述各方面的方法。The embodiment of the present application also provides a computer program product containing instructions, which, when run on a computer, causes the computer to execute the methods in the above aspects.
本申请实施例还提供了一种芯片系统,图18为该芯片系统的结构示意图。该芯片系统包括处理器801,用于支持上述装置实现上述方面中所涉及的功能,例如,生成或处理上述方法中所涉及的信息。在一种可能的设计中,芯片系统还包括存储器802,用于保存隐私信息生成装置必要的计算机指令803和数据。该芯片系统,可以由芯片构成,也可以包含芯片和其他分立器件。The embodiment of the present application also provides a chip system, and FIG. 18 is a schematic structural diagram of the chip system. The system-on-a-chip includes a processor 801 configured to support the above-mentioned device to implement the functions involved in the above-mentioned aspect, for example, generate or process the information involved in the above-mentioned method. In a possible design, the chip system further includes a memory 802 for storing necessary computer instructions 803 and data of the private information generating device. The system-on-a-chip may consist of chips, or may include chips and other discrete devices.
以上的具体实施方式,对本申请实施例的目的、技术方案和有益效果进行了进一步详细说明,所应理解的是,以上仅为本申请实施例的具体实施方式而已,并不用于限定本申请实施例的保护范围,凡在本申请实施例的技术方案的基础之上,所做的任何修改、等同替换、改进等,均应包括在本申请实施例的保护范围之内。The above specific implementation manners have further described the purpose, technical solutions and beneficial effects of the embodiments of the present application in detail. It should be understood that the above is only the specific implementation manners of the embodiments of the present application, and is not intended to limit the implementation of the present application. For the scope of protection of the examples, any modifications, equivalent replacements, improvements, etc. made on the basis of the technical solutions of the embodiments of the present application shall be included in the scope of protection of the embodiments of the present application.

Claims (26)

  1. 一种应用授权方法,其特征在于,包括:An application authorization method, characterized by comprising:
    终端设备在第一应用请求第一权限时,响应于用户在所述第一应用的第一点击操作,获取所述第一应用的应用标识和所述第一权限的权限名称,所述第一点击操作用于指示所述终端设备跳转至第二应用,所述第二应用用于设置所述第一应用的权限;When the first application requests the first permission, the terminal device acquires the application identifier of the first application and the permission name of the first permission in response to the user's first click operation on the first application, and the first The click operation is used to instruct the terminal device to jump to a second application, and the second application is used to set the permission of the first application;
    所述终端设备确定所述应用标识和所述权限名称对应的第一授权界面的视图资源,所述第一授权界面包括所述第一权限的多个授权选项;The terminal device determines a view resource of a first authorization interface corresponding to the application identifier and the authorization name, where the first authorization interface includes multiple authorization options for the first authorization;
    所述终端设备根据所述视图资源在所述第一应用的界面上层生成所述第一授权界面。The terminal device generates the first authorization interface on an upper layer of the interface of the first application according to the view resource.
  2. 根据权利要求1所述的方法,其特征在于,The method according to claim 1, characterized in that,
    所述第一应用包括第一引导界面,所述第一引导界面在所述第一应用在先请求所述第一权限被拒绝的情况下生成的,所述第一引导界面包括跳转选项,所述第一点击操作包括所述用户点击所述跳转选项的操作。The first application includes a first guide interface, the first guide interface is generated when the first application's previous request for the first permission is rejected, the first guide interface includes a jump option, The first click operation includes an operation in which the user clicks the jump option.
  3. 根据权利要求1所述的方法,其特征在于,The method according to claim 1, characterized in that,
    所述第一应用包括第二授权界面,所述第二授权界面是在所述第一应用在先请求所述第一权限未被拒绝的情况下生成的,所述第二授权界面包括跳转选项和所述第一权限的多个授权选项,所述第一点击操作包括所述用户点击所述跳转选项的操作。The first application includes a second authorization interface, the second authorization interface is generated when the first application's previous request for the first permission is not rejected, and the second authorization interface includes a jump option and multiple authorization options of the first permission, the first click operation includes the user clicking the jump option.
  4. 根据权利要求3所述的方法,其特征在于,The method according to claim 3, characterized in that,
    所述第一授权界面中的多个授权选项与所述第二授权界面中的多个授权选项部分不同或者全部不同。The multiple authorization options in the first authorization interface are partly or completely different from the multiple authorization options in the second authorization interface.
  5. 根据权利要求1-4任一项所述的方法,其特征在于,所述终端设备根据所述视图资源在所述第一应用的界面上层生成所述第一授权界面,包括:The method according to any one of claims 1-4, wherein the terminal device generates the first authorization interface on the upper layer of the interface of the first application according to the view resource, including:
    所述终端设备根据所述视图资源以窗口的形式在所述第一应用的界面上层生成所述第一授权界面,所述窗口的高度小于所述终端设备的显示屏的高度,所述窗口的宽度小于所述显示屏的宽度。The terminal device generates the first authorization interface on the upper layer of the first application interface in the form of a window according to the view resource, the height of the window is smaller than the height of the display screen of the terminal device, and the height of the window is The width is less than the width of the display screen.
  6. 根据权利要求1-5任一项所述的方法,其特征在于,所述第二应用包括第一授权开关,所述终端设备响应于用户的第一点击操作,获取所述第一应用的应用标识和所述第一权限的权限名称,包括:The method according to any one of claims 1-5, wherein the second application includes a first authorization switch, and the terminal device acquires the application of the first application in response to the user's first click operation ID and authority name of the first authority, including:
    所述终端设备响应于用户的第一点击操作,获取所述第一授权开关的状态;The terminal device acquires the state of the first authorization switch in response to the user's first click operation;
    当所述第一授权开关为开启状态时,所述终端设备获取所述应用标识和所述权限名称;When the first authorization switch is turned on, the terminal device acquires the application identifier and the authorization name;
    当所述第一授权开关为关闭状态时,所述终端设备从所述第一应用跳转至所述第二应用。When the first authorization switch is in the off state, the terminal device jumps from the first application to the second application.
  7. 根据权利要求1-6任一项所述的方法,其特征在于,所述终端设备包括权限管理器,所述终端设备获取所述应用标识和所述权限名称对应的第一授权界面的视图资源,包括:The method according to any one of claims 1-6, wherein the terminal device includes a permission manager, and the terminal device obtains the view resource of the first authorization interface corresponding to the application identifier and the permission name ,include:
    所述权限管理器从所述第二应用获取所述应用标识和所述权限名称;The permission manager acquires the application identifier and the permission name from the second application;
    所述权限管理器根据所述应用标识和所述权限名称确定所述视图资源。The permission manager determines the view resource according to the application identifier and the permission name.
  8. 根据权利要求7所述的方法,其特征在于,所述终端设备根据所述视图资源在所述第一应用的界面上层生成所述第一授权界面,包括:The method according to claim 7, wherein the terminal device generates the first authorization interface on the upper layer of the interface of the first application according to the view resource, comprising:
    所述权限管理器将所述视图资源发送给所述终端设备的系统用户界面system_UI进程;The permission manager sends the view resource to the system user interface system_UI process of the terminal device;
    所述system_UI进程根据所述视图资源在所述第一应用的界面上层绘制所述第一授权界面。The system_UI process draws the first authorization interface on an upper layer of the interface of the first application according to the view resource.
  9. 根据权利要求7所述的方法,其特征在于,所述终端设备根据所述视图资源在所述第一应用的界面上层生成所述第一授权界面,包括:The method according to claim 7, wherein the terminal device generates the first authorization interface on the upper layer of the interface of the first application according to the view resource, comprising:
    所述权限管理器将所述视图资源发送给所述第二应用;The permission manager sends the view resource to the second application;
    所述第二应用将所述视图资源发送给终端设备的系统用户界面system_UI进程;The second application sends the view resource to a system user interface system_UI process of the terminal device;
    所述system_UI进程根据所述视图资源在所述第一应用的界面上层绘制所述第一授权界面。The system_UI process draws the first authorization interface on an upper layer of the interface of the first application according to the view resource.
  10. 根据权利要求7-9任一项所述的方法,其特征在于,还包括:The method according to any one of claims 7-9, further comprising:
    所述终端设备检测到用户点击所述第一授权界面中的任一授权选项时,将相应的授权结果更新到所述权限管理器中,以使得所述第一应用再次请求所述第一权限时,从所述权限管理器中获取所述授权结果。When the terminal device detects that the user clicks any authorization option in the first authorization interface, it updates the corresponding authorization result to the authorization manager, so that the first application requests the first authorization again. , the authorization result is acquired from the authority manager.
  11. 根据权利要求1-10任一项所述的方法,其特征在于,所述方法包括以下中的一项或多项:The method according to any one of claims 1-10, wherein the method comprises one or more of the following:
    所述第一权限包括定位权限;The first permission includes positioning permission;
    所述第一应用至少包括地图类应用、运动轨迹记录类应用、打车类应用;The first application includes at least map applications, motion track recording applications, and taxi-hailing applications;
    所述第二应用包括终端设备操作系统的设置应用;The second application includes a setting application of the operating system of the terminal device;
    所述第一授权界面的大小小于所述第一应用的界面的大小。The size of the first authorization interface is smaller than the size of the interface of the first application.
  12. 一种应用授权装置,其特征在于,An application authorization device, characterized in that,
    设置模块,用于在第一应用请求第一权限时,响应于用户在所述第一应用的第一点击操作,获取所述第一应用的应用标识和所述第一权限的权限名称,所述第一点击操作用于指示所述终端设备跳转至第二应用,所述第二应用用于设置所述第一应用的权限;A setting module, configured to obtain the application identifier of the first application and the permission name of the first permission in response to the user's first click operation on the first application when the first application requests the first permission, The first click operation is used to instruct the terminal device to jump to a second application, and the second application is used to set the permission of the first application;
    所述设置模块,还用于确定所述应用标识和所述权限名称对应的第一授权界面的视图资源,所述第一授权界面包括所述第一权限的多个授权选项;The setting module is further configured to determine the view resources of the first authorization interface corresponding to the application identifier and the authorization name, the first authorization interface includes multiple authorization options for the first authorization;
    显示模块,用于根据所述视图资源在所述第一应用的界面上层生成所述第一授权界面。A display module, configured to generate the first authorization interface on an upper layer of the interface of the first application according to the view resource.
  13. 根据权利要求12所述的装置,其特征在于,The device according to claim 12, characterized in that,
    所述第一应用包括第一引导界面,所述第一引导界面在所述第一应用在先请求所述第一权限被拒绝的情况下生成的,所述第一引导界面包括跳转选项,所述第一点击操作包括所述用户点击所述跳转选项的操作。The first application includes a first guide interface, the first guide interface is generated when the first application's previous request for the first permission is rejected, the first guide interface includes a jump option, The first click operation includes an operation in which the user clicks the jump option.
  14. 根据权利要求13所述的装置,其特征在于,The device according to claim 13, characterized in that,
    所述第一应用包括第二授权界面,所述第二授权界面是在所述第一应用在先请求所述第一权限未被拒绝的情况下生成的,所述第二授权界面包括跳转选项和所述第一权限的多个授权选项,所述第一点击操作包括所述用户点击所述跳转选项的操作。The first application includes a second authorization interface, the second authorization interface is generated when the first application's previous request for the first permission is not rejected, and the second authorization interface includes a jump option and multiple authorization options of the first permission, the first click operation includes the user clicking the jump option.
  15. 根据权利要求13所述的装置,其特征在于,The device according to claim 13, characterized in that,
    所述第一授权界面中的多个授权选项与所述第二授权界面中的多个授权选项部分不同或者全部不同。The multiple authorization options in the first authorization interface are partly or completely different from the multiple authorization options in the second authorization interface.
  16. 根据权利要求12-15任一项所述的装置,其特征在于,The device according to any one of claims 12-15, characterized in that,
    所述显示模块,用于根据所述视图资源以窗口的形式在所述第一应用的界面上层生成所述第一授权界面,所述窗口的高度小于所述显示屏的高度,所述窗口的宽度小于所述显示屏的宽度。The display module is configured to generate the first authorization interface on the upper layer of the first application interface in the form of a window according to the view resource, the height of the window is smaller than the height of the display screen, and the height of the window is The width is less than the width of the display screen.
  17. 根据权利要求12-16任一项所述的装置,其特征在于,The device according to any one of claims 12-16, characterized in that,
    所述第二应用包括第一授权开关;the second application includes a first authorization switch;
    所述设置模块,用于响应于用户的第一点击操作,获取所述第一授权开关的状态;The setting module is configured to acquire the state of the first authorization switch in response to the user's first click operation;
    所述设置模块,还用于当所述第一授权开关为开启状态时,获取所述应用标识和所述权限名称;The setting module is further configured to acquire the application identifier and the permission name when the first authorization switch is turned on;
    所述设置模块,还用于当所述第一授权开关为关闭状态时,从所述第一应用跳转至所述第二应用。The setting module is further configured to jump from the first application to the second application when the first authorization switch is in the off state.
  18. 根据权利要求12-17任一项所述的装置,其特征在于,还包括:权限控制模块;The device according to any one of claims 12-17, further comprising: an authority control module;
    所述权限控制模块,用于从所述设置模块获取所述应用标识和所述权限名称;The permission control module is configured to obtain the application identifier and the permission name from the setting module;
    所述权限控制模块,用于根据所述应用标识和所述权限名称确定所述视图资源。The permission control module is configured to determine the view resource according to the application identifier and the permission name.
  19. 根据权利要求18所述的装置,其特征在于,The device according to claim 18, characterized in that,
    所述权限控制模块,还用于将所述视图资源发送给所述显示模块。The permission control module is further configured to send the view resource to the display module.
  20. 根据权利要求18所述的装置,其特征在于,The device according to claim 18, characterized in that,
    所述权限控制模块,还用于将所述视图资源发送给设置模块;The authority control module is further configured to send the view resource to a setting module;
    所述设置模块,还用于将所述视图资源发送给所述显示模块。The setting module is further configured to send the view resource to the display module.
  21. 根据权利要求18-20任一项所述的装置,其特征在于,The device according to any one of claims 18-20, characterized in that,
    所述权限控制模块,还用于当测到用户点击所述第一授权界面中的任一授权选项时,更新相应的授权结果,以使得所述第一应用再次请求所述第一权限时,从所述权限控制模块中获取所述授权结果。The permission control module is further configured to update the corresponding authorization result when it is detected that the user clicks any authorization option in the first authorization interface, so that when the first application requests the first permission again, Obtain the authorization result from the authority control module.
  22. 根据权利要求12-21任一项所述的装置,其特征在于,还包括以下至少一项:The device according to any one of claims 12-21, further comprising at least one of the following:
    所述第一权限包括定位权限;The first permission includes positioning permission;
    所述第一应用至少包括地图类应用、运动轨迹记录类应用、打车类应用;The first application includes at least map applications, motion track recording applications, and taxi-hailing applications;
    所述第二应用包括终端设备操作系统的设置应用;The second application includes a setting application of the operating system of the terminal device;
    所述第一授权界面的大小小于所述第一应用的界面的大小。The size of the first authorization interface is smaller than the size of the interface of the first application.
  23. 一种终端设备,其特征在于,包括:处理器、存储器和显示屏;所述存储器存储有程序指令,当所述程序指令被所述处理器执行时,使得所述终端设备执行权利要求1-11任一项所述的方法。A terminal device, characterized in that it includes: a processor, a memory, and a display screen; the memory stores program instructions, and when the program instructions are executed by the processor, the terminal device performs claim 1- 11. The method described in any one of the items.
  24. 一种芯片系统,其特征在于,包括:存储器和处理器;所述存储器存储有程序指令,当所述程序指令被所述处理器执行时,使得所述芯片系统执行权利要求1-11任一项所述的方法。A chip system, characterized in that it includes: a memory and a processor; the memory stores program instructions, and when the program instructions are executed by the processor, the chip system performs any one of claims 1-11. method described in the item.
  25. 一种计算机存储介质,其特征在于,所述计算机可读存储介质中存储有程序指令,当所述程序指令在计算机上运行时,使得计算机执行权利要求1-11任一项所述的方法。A computer storage medium, wherein program instructions are stored in the computer-readable storage medium, and when the program instructions are run on a computer, the computer is made to execute the method according to any one of claims 1-11.
  26. 一种计算机程序产品,其特征在于,当其在计算机上运行时,使得计算机执行权利要求1-11任一项所述的方法。A computer program product, characterized in that, when it is run on a computer, it causes the computer to execute the method described in any one of claims 1-11.
PCT/CN2022/075491 2021-06-30 2022-02-08 Application authorization method and apparatus, and terminal device WO2023273350A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110739596.7A CN113591106B (en) 2021-06-30 2021-06-30 Application authorization method and device and terminal equipment
CN202110739596.7 2021-06-30

Publications (1)

Publication Number Publication Date
WO2023273350A1 true WO2023273350A1 (en) 2023-01-05

Family

ID=78245380

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/075491 WO2023273350A1 (en) 2021-06-30 2022-02-08 Application authorization method and apparatus, and terminal device

Country Status (2)

Country Link
CN (1) CN113591106B (en)
WO (1) WO2023273350A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113591106B (en) * 2021-06-30 2022-10-18 荣耀终端有限公司 Application authorization method and device and terminal equipment
CN114416265A (en) * 2022-01-26 2022-04-29 北京得间科技有限公司 Interface authority display method, electronic equipment and storage medium
CN116150794B (en) * 2023-04-14 2023-07-04 深圳依时货拉拉科技有限公司 Authority processing method and device, electronic equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107943531A (en) * 2017-11-03 2018-04-20 珠海市君天电子科技有限公司 A kind of authority control method, user terminal, electronic equipment and storage medium
CN108920912A (en) * 2018-06-20 2018-11-30 北京金山安全软件有限公司 Authorization interface skipping method and device and electronic equipment
CN109241765A (en) * 2018-07-17 2019-01-18 奇酷互联网络科技(深圳)有限公司 Mobile terminal and the right management method of application program, device
CN111177710A (en) * 2019-12-31 2020-05-19 维沃移动通信有限公司 Application authorization method, electronic device and storage medium
CN112966257A (en) * 2021-05-18 2021-06-15 腾讯科技(深圳)有限公司 Authorization method and device for application program
CN113591106A (en) * 2021-06-30 2021-11-02 荣耀终端有限公司 Application authorization method and device and terminal equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10375078B2 (en) * 2016-10-10 2019-08-06 Visa International Service Association Rule management user interface

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107943531A (en) * 2017-11-03 2018-04-20 珠海市君天电子科技有限公司 A kind of authority control method, user terminal, electronic equipment and storage medium
CN108920912A (en) * 2018-06-20 2018-11-30 北京金山安全软件有限公司 Authorization interface skipping method and device and electronic equipment
CN109241765A (en) * 2018-07-17 2019-01-18 奇酷互联网络科技(深圳)有限公司 Mobile terminal and the right management method of application program, device
CN111177710A (en) * 2019-12-31 2020-05-19 维沃移动通信有限公司 Application authorization method, electronic device and storage medium
CN112966257A (en) * 2021-05-18 2021-06-15 腾讯科技(深圳)有限公司 Authorization method and device for application program
CN113591106A (en) * 2021-06-30 2021-11-02 荣耀终端有限公司 Application authorization method and device and terminal equipment

Also Published As

Publication number Publication date
CN113591106B (en) 2022-10-18
CN113591106A (en) 2021-11-02

Similar Documents

Publication Publication Date Title
WO2023273350A1 (en) Application authorization method and apparatus, and terminal device
EP3451641B1 (en) Mobile communication device with separate display areas and rearrangemet of icons in the edges areas.
US10725972B2 (en) Continuous and concurrent device experience in a multi-device ecosystem
EP3403178B1 (en) Identifiers across application instances
JP5865496B2 (en) Lock screen for accessing work environment on personal portable device
US8924970B2 (en) Sharing work environment information sources with personal environment applications
US7783702B2 (en) Using a mobile phone to control a personal computer
US10503459B2 (en) Method for sharing screen and electronic device thereof
US20140179377A1 (en) Mobile electronic device having program notification function and program notification method thereof
CN110990075B (en) Method, device, equipment and storage medium for starting fast application
KR102320151B1 (en) Electronic devcie for installing application and method for cotrolling thereof
KR20170096408A (en) Method for displaying application and electronic device supporting the same
KR20150037066A (en) Display method of electronic apparatus and electronic appparatus thereof
KR20160042739A (en) Method for sharing a display and electronic device thereof
US9990118B1 (en) Dynamic management and display of mobile application installation shortcuts
US20150126155A1 (en) Method for displaying lock screen and electronic device thereof
US20240086231A1 (en) Task migration system and method
JP2011175633A (en) Apparatus and method for processing information
WO2020224478A1 (en) Display method and device
JP2016110204A (en) Request transmission method, information processing apparatus, and program
US11604656B2 (en) Method and apparatus for managing application
CN112000932A (en) Mobile terminal and application control method thereof
JP7319431B2 (en) Application function implementation method and electronic device
JP5741136B2 (en) Control program, control program for portable terminal and virtual machine
CN115017473B (en) Authorization method and electronic equipment

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22831183

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE