Simulation position processing method, electronic equipment and storage medium

By detecting and recording the operating status of the simulated position function, the inaccurate positioning problem caused by improper use of the simulated position function is solved, ensuring the accurate positioning and normal operation of the position service application, and improving the user experience.

CN120050592APending Publication Date: 2025-05-27HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411994125.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-05-27

AI Technical Summary

Technical Problem

In the prior art, improper use of simulated position function may lead to inaccurate user positioning information, affect user experience, and lack effective processing methods to solve this problem.

Method used

By detecting operations for simulated position functions, recording operation status and storing them in core components, any application can extract accurate simulated position function status information. When the location service application is inaccurate, prompt information is generated based on the status information to remind the user that the inaccurate positioning is related to the simulated position function status.

Benefits of technology

Ensure that the location service application can accurately locate and work normally, solve the problem of inaccurate positioning by completely turning off the simulated position function, and improve the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120050592A_ABST
    Figure CN120050592A_ABST
Patent Text Reader

Abstract

The invention provides a simulation position processing method, electronic equipment and a storage medium, and relates to the field of positioning processing, and the method comprises the following steps: when an operation for a simulation position function is detected, recording an operation state in a core component; if it is found that positioning of the location service application is inaccurate, any application can extract accurate state information of the simulation location function from the core component, and prompt information is generated accordingly to remind a user that positioning inaccuracy of the location service application is related to the state of the simulation location function. And then the position service application can be ensured to be accurately positioned and normally work in a mode of thoroughly closing the position simulation function.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of location processing, and particularly to a method for processing simulated locations, an electronic device, and a storage medium. Background Art

[0002] With the popularization of electronic devices and the rapid development of mobile applications, users' personalized demands for the functions of electronic devices are increasing day by day. Among them, the simulated location function is favored by many users due to its application value in specific scenarios. Users can use this simulated location function to simulate their geographical locations in specific applications to meet their usage requirements.

[0003] However, if the simulated location function is used improperly, it may lead to inaccurate actual location information of the user, thereby affecting the user experience. Therefore, there is an urgent need to develop a new processing method to effectively solve this problem. Summary of the Invention

[0004] The present application provides a method for processing simulated locations, an electronic device, and a storage medium. When an operation on the simulated location function is detected, the operation state is recorded in the core component, and any application can extract the accurate state information of the simulated location function from the core component. In the case where the positioning of the location service application is inaccurate, a prompt message can be generated according to the state information to remind the user that the inaccurate positioning of the location service application is related to the state of the simulated location function.

[0005] To achieve the above object, the present application adopts the following technical solutions:

[0006] In a first aspect, a method for processing simulated locations is provided. The method for processing simulated locations includes: detecting a first operation on the simulated location function in the settings application; responding to the first operation and storing the operation result of the first operation through the core component; detecting that the positioning of the location service application is inaccurate; determining the state information of the simulated location function based on the operation result stored in the core component; generating a first prompt message according to the state information; the first prompt message is used to indicate the correlation between the inaccurate positioning of the location service application and the state information.

[0007] Optionally, the first operation includes an operation to turn on the simulated location function and an operation to select a target application to use the simulated location function.

[0008] Optionally, the state information includes the on / off state of the simulated location function and the identification information of the target application.

[0009] Optionally, the core component includes a ContentProvider component.

[0010] In this implementation method, when an operation on the simulated location function is detected, the operation status is recorded in the core component, thereby lifting the restriction on access permissions, enabling any application to extract the accurate status information of the simulated location function from the core component. When it is found that the positioning of the location service application is inaccurate, the accurate status information of the simulated location function can be promptly extracted from the core component, and a prompt message can be generated based on this to remind the user that the inaccurate positioning of the location service application is related to the status of the simulated location function, and the location service application can be ensured to accurately position and work properly by completely turning off the simulated location function.

[0011] Combined with the first aspect, in some implementation methods of the first aspect, the status information of the simulated location function is determined based on the operation result stored in the core component, including: encapsulating the operation result stored in the core component to generate an interface corresponding to the setting application; calling the interface and obtaining the return value returned by the interface; and determining the status information according to the return value.

[0012] In this implementation method, the core component is encapsulated to provide a simpler and more accessible interface, which enables the setting application and / or non-setting application to quickly obtain the status information by calling the interface when the status information is needed, without the need to obtain additional access permissions, improving the convenience of obtaining the status information. Moreover, through the encapsulation method, the response speed can be improved, the consistency and accuracy of the data can be ensured, data pollution can be avoided, and the accuracy of the obtained status information can be ensured.

[0013] Combined with the first aspect, in some implementation methods of the first aspect, determining the status information according to the return value includes: detecting that the return value includes the first information, determining that the simulated location function is in the enabled state, and determining that the target application is selected; detecting that the return value includes the second information, determining that the target application uses the simulated location function, and determining the identification information of the target application according to the second information.

[0014] Optionally, the first information may include a boolean value, such as true, false, where true is used to indicate that the user has selected an application in the "Select Simulated Location Application Information", and false is used to indicate that the user has not selected an application in the "Select Simulated Location Application Information".

[0015] Optionally, false can also be used to indicate that the user has cancelled after selecting an application in the "Select Simulated Location Application Information".

[0016] Optionally, the second information may include different strings, such as the string corresponding to the identification information of the target application, an empty string, null, etc.

[0017] In this implementation manner, by analyzing the return value to determine the status information, the judgment logic can be simplified, and the status information of the simulated location function can be obtained quickly and accurately, improving the efficiency of obtaining the status information.

[0018] Combined with the first aspect, in some implementation manners of the first aspect, the simulated location processing method further includes: detecting that the settings application has access permission; the access permission is used to access the application list corresponding to the simulated location function; the application list includes the identification information of the target application using the simulated location function; calling a preset method to obtain the application list; and determining the status information according to the application list.

[0019] In this implementation manner, only when it is detected that the application has access permission can the application list be accessed to determine the status information, enhancing the security of the system. At the same time, through permission control, it can be ensured that the data in the obtained application list is accurate and up-to-date, thereby ensuring the accuracy of the status information.

[0020] Combined with the first aspect, in some implementation manners of the first aspect, before calling the preset method through the preset instance to obtain the application list, the method further includes: detecting that the settings application does not have access permission; upgrading the current system; and the settings application in the upgraded system has access permission.

[0021] In this implementation manner, when it is detected that the application does not have access permission, the system is upgraded to ensure that the application obtains access permission, improving the compatibility of the application and ensuring that the application can access the application list to determine the status information.

[0022] Combined with the first aspect, in some implementation manners of the first aspect, before determining the status information of the simulated location function based on the operation result stored in the core component, the method further includes: detecting that the target application is uninstalled and clearing the operation result stored in the core component.

[0023] In this implementation manner, before obtaining the status information, it is first determined whether the target application is uninstalled to ensure that the obtained status information is consistent with the status of the installed target application, avoiding the situation where the obtained status information does not match the actual situation and ensuring the accuracy of the obtained status information.

[0024] Combined with the first aspect, in some implementation manners of the first aspect, after generating the first prompt message according to the status information, the method further includes: detecting a second operation on the simulated location function; the second operation includes an operation to turn off the simulated location function; responding to the second operation; and updating the positioning information in the location service application.

[0025] In this implementation manner, the simulated location function can be completely turned off, ensuring that the location service application can accurately locate and work properly.

[0026] In combination with the first aspect, in certain implementations of the first aspect, the method further includes: when a positioning hardware anomaly is detected, generating a second prompt message; the second prompt message is used to indicate the correlation between the inaccurate positioning of the location service application and the positioning hardware.

[0027] In such an implementation, when a positioning hardware anomaly is detected, a second prompt message is generated to remind the user that the inaccurate positioning of the location service application may be related to the anomaly of the GPS device, which can guide the user to repair the GPS device, enable the location service application to return to normal, and ensure the correct positioning of the current real geographical location.

[0028] In a second aspect, the present application provides an analog location processing device, which includes one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to cause the analog location processing device to execute any one of the methods provided in the technical solutions of the first aspect.

[0029] In a third aspect, the present application provides an electronic device, which includes: a processor, a memory, and an interface; the processor, the memory, and the interface cooperate with each other to cause the electronic device to execute any one of the methods provided in the technical solutions of the first aspect.

[0030] In a fourth aspect, the present application provides a chip, which includes a processor. The processor is used to read and execute the computer program stored in the memory to execute the methods in the first aspect and any possible implementations thereof.

[0031] Optionally, the chip further includes a memory, and the memory is connected to the processor through a circuit or a wire.

[0032] Optionally, the chip further includes a communication interface.

[0033] In a fifth aspect, the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the processor is caused to execute any one of the methods in the technical solutions of the first aspect.

[0034] In a sixth aspect, the present application provides a computer program product, which includes: computer program code. When the computer program code runs on an electronic device, the electronic device is caused to execute any one of the methods in the technical solutions of the first aspect.

[0035] The technical effects obtained in the above second aspect, third aspect, fourth aspect, fifth aspect, and sixth aspect are similar to those obtained by the corresponding technical means in the above first aspect, and will not be elaborated here. Brief Description of the Drawings

[0036] Figure 1 FIG. is a schematic diagram of a scenario using the simulated location function shown in an exemplary embodiment of the present application;

[0037] Figure 2 FIG. is a display interface for applying simulated location information shown in an exemplary embodiment of the present application;

[0038] Figure 3 FIG. is a schematic diagram of a scenario using a simulated geographic location application shown in an exemplary embodiment of the present application;

[0039] Figure 4 FIG. is a schematic flowchart of a method for processing simulated locations shown in an exemplary embodiment of the present application;

[0040] Figure 5 FIG. is a schematic diagram of a scenario in a card mode shown in an exemplary embodiment of the present application;

[0041] Figure 6 FIG. is a schematic diagram of another scenario in a card mode shown in an exemplary embodiment of the present application;

[0042] Figure 7 FIG. is a schematic diagram of yet another scenario in a card mode shown in an exemplary embodiment of the present application;

[0043] Figure 8 FIG. is a schematic flowchart of a method for determining status information shown in an exemplary embodiment of the present application;

[0044] Figure 9 FIG. is a schematic flowchart of another method for processing simulated locations shown in an exemplary embodiment of the present application;

[0045] Figure 10 FIG. is a schematic flowchart of yet another method for processing simulated locations shown in an exemplary embodiment of the present application;

[0046] Figure 11 FIG. is a schematic flowchart of still another method for processing simulated locations shown in an exemplary embodiment of the present application;

[0047] Figure 12 FIG. is a schematic diagram of the structure of an electronic device shown in an exemplary embodiment of the present application;

[0048] Figure 13 FIG. is a software structure block diagram of an electronic device shown in an exemplary embodiment of the present application;

[0049] Figure 14 FIG. is a schematic diagram of a device for processing simulated locations shown in an exemplary embodiment of the present application;

[0050] Figure 15It is a schematic structural diagram of a chip provided by an embodiment of the present application. Detailed implementation manners

[0051] In the embodiments of the present application, the following terms "first", "second", "third", and "fourth" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features.

[0052] To facilitate the understanding of the technical solutions in the embodiments of the present application, before introducing the technical solutions in the embodiments of the present application, some terms involved in the embodiments of the present application will be explained first.

[0053] 1. Global Positioning System (GPS)

[0054] GPS is a satellite navigation system that allows users to determine their position, speed, and time globally. Several common functions of GPS include positioning, navigation, time synchronization, and speed measurement.

[0055] 2. GPS device

[0056] The GPS device in an electronic device is usually called a GPS chip or a GPS module, which is a part of the hardware of the electronic device and is responsible for receiving signals from GPS satellites and calculating the precise position of the current electronic device.

[0057] The above is a simple introduction to the nouns involved in the embodiments of the present application, and will not be elaborated below.

[0058] With the popularization of electronic devices and the rapid development of mobile applications, users' personalized demands for the functions of electronic devices are increasing day by day. Among them, the simulated location function is favored by many users due to its application value in specific scenarios. Users can use this simulated location function to simulate their geographical location in a specific application to meet their usage needs.

[0059] Next, various scenarios of using the simulated location function provided by the embodiments of the present application will be described.

[0060] For example, when users use electronic devices, they may encounter some specific scenarios where they need to use the simulated location function. These specific scenarios may include:

[0061] Privacy protection scenario: Users hope to hide their real location information to prevent the leakage of personal information, such as when using social media or in communication scenarios that require special protection measures.

[0062] Game entertainment scenario: In some location-based games, users may need to simulate being in a specific area to complete specific tasks.

[0063] Application test scenarios: When developing location-based applications, developers need to simulate different geographical locations to test the accuracy and performance of the applications. Among them, location-based applications can include location service applications, such as navigation applications, social applications, local life service applications, emergency services and security applications, health and fitness applications, games and entertainment applications, business and marketing applications, logistics and distribution service applications, environmental and natural applications, education and learning applications, etc.

[0064] Travel planning scenarios: When planning future travel plans, users may want to simulate arriving at the destination to view local weather forecasts, understand local cultures and languages, test local navigation applications, etc.

[0065] Business requirement scenarios: Business people may need to simulate being in different time zones or regions in order to remotely participate in meetings or handle cross-regional business.

[0066] Education and research scenarios: Students, teachers, and researchers may need to simulate being in a specific region to study the cultures, economies, or social phenomena of different regions.

[0067] Avoiding geographical restrictions scenarios: Certain applications or services may be available only in specific regions. By simulating locations, users can access this restricted content.

[0068] Emergency scenarios: In emergency situations, such as natural disasters, users may need to simulate locations to obtain emergency information or rescue services in that area.

[0069] Avoiding advertising targeting scenarios: Users may not want their online behaviors to be targeted by advertisers based on their geographical locations. The location simulation function can help such users avoid this targeted advertising.

[0070] Social experiment scenarios: Some users, for the purpose of social experiments, simulate being in different regions to understand the ways people interact in different cultural backgrounds.

[0071] It should be understood that the above scenarios of using the location simulation function are only for illustrative purposes and do not limit the actual application scenarios of this application.

[0072] Taking an electronic device as a mobile phone as an example below, a description will be given of how users use the location simulation function of the mobile phone.

[0073] It is worth noting that the two terms "simulated location" and "simulated geographical location" in the embodiments of this application can be used interchangeably. Similarly, "simulated location function" and "simulated geographical location function" also have the same meaning. In the subsequent descriptions, these terms will be flexibly adopted according to the context.

[0074] Please refer toFigure 1 , Figure 1 is a schematic diagram of a scenario using the simulated location function shown in an exemplary embodiment of the present application.

[0075] Exemplarily, when the settings application on the mobile phone is opened, the mobile phone displays a settings interface UI1 as shown in Figure 1 (a). The settings interface UI1 includes multiple settings options, such as sound and vibration, notifications and status bar, system and updates, etc. When the "System and Updates" option is clicked in the settings interface UI1, the mobile phone displays a system and updates interface UI2 as shown in Figure 1 (b).

[0076] The system and updates interface UI2 includes multiple system-related options, such as software update, system navigation method, developer options, etc. Among them, the developer options are used to provide some additional system functions and debugging tools for developers or users with special needs, facilitating them to understand and modify the system more deeply. For example, the simulated location function is usually located in the developer options.

[0077] It should be noted that usually, the developer options are not enabled by default on the mobile phone, and the user needs to manually enable the developer options. It should be understood that the methods for enabling the developer options may be different for different mobile phones. For example, in some possible implementation methods, the developer options can be enabled by entering a specific code through the dialing application; or for another example, in some other possible implementation methods, when the "About Phone" option in the settings interface UI1 is clicked, the mobile phone responds to the user's click operation and displays the about phone interface. In the about phone interface, find the "Build Number", and quickly click on the "Build Number" several times continuously (such as 7 times, 14 times, it should be understood that the number of consecutive clicks may be different for different mobile phones) until it is prompted in the about phone interface that the user has become a developer, indicating that the developer options are successfully enabled currently.

[0078] Exemplarily, when the user clicks on the "Developer Options" in the system and updates interface UI2, the mobile phone responds to the user's click operation and displays a developer options interface UI3 as shown in Figure 1 (c). The developer options interface UI3 includes multiple key functions, such as USB debugging, demo mode, select mock location information application, etc. Among them, the "Select Mock Location Information Application" can be used to enable or disable the simulated location function. When the user clicks on the "Select Mock Location Information Application" in the developer options interface UI3, the mobile phone responds to the user's click operation and displays a select application interface UI4 as shown in Figure 1 (d).

[0079] The selection application interface UI4 includes applications on the current mobile phone that support the use of the mock location function. For example, the "Mock Geographical Location" application, XX application, and XXX application shown in the selection application interface UI4. That is to say, the "Mock Geographical Location" application, XX application, and XXX application can use the mock location function. Optionally, the selection application interface UI4 may also include the package names of each application that supports the use of the mock location function. For example, com.example.mocklocation under the "Mock Geographical Location" application represents the package name corresponding to the "Mock Geographical Location" application, com.xxyingyong under the XX application represents the package name corresponding to the XX application, and com.xxxyingyong under the XXX application represents the package name corresponding to the XXX application. It should be understood that the "Mock Geographical Location" application, XX application, and XXX application are only for illustrative purposes and are not limited thereto.

[0080] Optionally, the selection application interface UI4 may also include a control for turning off the mock location function, such as the "None" control in the selection application interface UI4.

[0081] It is worth noting that according to different operations of the user on the mock location function, different prompt messages will be displayed below the "Select Mock Location Information Application" in the developer options interface UI3. For example, when the mock location function is not enabled, "Not Set" is displayed by default below the "Select Mock Location Information Application". Another example is that when the user selects an application in the selection application interface UI4, the name of the selected application will be displayed below the "Select Mock Location Information Application".

[0082] Please refer to Figure 2 , Figure 2 is the mock location information application display interface shown in an exemplary embodiment of the present application. For example, when the user clicks the "Mock Geographical Location" application in the selection application interface UI5 as shown in (a) of Figure 2 , the mobile phone responds to the user's click operation and updates the "Not Set" displayed below the "Select Mock Location Information Application" to "Mock Location Information Application: Mock Geographical Location".

[0083] At this time, the user can click the return control in the upper left corner of the selection application interface UI5, and the mobile phone responds to the user's click operation and jumps the display interface to the upper-level interface of the selection application interface UI5, such as Figure 2 the developer options interface UI6 shown in (b) of

[0084] It should be understood that when the user clicks the "None" control in the application selection UI5, the mobile phone responds to the user's click operation, turns off the mock location function, and updates the "Mock Location Information Application: Mock Geographical Location" displayed below "Select Mock Location Information Application" to "Not Set". That is to say, when "Not Set" is displayed below "Select Mock Location Information Application", it means that the mobile phone does not currently have the mock location function enabled, and of course, no application for mock location (i.e., mock location information application) is selected.

[0085] It is worth noting that when an application name is displayed below "Select Mock Location Information Application", it means that the mobile phone currently has the mock location function enabled and has selected the application corresponding to the application name. However, this does not necessarily mean that the application is currently using the mock location function. It only means that these operations give the application the ability or permission to mock location. Whether to actually use the application to mock location depends on the user's actual needs.

[0086] For example, when "Mock Location Information Application: Mock Geographical Location" is displayed below "Select Mock Location Information Application", it means that the mobile phone currently has the mock location function enabled and has selected the "Mock Geographical Location" application, giving the "Mock Geographical Location" application the ability to mock location. The "Mock Geographical Location" application has a corresponding icon on the system desktop. When the user needs to mock location through the "Mock Geographical Location" application, they can click the corresponding icon on the system desktop. The mobile phone responds to the user's click operation on the icon, starts and runs the "Mock Geographical Location" application. The user can mock various geographical locations in the running "Mock Geographical Location" application according to their own needs.

[0087] Please refer to Figure 3 , Figure 3 which is a schematic diagram of a scenario for using a mock geographical location application shown in an exemplary embodiment of the present application. Exemplarily, the display screen of the mobile phone shows the system desktop, such as Figure 3 the system desktop UI7 shown in (a) below. The system desktop UI7 includes icons of multiple applications, such as the icon of the "Music" application, the icon of the "Gallery" application, the icon of the "Mock Geographical Location" application, etc.

[0088] When the user wants to mock location through the "Mock Geographical Location" application, first, according to Figure 1 and Figure 2 the descriptions in the corresponding embodiments, click the Settings application, the "System & updates" option, the "Developer options", "Select Mock Location Information Application", and the "Mock Geographical Location" application in sequence to give the "Mock Geographical Location" application the ability or permission to mock location. After that, the user can click the icon of the "Mock Geographical Location" application on the system desktop UI7. The mobile phone responds to this click operation, starts the "Mock Geographical Location" application, and displays asFigure 3 The simulated geographical location application interface UI8 shown in (b) of [Figure].

[0089] The simulated geographical location application interface UI8 includes multiple controls for operating the simulated location function, such as a simulated GPS control, a simulated network (NETWORK) control, a simulated GPS and NETWORK control, a stop simulated GPS control, a stop simulated NETWORK control, and a stop simulated GPS and NETWORK control.

[0090] Among them, the simulated GPS control is used to simulate the geographical location based on GPS; the simulated NETWORK control is used to simulate the geographical location based on the network, such as positioning based on Wi-Fi or a mobile network; the simulated GPS and NETWORK control is used to simultaneously simulate the geographical location based on GPS and the network.

[0091] Exemplarily, when the user clicks on any simulated control, such as clicking on the simulated GPS control, the "Simulated Geographical Location" application will simulate a virtual geographical location based on GPS and transmit it to the system's location service. This simulated virtual geographical location will temporarily overwrite or replace the real geographical location recorded in the location service. Therefore, when other applications request geographical location information, the system's location service will provide this simulated virtual geographical location instead of the real geographical location. That is to say, other applications will receive the simulated virtual geographical location, thus realizing the function of simulating the location.

[0092] The stop simulated GPS control is used to stop simulating the geographical location based on GPS; the stop simulated NETWORK control is used to stop simulating the geographical location based on the network; the stop simulated GPS and NETWORK control is used to stop simulating the geographical location based on GPS and the network.

[0093] Optionally, the simulated geographical location application interface UI8 may further include a latitude input area and a longitude input area. Among them, the latitude input area is used for the user to manually input a specific latitude value, and the longitude input area is used for the user to manually input a specific longitude value. The latitude input area and the longitude input area provide the user with the ability to precisely control the simulated location, enabling the user to specify any specific point on the earth as the simulated location, thereby improving the user experience.

[0094] Optionally, the simulated geographical location application interface UI8 may further include the latitude (latitude, lat) value and the longitude (longitude, long) value corresponding to the default simulated location, such as Figure 3The lat: 39.49501499999983 and long: 116.48875200000029 shown in (b). The latitude value and longitude value corresponding to this default simulation location are a specific location preset by the developer, which is used to automatically simulate to this preset geographical location when the user first uses the "simulate geographical location" application or when the user does not specify a specific location.

[0095] Optionally, the simulation geographical location application interface UI8 may further include controls for enabling or disabling "location change" and controls for enabling or disabling "simulate multiple times".

[0096] In one example, when the "location change" function is enabled, such as Figure 3 the lat value and long value shown in (b) will be automatically updated according to the rules set by the user, such as gradually increasing or gradually decreasing; when the "location change" function is disabled, the lat value and long value will no longer be automatically updated.

[0097] In another example, when the "simulate multiple times" function is enabled, the user is allowed to set the "simulate geographical location" application to simulate geographical locations multiple times; when the "simulate multiple times" function is disabled, the user is allowed to simulate the current specified single geographical location.

[0098] Optionally, the simulation geographical location application interface UI8 may also integrate a map function, Figure 3 which is not shown in. In this implementation, the user can intuitively see the geographical distribution around the world on the map and quickly select the geographical location they want to simulate through operations such as zooming, sliding, and dragging. Moreover, through the map, they can more accurately locate specific streets, buildings, landmarks, etc., not just relying on latitude and longitude values. The user can easily rotate and simulate any geographical location they want, thus improving the practicality and flexibility of the application.

[0099] Although the simulate location function brings a lot of convenience to users, there is a common misunderstanding among users that as long as the application using the simulate location function is cleared, the simulate location function will automatically end / close. However, some applications using the simulate location function seemingly have been cleared, but actually still run in the background, which results in the failure to correctly end the simulate location function, or rather, the failure to correctly close the simulate location function, and even the application using the simulate location function has not completely exited.

[0100] In this case, if the user uses a location service application (such as a navigation application), problems may occur in the location service application, such as the geographical location not being refreshed, still showing a simulated virtual geographical location, or not matching the real geographical location. For example, the user is in City A and uses the simulated location function to simulate the virtual geographical location of City B. After using the simulated location function, if the user fails to correctly end the simulated location function and then uses a navigation application, the navigation application still shows the geographical location as City B, resulting in the displayed geographical location not matching the user's real geographical location.

[0101] Among them, correctly ending the simulated location function means completely turning off the simulated location function. For example, select the "None" control in the "Select Simulated Location Information Application". Specifically, according to Figure 1 and Figure 2 the descriptions in the corresponding embodiments, click on the Settings application, the "System and Updates" option, the "Developer Options", the "Select Simulated Location Information Application", and the "None" control in sequence. The mobile phone responds to the user's click on the "None" control and updates the "Simulated Location Information Application: Simulated Geographical Location" displayed below the "Select Simulated Location Information Application" to "Not Set". That is to say, when "Not Set" is displayed below the "Select Simulated Location Information Application", it is confirmed that the simulated location function has been correctly ended.

[0102] When problems such as the geographical location in the location service application not being refreshed, continuously showing the simulated virtual geographical location, or the displayed geographical location not matching the real geographical location occur, the user may mistakenly think that the GPS device is malfunctioning and then feedback the GPS device failure to the service provider of the electronic device through the electronic device. However, before the fault detection, the user usually performs operations such as shutting down and restarting the electronic device, which may completely turn off the simulated location function, making the location service application return to normal during the fault detection, resulting in the inability to determine the real cause of the problem. If the user uses the simulated location function again and fails to correctly end the simulated location function and then uses the location service application, the location service application may again have problems such as the geographical location not being refreshed, continuously showing the simulated virtual geographical location, or the displayed geographical location not matching the real geographical location, leading to the recurrence of the problem and forming a vicious cycle.

[0103] Therefore, confirming whether the simulated location function is enabled and identifying the application using the simulated location function are crucial for timely reminding the user to completely turn off the simulated location function, which can ensure that the location service application can accurately locate and work properly.

[0104] In view of this, an embodiment of the present application provides a simulated location processing method, which includes detecting a first operation on the simulated location function in the settings application; the first operation includes an operation to enable the simulated location function and an operation to select a target application to use the simulated location function; responding to the first operation and storing the operation result of the first operation through a core component; detecting that the location service application has inaccurate positioning; determining the status information of the simulated location function based on the operation result stored in the core component; the status information includes the enabled state of the simulated location function and the identification information of the target application; generating a first prompt message according to the status information; the first prompt message is used to indicate the correlation between the inaccurate positioning of the location service application and the status information.

[0105] The simulated location processing method provided by the embodiment of the present application records the operation status in the core component when detecting an operation on the simulated location function, thereby lifting the restriction on access permissions, enabling any application to extract accurate status information of the simulated location function from the core component. In the case of detecting that the positioning of the location service application is inaccurate, accurate status information of the simulated location function can be timely extracted from the core component, and a prompt message is generated accordingly to remind the user that the inaccurate positioning of the location service application is related to the status of the simulated location function, and the location service application can be ensured to accurately position and work properly by completely turning off the simulated location function.

[0106] The following will describe in detail the simulated location processing method provided by the embodiment of the present application in conjunction with the accompanying drawings of the specification.

[0107] Please refer to Figure 4 , Figure 4 which is a schematic flowchart of a simulated location processing method shown in an exemplary embodiment of the present application. The method includes:

[0108] S101. Detect a first operation on the simulated location function in the settings application.

[0109] Exemplarily, when a user uses an electronic device, some specific scenarios may be encountered, in which the simulated location function needs to be used. At this time, a first operation can be performed on the simulated location function through the electronic device to enable the simulated location function and use a target application to use the simulated location function, so as to simulate the virtual geographical location required by the user.

[0110] It should be understood that for the simulated location function, different brands and models of electronic devices may have different setting paths. In the embodiment of the present application, the simulated location function can be set in the settings application, that is, the simulated location function can be found through the settings application of the electronic device.

[0111] For example, on the basis of confirming that the developer options of the electronic device are successfully enabled, the settings application can be opened, the "System and Updates" option can be found in the settings application, and the "System and Updates" option can be clicked. In response to this click operation, the electronic device enters the "Developer Options" interface, and the relevant settings for the mock location function can be found in this "Developer Options" interface.

[0112] It should be understood that for electronic devices of different brands and models, there may be differences in naming and displaying these relevant settings. For example, the name of the mock location function can be displayed as "Mock Location Function", "Mock Location Information", "Select Mock Location Information Application", "Select Mock Location Application", etc. This is only for illustrative purposes and is not limited thereto. When the user searches for and sets the mock location function, corresponding operations can be performed according to the specific naming and interface of their own electronic device.

[0113] The first operation may include an operation to enable the mock location function and an operation to select a target application to use the mock location function. Among them, the target application is an application selected by the user from the applications that support the use of the mock location function and is used to simulate a virtual geographical location.

[0114] In a possible implementation manner, the mock location function has corresponding enable and disable options / controls, and the operation to enable the mock location function may include a click operation on the enable option / control. This click operation is an example of the operation to enable the mock location function. The electronic device can also be instructed to enable the mock location function through voice instructions, gesture instructions, etc. The present application does not make any limitations in this regard.

[0115] The operation to select a target application to use the mock location function may include an operation to select the target application and an operation to control the target application to use the mock location function.

[0116] Among them, the operation to select the target application can specifically be an operation of clicking the target application in the mock location application list. For example, after the mock location function is enabled, the electronic device displays a mock location application list, which may include one or more applications in the current electronic device that support the use of the mock location function. The user can click on an application in the mock location application list according to their own needs, that is, select the target application.

[0117] The operation to control the target application to use the mock location function can specifically include an operation to start the target application, an operation to configure a virtual geographical location in the target application, and an operation for the target application to simulate the virtual geographical location.

[0118] Exemplarily, the operation of starting the target application may include a click operation on the icon of the target application. It should be understood that the electronic device may also be instructed to start the target application through voice instruction operation, gesture instruction operation, etc. It should also be understood that starting the target application may refer to starting the target application.

[0119] To configure the virtual geographic location in the target application, refer to the previous Figure 3 In the corresponding embodiment, the operation of configuring the virtual geographic location is as follows: inputting a specific latitude value in the latitude input area, inputting a specific longitude value in the longitude input area, and using the "location change" function to determine the latitude and longitude values ​​corresponding to the virtual geographic location.

[0120] Optionally, if the target application has a specific location preset by the developer, then the specific location is the configured virtual geographic location. In this case, the user does not need to configure the virtual geographic location, and the target application directly simulates the virtual geographic location based on the specific location.

[0121] Optionally, the target application simulating a virtual geographic location may be triggered by clicking a simulated GPS control, or a simulated network (NETWORK) control, or both a simulated GPS and a simulated NETWORK control.

[0122] In another possible implementation, the simulated location function can be enabled by selecting a target application. For example, the name corresponding to the simulated location function is "Select simulated location information application". When the target application is not selected, the area corresponding to "Select simulated location information application" displays "Not set". After the user clicks the target application (such as a simulated geographic location application) in the simulated location application list according to their needs, the area corresponding to "Select simulated location information application" displays "Simulated location information application: simulated geographic location", indicating that the simulated location function has been enabled and the simulated geographic location application has the ability or permission to simulate location.

[0123] In this case, the operation of selecting the target application to use the simulated location function may include the operation of starting the target application, the operation of configuring a virtual geographic location in the target application, and the operation of the target application simulating the virtual geographic location.

[0124] Exemplarily, the electronic device can detect the first operation for the simulated location function through an event processing mechanism provided by the operating system. For example, the setting application and the target application provide a user interface, and the user interface includes multiple options or controls, and these multiple options or controls are designed to respond to user input events, such as touch events, click events, etc.

[0125] In addition, these multiple options or controls register event listeners to monitor the user's interaction behavior with them. When the user clicks on an option, the operating system detects the click operation and generates an event object that contains relevant information about the interaction (such as the interaction location, interaction time, etc.); the operating system distributes the event object to the controls in the user interface, and after the event listener registered on the control receives the event, it will respond with corresponding operations according to the type and attributes of the event. For example, when the user clicks on "Select Mock Location Information Application", the event listener will receive this click event and trigger the operation of displaying the list of mock location applications.

[0126] Through this event handling mechanism, the electronic device can accurately detect and respond to the first operation of the user on the mock location function. On the one hand, it ensures that the user's operation intention can be correctly understood and executed, and on the other hand, it provides a guarantee for determining the status information of the mock location function based on the recorded first operation.

[0127] S102. Respond to the first operation and store the operation result of the first operation through the core component.

[0128] It should be understood that the first operation includes multiple operations, each operation has its corresponding response method, and correspondingly, each operation will generate a corresponding operation result, and the electronic device stores the operation result of each operation through the core component.

[0129] For example, the first operation includes the operation of enabling the mock location function, and the operation of enabling the mock location function may include a click operation on the enable option / control. When the click operation on the enable option / control is detected, the response method of the electronic device is to enable the mock location function. Correspondingly, the operation result of this click operation can be that the electronic device enables the mock location function.

[0130] Another example is that the first operation includes the operation of selecting a target application to use the mock location function. The operation of selecting a target application to use the mock location function may include the operation of selecting the target application and the operation of controlling the target application to use the mock location function. When the click operation on the target application in the mock location application list is detected, the response method of the electronic device is to update the "Not Set" displayed below "Select Mock Location Information Application" to "Mock Location Information Application: Name of the Target Application". Correspondingly, the operation result of this click operation can be that "Mock Location Information Application: Name of the Target Application" is displayed below "Select Mock Location Information Application", indicating that the target application is selected, and at the same time authorizing the target application with the ability or permission to mock location.

[0131] When an operation of the control target application using the simulated location function is detected, the response method of the electronic device is to simulate a virtual geographical location using the target application and transmit it to the positioning service of the system. Correspondingly, the operation result of the click operation can be to simulate a virtual geographical location for the target application. At the same time, the operation result and the relevant information of the operation result can be recorded, such as the identification information of the target application (such as the package name), the simulated virtual geographical location, the simulated time, etc.

[0132] Exemplarily, the core component may include a ContentProvider component. The ContentProvider component is one of the four major components of Android and is mainly used to share data between different applications or different parts of the same application. Or rather, the ContentProvider component is a content sharing component that can provide the stored data to other applications through the Binder mechanism.

[0133] Each application can have its own ContentProvider component for sharing the stored data among various applications. In the embodiments of the present application, a corresponding ContentProvider component is created for the settings application in advance. This ContentProvider component can be regarded as a data storage mechanism for sharing the stored data between different applications. Therefore, the operation result of the first operation can be stored using this ContentProvider component to facilitate other applications to share the operation result subsequently. For example, when the first operation for the simulated location function is detected, the first operation is responded to, and the operation result of the first operation is stored using the ContentProvider component.

[0134] It is worth noting that the settings application is usually represented as Settings in the code. Therefore, it can also be simply stated that the operation result of the first operation is saved to the ContentProvider of Settings.

[0135] Optionally, the core component may further include an Intent component, a Shared Preferences component, a file sharing component, etc.

[0136] Optionally, in a possible implementation manner, when the target application using the simulated location function is selected, the settings application calls the application list acquisition method through the application operation management class to obtain the application list.

[0137] Among them, the application operation management class is a class in the Android system for managing application operations or permissions, and it is responsible for controlling the permission settings of applications. In the embodiments of the present application, the application operation management class may include the AppOpsManager class. The AppOpsManager class provides a series of methods to set and check the permission status of applications. For example, it checks whether a certain application (such as the settings application) has the permission to perform a certain specific operation (such as accessing the application list), and sets whether a certain application (such as the settings application) is allowed to perform these operations. It should be understood that generally, the AppOpsManager class is not applicable to third-party applications, but is applicable to applications within the system.

[0138] In the embodiments of the present application, the settings application belongs to the applications within the system. When the settings application has the access permission, it can call the application list acquisition method under the AppOpsManager class through the AppOpsManager class to obtain the application list. Among them, the application list acquisition method under the AppOpsManager class may include getPackagesForOps(MOCK_LOCATION_APP_OPS).

[0139] It should be understood that getPackagesForOps(MOCK_LOCATION_APP_OPS), as a method under the AppOpsManager class, is used to obtain the application list with specific operation permissions (such as access permissions) set.

[0140] Exemplarily, when a click operation on "Select mock location application information" is detected, and when a click operation on the target application in the mock location application list is detected, the settings application calls the getPackagesForOps(MOCK_LOCATION_APP_OPS) method through the AppOpsManager class. This method will return a string list, that is, the application list, and the application list contains the package names of all applications authorized to use the mock location function. After the user operation is completed, the settings application saves the relevant data in the application list and the user selection result (such as selecting the target application for mock location) to the ContentProvider.

[0141] S103. It is detected that the location service application has inaccurate positioning.

[0142] Exemplarily, location-based service applications may include navigation applications (such as map service applications, public transportation navigation applications, travel planning applications), social applications (such as location sharing applications, chat applications), local life service applications (such as dining recommendation applications, shopping service applications), emergency services and security applications, health and fitness applications, gaming and entertainment applications, business and marketing applications (such as geolocation advertising applications, location-based promotion activity applications), logistics and distribution service applications (such as express tracking applications, food delivery applications), environment and nature applications (such as weather applications, environmental monitoring applications), education and learning applications (such as geography learning applications, history and culture applications), and so on.

[0143] In the embodiments of the present application, the inaccurate positioning of location-based service applications can be detected through various means.

[0144] In one example, an error reporting function can be built into the location-based service application, allowing users to directly report problems through the error reporting function in the location-based service application when they encounter inaccurate positioning of the location-based service application. When the electronic device receives the reported error information, it determines that the location-based service application is inaccurately positioned. In this way, user feedback can be collected, and relevant logs of the inaccurate positioning of the location-based service application can be automatically recorded, facilitating developers to analyze and locate problems and subsequently solve the problem of inaccurate positioning.

[0145] In another example, a diagnostic tool can be built into the system of the electronic device to diagnose whether the location-based service application is accurately positioned. For example, during the daily use of the location-based service application, the diagnostic tool monitors and records the positioning information in the location-based service application, which can be achieved by registering a listener corresponding to the diagnostic tool. For example, the listener of the diagnostic tool is used to listen to the changes in the positioning information of each location-based service application and record them. If it is detected that the current positioning information is significantly different from the daily positioning information, it can be determined that the location-based service application is inaccurately positioned. For example, by comparing the user's movement trajectory and speed, if it is found that the movement trajectory is abnormally jumpy or the movement does not conform to common sense, it can be considered that there is a problem with the positioning processing of the location-based service application.

[0146] In yet another example, the Android framework in the electronic device can be used to detect whether the location-based service application is accurately positioned, and the detection principle can refer to the principle of using the diagnostic tool to detect whether the location-based service application is accurately positioned. For example, when the location-based service application is running, it requests the user to authorize to obtain positioning data; obtains the system service related to positioning, and through this system service, the location-based service application can obtain the positioning information; registers a positioning listener, and receives the positioning update in the location-based service application through the positioning listener; analyzes the accuracy of the positioning by comparing the changes in the old and new positioning information monitored. If the positioning change is abnormal, it indicates that the location-based service application is inaccurately positioned.

[0147] Optionally, in a possible implementation, the user can also use the phone function of the electronic device to feedback to the service provider of the electronic device that the location service application has inaccurate positioning. The service provider of the electronic device forwards the feedback information to the developer, and the developer can send the feedback information to the user's electronic device by means of push service notifications, remote configuration services, automated scripts, etc., so as to trigger the electronic device to automatically execute step S101, step S102, step S104, and step S105.

[0148] S104. Determine the status information of the simulated location function based on the operation result stored in the core component.

[0149] The status information may include the enabled state of the simulated location function and the identification information of the target application using the simulated location function.

[0150] Among them, the identification information may be any one or any combination of package name, ID, signature, label, custom identification, etc. In the embodiments of the present application, the identification information is taken as an example of the package name of the target application for illustration.

[0151] Optionally, the status information may further include the disabled state of the simulated location function.

[0152] Optionally, the status information may further include the identification information of the application that has been granted the ability or permission to simulate the location.

[0153] In the embodiments of the present application, when detecting the first operation of the user on the simulated location function, the first operation is responded to, and the operation result of the first operation is stored through the core component. Among them, the information stored through the core component may include: the electronic device enables the simulated location function, the electronic device disables the simulated location function, the target application is selected, the ability or permission to authorize the target application to simulate the location, "Select the application for simulated location information" shows "Simulated location information application: name of the target application" below, the identification information of the target application (such as the package name), the simulated virtual geographical location, the simulated time, etc. Thus, the status information of the simulated location function can be determined based on the operation result stored in the core component.

[0154] For example, by storing that the electronic device enables the simulated location function, it is determined that the status information of the simulated location function is the enabled state; by storing that the electronic device disables the simulated location function, it is determined that the status information of the simulated location function is the disabled state; by storing the package name of the target application, it is determined the package name of the target application using the simulated location function.

[0155] It should be noted that there are two ways to obtain the status information of the mock location function that the settings application and / or other applications want to obtain. For the first way of obtaining, if the operation results stored based on the ContentProvider component have not been encapsulated before, the settings application and / or other applications can query the ContentProvider component to obtain the query results and analyze the query results to obtain the status information of the mock location function. For the second way of obtaining, if the operation results stored based on the core component have been encapsulated before, corresponding interfaces will be generated, and the settings application and / or other applications can call these interfaces to obtain the status information of the mock location function.

[0156] In the embodiments of the present application, other applications refer to non-settings applications. For example, applications other than the settings application in the system, third-party applications, etc.

[0157] S105. Generate a first prompt message according to the status information.

[0158] The first prompt message is used to indicate the correlation between the inaccurate positioning of the location service application and the status information.

[0159] As can be seen from the foregoing description, when the user uses the mock location function and fails to correctly end the mock location function and then uses the location service application, the location service application may have problems such as the geographical location not being refreshed, continuously displaying the simulated virtual geographical location, and the displayed geographical location not matching the real geographical location. In this case, we can use the first prompt message to prompt the user that the inaccurate positioning of the location service application may be related to the fact that they have enabled the mock location function and selected the target application to use the mock location function for simulation. This can guide the user to correctly end the mock location function, enable the location service application to return to normal, and be able to correctly locate the current real geographical location.

[0160] Exemplarily, templates for the first prompt message in different situations can be predefined so as to generate different prompt messages according to different status information. For example, when the status information includes the on / off state of the mock location function and the identification information of the target application using the mock location function, the first prompt message generated according to this status information can be: It is detected that you are using the mock location function, and this function may cause the real geographical location located by the target application to be inaccurate.

[0161] Optionally, the first prompt message can also be: It is detected that you are using the mock location function, and this function may cause the real geographical location located by the target application to be inaccurate. Please go to the developer options to turn off this mock location function.

[0162] Optionally, the first prompt message can also be: It is detected that you have selected a target application in "Select Mock Location Information Application", which may cause the true geographical location located by the target application to be inaccurate. Please go to "Select Mock Location Information Application" to deselect it.

[0163] Optionally, the first prompt message can also be: It is detected that you have selected a target application in "Select Mock Location Information Application", which may cause the true geographical location located by the target application to be inaccurate. Please go to "Select Mock Location Information Application" to select "None".

[0164] It should be understood that the above first prompt message is only for exemplary illustration and can be adjusted according to actual situations. The present application does not make any limitations in this regard.

[0165] Optionally, in a possible implementation manner, there can be multiple ways to remind the first prompt message. The following are some reminder methods provided by the embodiments of the present application:

[0166] Card reminder

[0167] The first prompt message is displayed in the form of a card on the display interface. This method does not interrupt the user's current operation process and is convenient for the user to view.

[0168] Pop-up reminder

[0169] A prompt box is popped up on the interface of an application (such as a location service application) to remind the user. The prompt box contains the first prompt message. This method can quickly attract the user's attention, facilitate quickly solving the problem of inaccurate location of the location service application, and improve the user's favorability.

[0170] Message reminder

[0171] Text information is sent in the message center or status bar notification within the application. In this way, the user can see the first prompt message without opening the application.

[0172] Voice reminder

[0173] The first prompt message is converted into voice and played for the user by using text-to-speech technology. This method is applicable to scenarios where hands-free operation is required, such as the driving scenario.

[0174] Phone reminder

[0175] By automatically calling the user to play the voice corresponding to the first prompt message, or by interacting with the user through a phone robot, this method can more directly convey the first prompt message.

[0176] Email reminder

[0177] Send an email to the user's mailbox, which can reduce the degree of interruption to the user.

[0178] System notification

[0179] Use the notification system of the operating system, such as the notification bar, banner notification, etc. to notify the first prompt message, which can remind the user across applications.

[0180] In the embodiments of the present application, the card reminder is taken as an example for illustration. Please refer to Figure 5 , Figure 5 is a schematic diagram of a card method scenario shown in an exemplary embodiment of the present application. As Figure 5 shown, a prompt card pops up above the display interface of the mobile phone. The prompt card contains the first prompt message, such as "It is detected that you are using the mock location function, which may cause inaccurate positioning of the real geographical location. Please go to the developer options to turn off this function."

[0181] Please refer to Figure 6 , Figure 6 is another schematic diagram of a card method scenario shown in an exemplary embodiment of the present application. As Figure 6 shown, a prompt card pops up in the middle of the display interface of the mobile phone. The prompt card contains the first prompt message, such as "It is detected that you have selected an application in 'Select mock location information application'. Please go to the developer options to cancel it." It should be understood that Figure 5 and Figure 6 The display positions of the cards in are only exemplary displays and can be adjusted according to the actual situation, and are not limited thereto.

[0182] The mock location processing method provided by the embodiments of the present application records the operation state in the core component when detecting an operation on the mock location function. If it is found that the positioning of the location service application is inaccurate, the accurate state information of the mock location function can be extracted from the core component in time, and a prompt message can be generated accordingly to remind the user that the inaccurate positioning of the location service application may be related to the usage state of the mock location function, thereby guiding the user to completely turn off the mock location function to ensure that the location service application can accurately locate and work properly.

[0183] Optionally, in a possible implementation manner, on the basis of reminding the first prompt message, the mock location function can also be quickly controlled. For example, on the basis of reminding the first prompt message, a control for the mock location function is displayed. When the electronic device receives an operation on the control, it responds to the operation to turn off the mock location function or not turn off the mock location function.

[0184] Please refer to Figure 7 , Figure 7This is another schematic diagram of a card scenario shown in an exemplary embodiment of the present application. As Figure 7 shown, a prompt card pops up above the display interface of the mobile phone. The prompt card contains a first prompt message, such as "It is detected that you are using the mock location function, which may cause the location service of the XXXX application to be inaccurate". At the same time, the prompt card also includes information for prompting to control the mock location function, such as "Do you want to turn off the mock location function", as well as the control "Yes" and the control "No".

[0185] After seeing the prompt card, the user can click on the control "Yes" or the control "No". For example, when the user clicks on the control "Yes", the electronic device responds to this click operation and turns off the mock location function. Specifically, it can automatically select "None" in "Select the application for mock location information".

[0186] For another example, when the user clicks on the control "No", the electronic device responds to this click operation and still maintains the state of using the mock location function.

[0187] Since completely turning off the mock location function requires multiple steps, the method provided in the embodiment of the present application can quickly turn off the mock location function without going through multiple steps, improving the user experience and reducing the complexity of the operation.

[0188] Optionally, in a possible implementation manner, the embodiment of the present application also provides a method for determining status information. Please refer to Figure 8 , Figure 8 This is a schematic flowchart of the method for determining status information shown in an exemplary embodiment of the present application.

[0189] The method includes:

[0190] S1041. Encapsulate the operation result stored based on the core component to generate an interface corresponding to the settings application.

[0191] In the embodiment of the present application, the core component is taken as an example of the ContentProvider component for illustration. To simplify the access to the ContentProvider component, the operation result stored based on the ContentProvider component can be encapsulated through Settings. For example, one or more encapsulation classes are created for the ContentProvider component through Settings to provide a more concise application programming interface (API), that is, the interface corresponding to the settings application.

[0192] S1042. Call the interface and obtain the return value returned by the interface.

[0193] Exemplarily, through this interface, the operation results stored in the backend database by using the ContentProvider component can be accessed. Herein, the backend database refers to the database used to store data in the electronic device. In the embodiments of the present application, the backend database may include a SQLite database, a Room database, etc.

[0194] For example, setting the interfaces corresponding to the application may include two. The first interface is used to check whether the user has selected an application in the "Select Mock Location Application Information", and the second interface is used to obtain the identification information of the application selected by the user. Correspondingly, the return value may include first information and second information.

[0195] When the first interface is called, the first information is returned through the first interface. The first information may include a Boolean value, such as true, false. Among them, true is used to indicate that the user has selected an application in the "Select Mock Location Application Information", and false is used to indicate that the user has not selected an application in the "Select Mock Location Application Information".

[0196] Optionally, in a possible implementation manner, false can also be used to indicate that the user has canceled after selecting an application in the "Select Mock Location Application Information".

[0197] Optionally, in a possible implementation manner, the first information can also be represented in other forms, such as 1, 0, Y, N, etc. Among them, 1 and Y are used to indicate that the user has selected an application in the "Select Mock Location Application Information", and 0 and N are used to indicate that the user has not selected an application in the "Select Mock Location Application Information", or indicate that the user has canceled after selecting an application in the "Select Mock Location Application Information".

[0198] When the second interface is called, the second information is returned through the second interface. The second information may include different strings, such as the string corresponding to the identification information of the target application, an empty string, null, etc. For example, if the second interface returns com.xxxx, the com.xxxx is used to represent the package name of the target application selected by the user; for another example, if the second interface returns an empty string or null, it is used to indicate that the package name of the application has not been obtained or the user has not selected the target application.

[0199] S1043. Determine the status information according to the return value.

[0200] Exemplarily, analyze the return value returned by the interface to determine the status information of the mock location function.

[0201] For example, when it is detected that the return value includes the first piece of information, it is determined that the mock location function is in the enabled state, and it is determined that the target application is selected. Specifically, for example, if the first piece of information includes "true", based on "true", it can be determined that the status information includes the enabled state of the mock location function. Optionally, in some possible implementation manners, when the mock location function is in the enabled state, it indicates that the user has selected a certain application in the "Select Mock Location Application Information". Therefore, when the first piece of information includes "true", it can also be determined that the status information includes that the target application is selected.

[0202] Also for example, when it is detected that the return value includes the second piece of information, it is determined that the target application uses the mock location function, and the identification information of the target application is determined according to the second piece of information. Specifically, for example, if the second piece of information includes "com.example.mocklocation", "com.example.mocklocation" is the package name of the mock geographical location application. Among them, "com" represents the top-level domain name, "example" represents the name of the developer, and "mocklocation" represents the name of the application.

[0203] Optionally, according to "com.example.mocklocation", it can also be determined that the mock geographical location application uses the mock location function. By analyzing the return value to determine the status information, the judgment logic can be simplified, and the status information of the mock location function can be obtained quickly and accurately, improving the efficiency of obtaining the status information.

[0204] In this implementation manner, the ContentProvider component is encapsulated to provide a simpler and more accessible interface, which enables the setting application and / or other applications to quickly obtain the status information by calling the interface when the status information is needed, without the need to obtain additional access permissions, improving the convenience of obtaining the status information. Moreover, through the encapsulation method, the response speed can be improved, the consistency and accuracy of the data can be ensured, data pollution can be avoided, and the accuracy of the obtained status information can be ensured.

[0205] Optionally, in a possible implementation manner, since the user may uninstall the selected application, the obtained status information of the mock location function may be inaccurate. Therefore, the embodiment of the present application also provides a method. Before determining the status information of the mock location function based on the operation result stored in the core component, when it is detected that the target application is uninstalled, the operation result stored in the core component is cleared.

[0206] In one example, before querying the ContentProvider component to obtain status information, it is detected whether the target application has been uninstalled. If it is detected that the target application has not been uninstalled, then the ContentProvider component is normally queried to obtain status information. If it is detected that the target application has been uninstalled, then the operation results stored based on the ContentProvider component are cleared or refreshed. For example, if it is detected that the target application has been uninstalled, the package name, boolean value, etc. saved in the ContentProvider of Settings are refreshed.

[0207] In another example, before calling an interface, it is detected whether the target application has been uninstalled. If it is detected that the target application has not been uninstalled, then the ContentProvider component is normally queried to obtain status information. If it is detected that the target application has been uninstalled, then the operation results stored based on the ContentProvider component are cleared or refreshed.

[0208] Optionally, if the target application has been uninstalled, after calling the interface, the interface can return null or other specified values to indicate that the target application has been uninstalled.

[0209] In this implementation manner, before obtaining the status information, it is first determined whether the target application has been uninstalled to ensure that the obtained status information is consistent with the status of the installed target application, avoid the situation where the obtained status information does not match the actual situation, and ensure the accuracy of the obtained status information.

[0210] Optionally, in a possible implementation manner, the embodiment of the present application further provides a simulated location processing method. First, it is detected whether the settings application has access permission. In the case where the settings application has access permission, the status information can be obtained by calling a preset method, and a first prompt message is generated.

[0211] Please refer to Figure 9 , Figure 9 which is a schematic flowchart of another simulated location processing method shown in an exemplary embodiment of the present application. The method includes:

[0212] S201. It is detected that the settings application has access permission.

[0213] The access permission is used to access the application list corresponding to the simulated location function; the application list may include the identification information of the target application using the simulated location function.

[0214] Exemplarily, since accessing the application list corresponding to the simulated location function requires access permission, it is necessary to first detect whether the settings application has access permission.

[0215] In an embodiment of the present application, the access permission can be represented by android.permission.GET_APP_OPS_STATS.

[0216] For example, the method ContextCompat.checkSelfPermission can be called to detect whether the settings application is authorized to access the permission. If PackageManager.PERMISSION_GRANTED is returned based on this method, it indicates that the settings application has obtained the access permission.

[0217] S202. Call a preset method to obtain a list of applications.

[0218] The preset method can include the method getPackagesForOps(MOCK_LOCATION_APP_OPS). When it is detected that the settings application has the access permission, the method getPackagesForOps(MOCK_LOCATION_APP_OPS) is called to return a list of applications.

[0219] It is worth noting that the method getPackagesForOps(MOCK_LOCATION_APP_OPS) is a hidden, system-level method. Ordinary third-party applications cannot call this method, and applications within the system also need to obtain a specific access permission, that is, obtain the android.permission.GET_APP_OPS_STATS permission before they can call this method to obtain a list of applications.

[0220] Therefore, if other applications within the system want to obtain a list of applications by calling this method, they can detect whether other applications within the system have the access permission in the same way. If it is detected that other applications within the system have the access permission, other applications within the system can call the method getPackagesForOps(MOCK_LOCATION_APP_OPS) to obtain a list of applications.

[0221] Optionally, in an embodiment of the present application, @SystemApi can be used to indicate that this method belongs to a system-level method.

[0222] S203. Determine status information according to the list of applications.

[0223] The application list may include the identification information of the target application using the simulated location function. It should be understood that when the identification information of the target application is detected in the application list, it proves that the simulated location function is in the enabled state and the target application is using the simulated location function. Thus, the status information can be determined based on the information included in the application list. For example, it can be determined that the status information includes the enabled state of the simulated location function and the identification information of the target application using the simulated location function.

[0224] S204. Generate a first prompt message according to the status information.

[0225] It can be understood that for the description of step S204, reference can be made to the description in the foregoing step S105, which will not be elaborated here.

[0226] In this implementation manner, when it is detected that the application has access permission, the application list can be accessed to determine the status information, which enhances the security of the system. At the same time, through permission control, it can be ensured that the data in the obtained application list is accurate and up-to-date, and thus the accuracy of the status information can be ensured.

[0227] Optionally, in a possible implementation manner, the embodiment of the present application further provides a simulated location processing method. In the case where the setting application does not have access permission, the access permission can be obtained by upgrading the system, and then the status information can be obtained by calling a preset method and a first prompt message can be generated.

[0228] Please refer to Figure 10 , Figure 10 which is a schematic flowchart of another simulated location processing method shown in an exemplary embodiment of the present application. The method includes:

[0229] S301. Detect that the setting application does not have access permission.

[0230] Exemplarily, since accessing the application list corresponding to the simulated location function requires access permission, it is necessary to first detect whether the setting application has access permission.

[0231] For example, the ContextCompat.checkSelfPermission method can be called to detect whether the setting application is authorized to access the permission. If PackageManager.PERMISSION_DENIED is returned based on this method, or other non-PackageManager.PERMISSION_GRANTED values are returned, it indicates that the setting application does not have access permission.

[0232] S302. Upgrade the current system.

[0233] When the settings application has no access permission, the system of the electronic device can be upgraded. After the upgrade, the settings application in the system has access permission. It can be understood that the settings application in the upgraded system can obtain the android.permission.GET_APP_OPS_STATS permission.

[0234] Optionally, the system of the electronic device can be upgraded by using wireless upgrade technology (such as HOTA upgrade technology). This wireless upgrade technology can achieve fast download and installation of the latest version of the system through the wireless communication network of the electronic device, avoiding the trouble for users to connect to a computer with a data cable for upgrade. Moreover, this wireless upgrade technology is more secure and reliable, and the upgrade is more comprehensive, enabling all applications in the upgraded system to obtain access permission.

[0235] Exemplarily, when it is detected that the settings application has no access permission, the system update package can be sent to the electronic device through the wireless network, and the user can choose to download and install it to upgrade the current system.

[0236] It should be noted that since all applications in the upgraded system can obtain access permission, for other applications in the system, that is, non-settings applications in the system, after the current system is upgraded, they can also obtain the application list by calling the preset method to determine the status information.

[0237] It can be understood that since whether to upgrade the system is determined by the user, some users are willing to upgrade while some are not. This may lead to inconsistent system versions of different electronic devices, thereby affecting the application experience and consistency. If the user chooses not to upgrade, the applications in the system cannot obtain access permission, and thus cannot obtain the application list by calling the preset method, nor can they determine the status information.

[0238] In this case, the status information can be determined by the method in the foregoing steps S101 to S105, effectively solving the problem that other applications cannot obtain the status information of the simulated location function because they cannot call the system method or cannot obtain access permission, improving the robustness of other applications, ensuring that other applications can obtain the status information of the simulated location function even under restricted permissions, and then timely reminding the user that the inaccurate positioning of the location service application is related to the simulated location function, guiding the user to correctly close the simulated location function in time, and ensuring that the location service application can accurately locate and work properly.

[0239] S303. Call the preset method through the preset instance to obtain the application list.

[0240] It can be understood that for the description of step S303, reference can be made to the description in the foregoing step S202, which will not be elaborated here.

[0241] S304. Determine the status information according to the application list.

[0242] It can be understood that for the description of step S304, reference can be made to the description in the foregoing step S203, which will not be elaborated here.

[0243] S305. Generate a first prompt message according to the status information.

[0244] It can be understood that for the description of step S204, reference can be made to the description in the foregoing step S105, which will not be elaborated here.

[0245] In this implementation manner, when it is detected that the application has no access permission, the system is upgraded to ensure that the application obtains the access permission, improving the compatibility of the application and ensuring that the application can access the application list to determine the status information.

[0246] Optionally, in a possible implementation manner, the embodiment of the present application further provides a simulated location processing method. After generating the first prompt message according to the status information, it may further include:

[0247] S401. Detect a second operation for the simulated location function.

[0248] The second operation includes an operation to turn off the simulated location function.

[0249] In an example, the simulated location function has corresponding on / off options / controls. The operation to turn off the simulated location function may include a click operation on the off option / control. This click operation is an example of the operation to turn off the simulated location function. The simulated location function of the electronic device can also be turned off through voice instruction operations, gesture instruction operations, etc. The present application does not make any limitations in this regard.

[0250] In another example, the operation to turn off the simulated location function may include an operation to unselect the target application. As can be seen from the foregoing, selecting the target application in the "Select Simulated Location Information Application" is equivalent to turning on the simulated location function. Therefore, the simulated location function can be turned off by unselecting the target application.

[0251] In yet another example, the operation to turn off the simulated location function may include an operation to select "None" in the "Select Simulated Location Information Application". Compared with the operation of unselecting the target application, this way of selecting "None" can turn off the simulated location function more thoroughly.

[0252] Exemplarily, after seeing the first prompt message, the user knows that the inaccurate positioning of the current location service application may be related to the use of the simulated location function. Therefore, according to the guidance, a second operation is performed on the simulated location function to ensure the normal termination of the simulated location function.

[0253] S402. Respond to the second operation.

[0254] The electronic device responds to the second operation and turns off the simulated location function. For example, when the user selects the "None" control in the "Select Simulated Location Information Application", the electronic device responds to the user's operation of clicking the "None" control, and updates the "Simulated Location Information Application: Simulated Geographical Location" displayed below the "Select Simulated Location Information Application" to "Not Set". At this time, it indicates that the simulated location function has been correctly terminated.

[0255] S403. Update the positioning information in the location service application.

[0256] Since the inaccurate positioning of the current location service application may be related to the use of the simulated location function, after correctly terminating the simulated location function, the location service application can automatically update the positioning information to locate the accurate real geographical location.

[0257] For example, the user has special needs in City H and uses the simulated geographical location application to simulate the location to City G. This simulated location information of City G is transmitted to the positioning service of the system, temporarily covering or replacing the real geographical location recorded in the positioning service. When the simulated location function is not correctly terminated and the user uses the navigation application, when the navigation application requests geographical location information, the positioning service of the system will provide this simulated location of City G, resulting in the positioning information displayed in the navigation application being City G.

[0258] After receiving the first prompt message, knowing that the inaccurate positioning of the navigation application may be related to simulating the location of City G using the simulated geographical location application, perform a second operation on the simulated location function according to the prompt to ensure the complete closure of the simulated location function. When the simulated location function is completely closed, the positioning service of the system automatically updates the positioning information and no longer provides the simulated location information. This means that the positioning information in the navigation application will automatically be refreshed from the simulated City G to the user's current real geographical location, City H.

[0259] In this implementation method, the simulated location function can be completely closed, ensuring that the location service application can accurately locate and work properly.

[0260] Optionally, in a possible implementation method, the embodiment of the present application also provides a self-developed detection application. After being developed by the developer and installed in the electronic device, the foregoing methods in each embodiment can be executed through this detection application.

[0261] Optionally, in a possible implementation, the embodiments of the present application further provide a simulated location processing method. Before detecting the simulated location function, it is also possible to detect whether the positioning hardware is abnormal to determine whether the inaccurate positioning of the location service application is related to the positioning hardware. Exemplarily, when the positioning hardware is detected to be abnormal, a second prompt message is generated.

[0262] The second prompt message is used to indicate the relevance between the inaccurate positioning of the location service application and the positioning hardware.

[0263] Among them, the positioning hardware may include a GPS device, a base station positioning hardware, a Wi-Fi positioning hardware, a Bluetooth positioning hardware, etc. Exemplarily, it is possible to detect whether the positioning hardware is abnormal through a hardware detection tool in the electronic device, a GPS test software, a self-developed detection application, etc.

[0264] In the embodiments of the present application, the case where the positioning hardware includes a GPS device is taken as an example for illustration. For example, through a self-developed detection application, it is detected whether the GPS device can be normally turned on, whether satellite signals can be searched, whether the historical location data and the current location data are very different, etc. When satellite signals can be searched, it is also possible to detect the intensity of the satellite signals and whether the number of connected satellites is sufficient, etc., and determine whether the GPS device is abnormal according to the detection results.

[0265] When it is detected that the GPS device is normal, it can be determined that the inaccurate positioning of the location service application has nothing to do with the positioning hardware, and then continue to detect whether the inaccurate positioning of the location service application is related to the simulated location function, such as executing Figure 4 the steps in the corresponding embodiments.

[0266] When the positioning hardware is detected to be abnormal, a second prompt message is generated to remind the user that the inaccurate positioning of the location service application may be related to the abnormality of the GPS device, which can guide the user to repair the GPS device, make the location service application return to normal, and ensure the correct positioning of the current real geographical location.

[0267] Please refer to Figure 11 , Figure 11 which is a schematic flow diagram of another simulated location processing method shown in an exemplary embodiment of the present application. The method includes:

[0268] S501. Set the simulated location function process.

[0269] The process of setting the mock location function may include: opening the Settings application; finding the "System & update" option in the Settings application; clicking on the "System & update" option, and in response to this click operation, the electronic device enters the "Developer options" interface; finding the relevant settings for the mock location function in this "Developer options" interface, such as "Select mock location app"; selecting the target app in "Select mock location app" to simulate the geographical location using the target app. It should be understood that the specific description in step S501 can refer to the relevant description above, and will not be elaborated here.

[0270] S502. The process of storing the relevant data of the mock location function.

[0271] The relevant data of the mock location function is the operation result of the first operation described above.

[0272] The process of storing the relevant data of the mock location function may include: obtaining the access permission; calling a preset method to obtain the application list, which contains the package names of all the applications authorized to use the mock location function. In the process of setting the mock location function, the user will perform relevant operations. After the operations are completed, Settings stores the data in the application list and the user's selection result (such as selecting the target app to simulate the location) in the core component, such as storing it in the ContentProvider component.

[0273] Optionally, in order to simplify the access to the ContentProvider component, the operation result stored based on the ContentProvider component can be encapsulated through Settings. For example, one or more encapsulation classes are created for the ContentProvider component through Settings to provide a more concise Application Programming Interface (API), that is, the interface corresponding to the Settings application. It should be understood that the specific description in step S502 can refer to the relevant description above, and will not be elaborated here.

[0274] S503. The detection process.

[0275] If the user uses the mock location function, it can first be detected whether the mock location function ends correctly. If it ends correctly, it will not affect the positioning of the location service application, and the process ends normally. If the mock location function does not end correctly, it may affect the positioning of the location service application. However, inaccurate positioning of the location service application may also be caused by abnormal positioning hardware. Therefore, when it is detected that the location service positioning is inaccurate when the mock location function does not end correctly, it can first be detected whether the positioning hardware (such as the GPS device) is abnormal.

[0276] If the GPS device is abnormal, a second prompt message is generated to remind the user that the inaccurate positioning of the location service application may be related to the abnormality of the GPS device. This can guide the user to repair the GPS device, restore the location service application to normal, and ensure the correct positioning of the current real geographical location.

[0277] If the GPS device is normal, the status information can be obtained, and a first prompt message is generated according to the status information to remind the user that the inaccurate positioning of the location service application may be related to the usage status of the simulated location function. Thus, the user can be guided to completely turn off the simulated location function to ensure that the location service application can accurately locate and work properly.

[0278] The following briefly introduces the structure of the electronic device involved in the embodiments of the present application with reference to the accompanying drawings.

[0279] In the embodiments of the present application, the aforementioned electronic device may also be referred to as a terminal, a terminal device, a user equipment (UE), a mobile station (MS), a mobile terminal (MT), etc.

[0280] Among them, the electronic device can be a mobile phone, a smart screen, a tablet computer, a computer with wireless transceiver function, a wearable device, a vehicle-mounted device, an augmented reality (AR) / virtual reality (VR) device, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), a handheld or laptop device, a media player, a smart projector, a smart TV, a desktop computer, an Internet of Things device (such as an IoT device), a vehicle infotainment system, a wireless terminal in industrial control, a wireless terminal in self-driving, a wireless terminal in remote medical surgery, a wireless terminal in a smart city, a wireless terminal in a smart home, etc., which support the simulated location function. The specific type and form of the electronic device in the embodiments of the present application are not limited in any way.

[0281] It should be understood that the software system, hardware system, device, and chip in the embodiments of the present application can all execute the simulated location processing method in the foregoing embodiments of the present application. That is, the specific working processes of the following various products can refer to the corresponding processes in the foregoing method embodiments.

[0282] Please refer to Figure 12 , Figure 12 which is a schematic structural diagram of an electronic device shown in an exemplary embodiment of the present application. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, a key 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0283] It should be noted that Figure 12 the structure shown does not constitute a specific limitation on the electronic device 100. In some other embodiments of the present application, the electronic device 100 may include more or fewer components than Figure 12 the components shown, or, the electronic device 100 may include Figure 12 a combination of some of the components shown, or, the electronic device 100 may include Figure 12 sub-components of some of the components shown. Figure 12 The components shown may be implemented by hardware, software, or a combination of hardware and software.

[0284] The processor 110 may include one or more processing units. For example, the processor 110 may include at least one of the following processing units: an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and a neural-network processing unit (NPU). Among them, different processing units may be independent devices or integrated devices.

[0285] Among them, the controller may be the nerve center and command center of the electronic device 100. The controller may generate operation control signals according to the instruction operation code and timing signals to complete the control of fetching and executing instructions.

[0286] A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory may store the instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can directly call it from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0287] The processor 110 may run the software code of the simulated location processing method provided in the embodiments of the present application. For example, it runs to detect a first operation for the simulated location function in the settings application; the first operation includes an operation to enable the simulated location function and an operation to select a target application to use the simulated location function; in response to the first operation, the operation result of the first operation is stored through a core component; it is detected that the location service application has inaccurate positioning; based on the operation result stored in the core component, the status information of the simulated location function is determined; the status information includes the enabled state of the simulated location function and the identification information of the target application; according to the status information, a first prompt message is generated; the first prompt message is used to indicate the software code corresponding to the relevance between the inaccurate positioning of the location service application and the status information.

[0288] The electronic device 100 may implement the display function through the GPU, the display screen 194, and the application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU may also be used to perform mathematical and pose calculations for graphics rendering, etc. The processor 110 may include one or more GPUs, and the execution of program instructions by them may generate or change the display information.

[0289] In the embodiments of the present application, the ability of the electronic device 100 to display various different display interfaces depends on the above-mentioned GPU, the display screen 194, and the display function provided by the application processor. For example, displaying the display settings application, the display interfaces of non-setting applications, and the controls in each application, etc.

[0290] In some embodiments, the electronic device 100 may include one or N display screens 194, and N may be a positive integer greater than 1.

[0291] The display screen 194 in the embodiments of the present application is a touch screen. A touch sensor 180K may be integrated in the display screen 194. The touch sensor 180K may also be referred to as a "touch control panel". That is to say, the display screen 194 may include a display panel and a touch panel, and the touch screen, also known as a "touch screen", is composed of the touch sensor 180K and the display screen 194. The touch sensor 180K is used to detect touch operations acting on or near it. After the touch operation detected by the touch sensor 180K, it can be transmitted to the upper layer by the driver (such as the TP driver) of the kernel layer to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In some other embodiments, the touch sensor 180K may also be disposed on the surface of the electronic device 100, in a different position from the display screen 194.

[0292] The charging management module 140 is used to receive a charging input from a charger. The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110. The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modulation and demodulation processor, and the baseband processor, etc.

[0293] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc. applied on the electronic device 100.

[0294] The internal memory 121 can be used to store computer-executable program codes, and the executable program codes include instructions. The internal memory 121 can include a program storage area and a data storage area. The internal memory 121 can also store the software code of the simulated location processing method provided by the embodiments of the present application. When the processor 110 runs the software code, it executes the process steps of the simulated location processing method, and records the operation state in the core component when detecting an operation on the simulated location function. If it is found that the positioning of the location service application is inaccurate, the status information of the accurate simulated location function can be extracted from the core component in time, and a prompt message can be generated accordingly to remind the user that the inaccurate positioning of the location service application may be related to the usage status of the simulated location function. Thus, the user can be guided to completely turn off the simulated location function to ensure that the location service application can accurately locate and work properly.

[0295] Certainly, the software code of the simulated location processing method provided by the embodiments of the present application can also be stored in the external memory, and the processor 110 can run the software code through the external memory interface 120 to execute the process steps of the simulated location processing method.

[0296] In some embodiments, the pressure sensor 180A can be disposed on the display screen 194. When a touch operation acts on the display screen 194, the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A. The electronic device 100 can also calculate the position of the touch according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations with the same touch position but different touch operation intensities can correspond to different operation instructions.

[0297] The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to implement functions such as unlocking, accessing the application lock, taking pictures, and answering incoming calls.

[0298] The keys 190 include a power-on key and volume keys. The keys 190 can be mechanical keys or touch keys. The electronic device 100 can receive key input signals and implement functions related to the key input signals.

[0299] In addition, various types of operating systems are running on the above components. For example, Android system, IOS operating system, Symbian operating system, Black Berry operating system, Linux operating system, Windows operating system, etc. This is only an exemplary illustration and is not limited thereto. Different application programs, such as any type of input method application, can be installed and run on these operating systems.

[0300] The analog location processing method provided in the embodiments of the present application can be implemented in the electronic device 100 with the above hardware structure.

[0301] The above briefly introduced the structure of the electronic device 100 involved in the embodiments of the present application. Next, the software structure involved in the embodiments of the present application will be briefly introduced. Please refer to Figure 13 , Figure 13 which is a software structure block diagram of an electronic device shown in an exemplary embodiment of the present application.

[0302] The software system can adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservices architecture, or a cloud architecture. In the embodiments of the present application, the layered architecture is taken as an example to exemplarily describe the software system of the electronic device 100.

[0303] As Figure 13 shown, the layered architecture divides the software into several layers, and each layer has a clear role and division of labor. The layers communicate through software interfaces. In some embodiments, taking the electronic device 100 as an Android system as an example for illustration, the Android system is divided into four layers, from top to bottom are the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer.

[0304] The application layer may include a settings application, a self-developed detection application, non-settings applications within the system, third-party applications, etc., and may also include applications such as a calendar, a call, a map, a navigation, a WLAN, a Bluetooth, music, a video, a short message, etc.

[0305] The application framework layer provides application programming interfaces (APIs) and programming frameworks for the applications in the application layer. The application framework layer includes some predefined functions.

[0306] As Figure 13 shown, the application framework layer may include a window manager, a content provider, a view system, a telephone manager, a resource manager, and a notification manager.

[0307] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.

[0308] The content provider is used to store and obtain data, and make this data accessible to applications. The data may include videos, images, audio, incoming and outgoing calls, browsing history and bookmarks, a phone book, etc.

[0309] The view system includes visual controls, such as controls for displaying text, controls for displaying cards, controls for displaying pop - up windows, etc. The view system can be used to build applications. The display interface can be composed of one or more views. For example, a display interface including a text message notification icon can include a view for displaying text and a view for displaying pictures.

[0310] The phone manager is used to provide the communication functions of the mobile phone. For example, the management of call status (including answering, hanging up, etc.).

[0311] The resource manager provides various resources for applications, such as localized strings, icons, pictures, layout files, video files, and so on.

[0312] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification - type messages, which can automatically disappear after a short stay without user interaction. For example, the notification manager is used to inform that the download is complete, the system is upgraded, the first prompt message reminder, the second prompt message reminder, etc.

[0313] The notification manager can also be a notification that appears in the system top - status bar in the form of a chart or scroll - bar text. For example, the first prompt message and the second prompt message are displayed in the system top - status bar. It can also be a notification that appears on the screen in the form of a dialogue window. For example, the first prompt message and the second prompt message are displayed in the form of a dialogue window in the display interface of the application. It can also remind by emitting a prompt sound, vibrating the electronic device, flashing the indicator light, etc.

[0314] Android Runtime includes the core libraries and the virtual machine. Android runtime is responsible for the scheduling and management of the Android system.

[0315] The core libraries contain two parts: one part is the functional functions that the Java language needs to call, and the other part is the core libraries of Android.

[0316] The application layer and the application framework layer run in the virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life - cycle management, stack management, thread management, security and exception management, and garbage collection.

[0317] The system libraries can include multiple functional modules. For example: surface manager, Media Libraries, 3D graphics processing libraries (such as OpenGL ES), 2D graphics engines (such as SGL), etc.

[0318] The surface manager is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications.

[0319] The media library supports the playback and recording of multiple common audio and video formats, as well as static image files, etc. The media library can support multiple audio and video coding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0320] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis, and layer processing, etc.

[0321] The 2D graphics engine is a drawing engine for 2D drawing.

[0322] The kernel layer is the layer between hardware and software. The kernel layer at least includes a display driver, a camera driver, an audio driver, a speed sensor driver, and a positioning sensor driver.

[0323] It can be understood that the above software structure is only exemplary and does not constitute a limitation on the software structure of the electronic device. In other embodiments, the electronic device may also have more or fewer structures, and this application does not make any restrictions in this regard.

[0324] Please refer to Figure 14 , Figure 14 which is a schematic diagram of an analog location processing device shown in an exemplary embodiment of the present application.

[0325] It should be understood that the analog location processing device 200 can execute the analog location processing method provided by the present application; the analog location processing device 200 includes: a first detection unit 210, a response unit 220, a second detection unit 230, a determination unit 240, and a generation unit 250.

[0326] The first detection unit 210 is used to detect a first operation on the analog location function in the settings application; the first operation includes an operation to turn on the analog location function and an operation to select a target application to use the analog location function.

[0327] The response unit 220 is used to respond to the first operation and store the operation result of the first operation through the core component.

[0328] The second detection unit 230 is used to detect that the location service application has inaccurate positioning.

[0329] The determination unit 240 is used to determine the status information of the analog location function based on the operation result stored in the core component; the status information includes the on / off status of the analog location function and the identification information of the target application;

[0330] A generation unit 250, configured to generate a first prompt message according to the status information; the first prompt message is used to indicate the correlation between the inaccurate positioning of the location service application and the status information.

[0331] It can be understood that these units included in the simulated location processing device 200 can also be used to execute other steps in the simulated location processing method provided above, which will not be elaborated here.

[0332] Since the simulated location processing device provided in the embodiments of the present application is used to execute the corresponding simulated location processing method provided above, therefore, the beneficial effects it can achieve can refer to the beneficial effects in the corresponding simulated location processing method provided above, which will not be elaborated here.

[0333] It should be noted that the above-mentioned simulated location processing device 200 is embodied in the form of functional units. The term "unit" here can be implemented in the form of software and / or hardware, and no specific limitation is made thereto.

[0334] For example, the "unit" can be a software program, a hardware circuit, or a combination of the two that implements the above functions. The hardware circuit may include an application specific integrated circuit (ASIC), an electronic circuit, a processor (such as a shared processor, a dedicated processor, or a group of processors, etc.) for executing one or more software or firmware programs, and a memory, a merged logic circuit, and / or other suitable components that support the described functions.

[0335] Therefore, the units of each example described in the embodiments of the present application can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.

[0336] The embodiments of the present application further provide a computer-readable storage medium, in which computer instructions are stored; when the computer-readable storage medium runs on a simulated location processing device, the simulated location processing device is caused to execute the simulated location processing method of any of the foregoing embodiments. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from a website, computer, server, or data center to another website, computer, server, or data center by wire (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wirelessly (such as infrared, wireless, microwave, etc.). The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or a data center that includes one or more integrated media. The available medium may be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium, or a semiconductor medium (for example, a solid state disk (SSD)).

[0337] The embodiments of the present application further provide a computer program product containing computer instructions. When it runs on a simulated location processing device, the simulated location processing device can be caused to execute the simulated location processing method of any of the foregoing embodiments.

[0338] The embodiments of the present application further provide a chip. Please refer to Figure 15 , Figure 15 which is a schematic structural diagram of a chip provided by the embodiments of the present application. Figure 15 The chip shown may be a general-purpose processor or a dedicated processor. The chip includes a processor 310. Among them, the processor 310 is used to execute the simulated location processing method of any of the foregoing embodiments.

[0339] Optionally, the chip further includes a transceiver 320, and the transceiver 320 is used to receive the control of the processor and support the simulated location processing device to execute the foregoing technical solutions.

[0340] Optionally, Figure 15 the chip shown may further include: a storage medium 330.

[0341] It should be noted that Figure 15The chip shown can be implemented using the following circuits or devices: one or more field programmable gate arrays (FPGAs), programmable logic devices (PLDs), controllers, state machines, gate logic, discrete hardware components, any other suitable circuits, or any combination of circuits capable of performing the various functions described throughout this application.

[0342] Among them, the electronic device, computer-readable storage medium, computer program product, or chip provided in this embodiment is all used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above, and will not be elaborated here.

[0343] Through the description of the above embodiments, those skilled in the art can understand that for the convenience and simplicity of description, only the above division of each functional module is used as an example. In actual applications, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.

[0344] In several embodiments provided in this application, it should be understood that the disclosed device and method can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there can be other division methods. For example, multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection between each other can be through some interfaces. The indirect coupling or communication connection of the device or unit can be in electrical, mechanical or other forms.

[0345] The unit described as a separate component may or may not be physically separated. The component displayed as a unit may be a physical unit or multiple physical units, that is, it can be located in one place, or it can be distributed to multiple different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0346] In addition, each functional unit in each embodiment of this application can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.

[0347] When the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiments of the present application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions for causing a device (which can be a single-chip microcomputer, a chip, etc.) or a processor to execute all or part of the steps of the methods of the various embodiments of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read only memory (ROM), random access memory (RAM), magnetic disks, or optical discs.

[0348] The above content is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by those skilled in the art within the technical scope disclosed by the present application should be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be within the protection scope of the claims.

Claims

1. A simulation position processing method, characterized in that: The method comprises: A first operation for setting a simulated location function in an application is detected; the first operation includes an operation of turning on the simulated location function and an operation of selecting a target application to use the simulated location function; Responding to the first operation, and storing the operation result of the first operation through the core component; The location service application detected inaccurate positioning; Based on the operation results stored by the core component, determine the status information of the simulated location function; the status information includes the activation status of the simulated location function and the identification information of the target application; A first prompt information is generated according to the status information; the first prompt information is used to indicate the correlation between the inaccurate positioning of the location service application and the status information.

2. The method according to claim 1, characterized in that The determining, based on the operation result stored by the core component, the state information of the simulated location function comprises: Encapsulating the operation results stored based on the core component to generate an interface corresponding to the setting application; Call the interface and obtain the return value returned by the interface; The status information is determined according to the return value.

3. The method according to claim 1, characterized in that The determining the status information according to the return value includes: detecting that the return value includes the first information, determining that the simulated location function is in an enabled state, and determining that the target application is selected; It is detected that the return value includes second information, it is determined that the target application uses the simulated location function, and identification information of the target application is determined according to the second information.

4. The method according to any one of claims 1 to 3, characterized in that: The core components include ContentProvider components.

5. The method according to claim 1, characterized in that The method further comprises: It is detected that the setting application has access rights; the access rights are used to access an application list corresponding to the simulated location function; the application list includes identification information of a target application that uses the simulated location function; Calling a preset method to obtain the application list; The status information is determined according to the application list.

6. The method according to claim 5, characterized in that Before calling the preset method through the preset instance to obtain the application list, the method further includes: detecting that the settings application does not have the access permission; Upgrade the current system; the settings application in the upgraded system has the access rights.

7. The method according to any one of claims 1 to 6, characterized in that: Before determining the state information of the simulated location function based on the operation result stored by the core component, the method further includes: It is detected that the target application is uninstalled, and the operation results stored based on the core component are cleared.

8. The method according to any one of claims 1 to 7, characterized in that: After generating the first prompt information according to the state information, the method further includes: A second operation for the simulated location function is detected; the second operation includes an operation of turning off the simulated location function; responding to the second operation; The location information in the location service application is updated.

9. The method according to any one of claims 1 to 8, characterized in that: The method further comprises: When an abnormality of the positioning hardware is detected, a second prompt information is generated; the second prompt information is used to indicate the correlation between the inaccurate positioning of the location service application and the positioning hardware.

10. An electronic device, characterized in that: The electronic device comprises: one or more processors, and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code comprises computer instructions, and the one or more processors call the computer instructions so that the electronic device executes the method as described in any one of claims 1 to 9.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium comprises instructions, which, when executed on an electronic device, enable the electronic device to perform the method as claimed in any one of claims 1 to 9.

12. A computer program product, characterized in that The computer program product comprises a computer program code which, when executed, causes the method according to any one of claims 1 to 9 to be performed.