手动切换耳机和扬声器模式。 [英] Manually switching between headphones and speaker mode.

查看:455
本文介绍了手动切换耳机和扬声器模式。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 


我的手机一直存在问题,一直认为耳机插入了耳机。我想为什么不制作应用程序手动切换到扬声器模式(我仍然是新手开发者)。


有没有办法诱使系统认为没有插入耳机?


随意询问更多信息。

解决方案

嗨Leif Rossau,


作为一个友好的提醒,请确保根据发布指南:主题行标记(https://social.msdn.microsoft.com/Forums/windowsapps/en- US / b479e984-ca39-4b34-a6b7-85194b54d8bd / guide-to-posting-subject-line-tags?forum = wpdevelop

您能否告诉我们您的APP是什么类型的?



那里是一个关于"在Windows应用商店应用中动态选择扬声器和耳机"的页面,其中包括以下文本。 Jesse Jiang在这个问题上有答案,你可以参考一下。链接是

https://social.msdn.microsoft.com/Forums/windowsapps/en-US/4b1966c0-62ba-4e0f-b2b8-8af3ab7e2ff5 /动态选择扬声器和耳机在windows-store-apps?forum = winappswithcsharp


  我们无法直接更改.NET环境。我们需要调用WSAPI来在C ++ / CX中执行此操作。


请查看此文件

http://social.msdn.microsoft.com/Forums/en-US/winappswithcsharp/ thread / f04e0629-2609-4542-a141-46166f4cbdeb


最好的问候,


guang9Bear


Hi, 

I've been having a problem with my phone, where it constantly thinks there are headphones plugged in. I thought why not make an app to manually switch to speaker mode (I'm still a novice developer).

Is there any way to trick the system into thinking that there are no headphones plugged in?

Feel free to ask for more information.

解决方案

Hi Leif Rossau,

As a friendly reminder please make sure to add the appropriate tags to the title of your post as per Guide to posting: subject line tags(https://social.msdn.microsoft.com/Forums/windowsapps/en-US/b479e984-ca39-4b34-a6b7-85194b54d8bd/guide-to-posting-subject-line-tags?forum=wpdevelop)
Could you tell us what type is your APP?

There is a page about "Dynamically choose between speakers and headphones in Windows Store Apps" which include the following text. Jesse Jiang has a answer in this question, you could refer to it. The link is https://social.msdn.microsoft.com/Forums/windowsapps/en-US/4b1966c0-62ba-4e0f-b2b8-8af3ab7e2ff5/dynamically-choose-between-speakers-and-headphones-in-windows-store-apps?forum=winappswithcsharp
 we cannot change this directly in .NET environment. We need to call WSAPI to do this in C++/CX.
Please check this document
http://social.msdn.microsoft.com/Forums/en-US/winappswithcsharp/thread/f04e0629-2609-4542-a141-46166f4cbdeb

Best Regards,

guang9Bear


这篇关于手动切换耳机和扬声器模式。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆