Experience in Windows Phone 7 (3. Development Q & ))

Source: Internet
Author: User
Tags visual studio 2010

Microsoft recently listed some answers to common questions about Windows Phone 7 Series development on the official forum of Windows Phone 7 Series. Some questions we have never been clear about before (such as multitasking, sandbox, network and so on. In order to facilitate translation, I hope to help you. Of course, if you want to view the original text, you will get a more accurate understanding.

--------------------------------------------------------------------------------

Application Process in front and back
Can my program run in the background?
No. Windows Phone 7 Series application models can only be executed on the foreground. If another program (third-party or built-in) is started when your program is running, you will receive an event notification about the termination of your program.
What will happen when my program leaves the front desk?
Your application will receive a notification that it will be disabled. When your application leaves the front-end, it is not terminated immediately. If you need to retain the status, you need to write some logic to handle these tasks.
What happens when my program runs again after it leaves the foreground?
Your application will start to run in the initial state. If you need to retain the status, you should write your own logic to determine whether the status is retained and restored.
Does this mean there is no way to write an application for effective background updates?
No! We provide the Push Notification service that can be used by your application. For example, chat programs, games in turn, and other types of programs that depend on external events can use Push Notification perfectly. You can learn more about Push Notification from this MSDN article: http://msdn.microsoft.com/en-us/library/ff402558%28VS.92%29.aspx
If my program is not running, can I use Push Notification to start my program?
Cannot run directly. When you receive a Push Notification to your program, the token of your program can be updated to this new information. At this time, the user will be prompted to start your program. The program does not start automatically.
Can I set a timer to start my program?
No. Whether or not to start your program depends on the user.
Can my program be started by system events?
Not likely, but it is still a problem. In most cases, it is impossible for a system event to start your program. However, when your program starts, you may get a notification cache. We will publish more information about this situation. If I don't need a user interface, can I compile a service DLL to reside in the system?
No, you cannot write System Service DLL. All the assemblies will run in their own independent sandbox, isolated from the operating system and other applications.

Application installation
How can I install an application on a device?
The application will be automatically installed after being downloaded from MarketPlace.
Can I manually install the application without using MarketPlace?
No. You cannot install the application on your own. The only way to get an application is through MarketPlace.
If I cannot press the status, how can I test my application?
As a registered developer, you are allowed to register devices to directly deploy your applications for testing. You do not need to deploy it on the MarketPlace for testing.
My applications are only for our company or some special groups. How can I distribute these applications to them only through MarketPlace?
Currently, MarketPlace cannot lock a region for a private application. Of course, there are exceptions for mobile operators. At present, there is no way to restrict your programs against special groups or devices ..

Device connectivity
Are we still using ActiveSyncIs to connect the device to the computer?
No, automatic synchronization is like connecting Zune HD to a computer.
How can I transmit data over the Internet?
Web technologies such as HTTPGET or WebServices will be used for communication over the Internet. When your program is not running, you can use Push Notification for communication.
Can I use Socket for point-to-point communication?
Currently, Windows Phone 7 Series does not directly support Socket classes. Although the Silverlight on the mobile phone is as close as possible to the Silverlight 3 feature list on the desktop, however, it only provides a subset of these features, so it does not contain all classes (of course, it also makes some extensions for Silverlight 3 ).
How can I connect to other clients in real time?
Currently, the original version of Windows Phone 7 Series does not support point-to-point communication. We will always evaluate the needs of developers and users. Maybe we will decide to add this feature in the future.

Hub/platform/Tab and other components missing from Silverlight
Where are the "Hub" controls I have seen in so many demos?
In the demo on MIX, the "Hub" and "Hub" controls we see are still improving and are not included in the current tool.
When will they be available?
There is no specific timetable for these controls at present, but the product group will pay close attention to the developer community to understand what kind of useful controls developers need. If you want a widget that does not exist, leave a message in the Forum.
Can I create one by myself?
Of course, you can make your own controls. However, you need to understand that the volume/Hub control is a very important requirement and the opportunity is good, but these may be released as part of the official tool in the future.

Device Storage
What is "Isolated Storage"
"Isolated Storage" involves the space occupied by your program in the file system of the device. You will not be able to access content other than this space (including space of other applications or operating systems .) This will provide your programs with a self-managed and secure sandbox, and prevent other programs from being accidentally (or maliciously) intruded into your application space.
Are there any local databases available on Windows Phone 7 Series devices?
No. No local database API is available on the original Windows Phone 7 Series.
How should I store information for my applications?
You can store information in your bucket. If you need a large database, here are some options: Windows Phone 7 Seires already supports WebServices, which allows you to easily access information stored on the Internet. With a database that can be accessed by WebServices, your applications can obtain data in real time when connected to the Internet.
How can we deal with non-connection scenarios?
If you are not connected to the Internet, you will not be able to access the data of cloud services. In this case, it is recommended that your program process data in multiple ways (Cache custom format data on the device to remind the user of a lack of connection ).
My applications tend to be used in non-connection scenarios. What should I do if I cannot access cloud services?
There are two solutions for this scenario:
• Develop your own data format and store the data in the device's storage space.
• Continue to develop applications for Windows Phone 6.5 or earlier versions that support local databases.
Will the local database be supported in the future?
At present, we have not announced such a plan to add this feature, but we will pay close attention to the needs of developers and users and identify which features will benefit everyone.

Native Code support
Can I use c ++ to write my applications?
No. Currently, C # is the only supported development language on the Windows Phone 7 Series platform.
Can I use VB to write my applications?
Not yet, but we will strongly consider this in future development tools.
Can I use P/Invoke to call the system API?
No. As an ISV, P/Invoke cannot be used to access system APIs. Any program that tries to use P/Invoke will be returned from the MarketPlace.
Can I use P/Invoke to drop my native dll?
No, native code cannot run as part of your application. P/Invoke is not allowed.

Tool Installation Problems
My Installation failed
Before posting your failure to the Forum, check the System Event Logs to provide clues.
My installation is complete, but I cannot run Visual Studio 2010 Express for Windows Mobile. What should I do?
This naturally depends on the errors you encounter. Here are some basic instructions:
• First, check the release notes to ensure that your system meets the requirements and is not listed here. Http://download.microsoft.com/download/D/9/2/D926FB38-BB43-4D87-AE5A-1A3391279FAC/ReleaseNotes.htm)
• If you encounter a permission issue with the Registry or file, try to run the application as administrator.
• If you have not restarted, try restarting. For some people, it will clear many problems.
I get an error "The application cannot start ".
Please refer to the description of this Blog: http://blogs.msdn.com/visualstudio/archive/2009/10/29/how-to-fix-the-application-cannot-start-error.aspx

Silverlight, XNA, and Compact Framework
What version of Silverlight is used on the mobile phone?
The Silverlight version on the mobile phone is very close to the subset of Silverlight 3 on the desktop. There are also some special features for mobile phones not available on Silverlight 3. However, many programs running normally on Silverlight 3 on the desktop can also run normally on mobile phones.
Can I call the XNA library in Silverlight?
Silverlight and XNA use the basic code on the same Compact Framework. If this call does not have graphical user interface interaction, they can be shared between Silverlight and XNA in most cases.

 

This article from the CSDN blog, reproduced please indicate the source: http://blog.csdn.net/twodays/archive/2010/03/22/5403918.aspx

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.