Some htc phones seems to use a class of type HotspotProfile to keep its configuration. So, before callingsetWifiApEnabled, you need set the ssid in htc's way: [java]
Boolean isHtc = false; try {isHtc = WifiConfiguration. class. getDeclaredField ("mWifiApProfile ")! = Null;} catch (java. lang. noSuchFieldException e) {isHtc = false;} WifiConfiguration apConfig = new WifiConfiguration (); apConfig. SSID = "H3
Why do Android apps use MulticastSocket to listen for multicast? Why do they connect to different routes and run on different mobile phones? Some of them cannot receive multicast messages.
---------------------------!! Reprinted please indicate the source !! -----------------------
A project that uses Wi-Fi multicast to discover devices in the LAN. However, it is
obtained using ishell_getdeviceinfoex ()
Based on the information in aeedeviceinfo and aeedeviceitem, the application can dynamically load resource files. Of course, the resource information can also be stored on the server, and the application obtains the resource data through network communication, so as to adapt an application to different mobile phones.
If some mobile
To handle a wide range of resolutions and sizes.
For images, Android uses DPI as the unit. If you select an image, right-click the image under win and you will see the DPI attribute. The higher the DPI, the finer the image. For a mobile phone or display device, a pixel is a point, so DPI = PPI. In turn, it is often said that the height and height of the phone screen PPI are equivalent to the DPI value taken into account when writing a program.
The Retina screen of iPhone 4 is 326ppi, which belon
Mobile to show the same effect solution on different size phones by Fungleo preface, rethinkIn the previous project, I set in the CSS, that is html{font-size: 62.5%;} set to 10px , and then the whole station based on this grounding, to set rem the style of the unit. This solves a lot of problems. But in the face of different width of the phone, still need to adap
============ Problem Description ============Take a look at the pictureHowever, on the Xiaomi or Huawei phone, the date control shows 201 April-September-03, the month column more than a "month" word, this feeling very uncomfortable:Ask: The above question, is the handset compatibility question, or the control itself parameter questionWhat should be done to ensure that different phones show the same?=======
The most annoying thing about changing a mobile phone is the migration of the address book. Recently, there has been another job change. To change a mobile phone, we will first summarize the methods for migrating the address book as follows:
1) General Method
Function cannot be written by yourself on mobile phonesProgramThere is no good way to migrate it. You can only copy the address book to the sim, and then copy the address book from the SIM card to the target mobile phone. It is worth noti
This article summarizes and explains some solutions and knowledge for mobile H5 HD and multi-screen adaptation. Before the front-end development, visual MM will give us a psd file called the visual draft. For mobile development, in order to achieve the page HD effect, the specifications of visual drafts often follow the following two points :......,.
Background
Develop mobile terminal H5 page
Mobile phones with d
1. Add viewport tag to HTML headerAt the beginning of the Web site HTML file, add the viewport meta tag to tell the browser viewport width equal to the device screenwidth, without initial scaling. This line of code means that the page width defaults to the screen width (width=device-width), the original scale (initial-scale=1) is 1.0, that is, the initial size of the Web page occupies 100% of the screen area. The code is as follows:This code supports chrome, Firefox, IE9 or more browsers, but no
will automatically change the overall page scaling based on the dpi320 and width 640 ratio.@media (device-height:480px) and (-webkit-min-device-pixel-ratio:2) {/* compatible iphone4/4s */. class{}}@media (device-height:568px) and (-webkit-min-device-pixel-ratio:2) {/* compatible iphone5 */. class{}}@media (DEVICE-HEIGHT:667PX) and (-webkit-min-device-pixel-ratio:2) {/* compatible IPHONE6 */. class{}}@media (DEVICE-HEIGHT:736PX) and (-webkit-min-device-pixel-ratio:2) {/* compatible iphone6 Plus *
After my research during this period, I found that the size of the mobile phone screen does not matter whether the game can be fully displayed, because the resolution is different. For example, cocos2d-x for our developers to provide the resolution is 480*320, we can easily make the game full screen display, but the problem is the big point of the phone resolution?
Here is the resolution of some mobile phones
During development, two different but similar models are identified as the same model in the pea clip. For example, xt810 and mt810 are both identified as xt810 by the pea clip, the mt810 engineers are depressed because different models need to be treated differently. Because the pea clip is identified based on the device's PID and vid, we need to modify the phone's PID and vid.
This requirement involves th
This article mainly introduces how to determine the different event execution methods of mobile phones and PCs by js, so that you can determine whether the mobile phone or pc end can select the corresponding event execution function, it is a very practical technique. If you need it, you can refer to the examples in this article to describe how js judges different
Js determines how different event execution methods are selected on mobile phones and PCs, jspc
The example in this article describes how js judges different execution events on mobile phones and PCs. Share it with you for your reference. The details are as follows:
Determine whether it is a mobile phone:
function isMo
Phenomenon:MT6753 platform a project different phones will be the backlight height to the lowest, the minimum brightness error problem, some light, some dark. The phenomenon is more obvious.Analysis Process:First day:and TCL screen days together to verify, have the following conclusions:1.TCL and Yassi module, under the same motherboard, its minimum level=5 brightness is almost the same, the test data are a
can refer to the http://blog.csdn.net/vipzjyno1/article/details/25248021, which is written about the notice is good, but also very comprehensive, my this article is mainly to record their adaptation on the problems encountered.The unified way to create notifications:Notificationcompat.builder Mbuilder = New Notificationcompat.builder (mcontext);The management of notifications is to use Notificationmanager to manage notifications, using the following: Initialize the system service to be used, and
(-webkit-min-device-pixel-ratio:2) {/* compatible iphone5 */. class{}}@media (DEVICE-HEIGHT:667PX) and (-webkit-min-device-pixel-ratio:2) {/* compatible IPHONE6 */. class{}}Mode two, link to a separate style sheet, put the following code in the @media (DEVICE-HEIGHT:736PX) and (-webkit-min-device-pixel-ratio:2) {/* compatible iphone6 Plus */. class{}}Using JSDetermine if the iphone 4 or iphone 5 or iphone 6, IPhone6 PlusIsphone4inches = (window.screen.height==480);Isphone5inches = (window.scree
Mobile phones in various Android operating systems are a wide array of screens, and the differences in screen resolutions can be imagined. Currently, WVGA = 800x480, hvga = 480x320, and qvga = 320x240. Of course, there are also meizu M9 dvga = 960x640, and Motorola's fwvga = 854x480.
In fact, do you use a lot of padding in your layout XML file? If so, it hurts. This layout will never adapt to all cell phone screens.
The correct method should be to use
With the popularization of 3G, more and more people use mobile phones to surf the internet.The screen of the handset is smaller, the width is usually below 600 pixel, the PC screen width is generally above 1000 pixel (the current mainstream width is 1366x768), some also reach 2000 pixel. The same content, in different sizes of the screen, are showing satisfactory results, is not an easy thing.As a result, w
X can be interpreted as hdpi according to the mobile phone screen standard, 480x320 is mdpi, and 320x240 is ldpi. According to the latest data, hdpi and mdpi of all Android mobile phones account for a ratio of more;
System Version, up to 2.1 ~ The proportion of 2.3 is also an absolute proportion. We can use this as the basis for adaptation. we need to pay attention to this data at any time, especially in the months after the launch of a new version
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.