强制蓝牙权限请求对话框始终使用横向模式

时间:2017-05-26 06:59:16

标签: android bluetooth orientation

在我自己的应用程序中,我调用蓝牙功能,我想在横向模式下显示蓝牙权限请求对话框。

我知道如何强制Android活动始终使用横向模式,我已经达到了这个效果。但蓝牙权限请求对话框来自系统应用程序。那么如何控制它的方向?

I want the dialog landscape too

1 个答案:

答案 0 :(得分:0)

尝试在onconfigurationchanged()方法中编写相同的代码。当你改变方向活动将进入这种方法&不要onCreate()方法。 &安培;现在检查它会给你当前的结果。

 $(".updatemodul").click(function() {

                var vlue= $('#Referenceid').val();
                var $tableRow = $("td").filter(function() {
                    return $(this).text() == vlue;
                }).closest("tr");

                $.ajax({
                    type : 'POST',
                    url : 'submitonebyonestaff',
                    dataType : 'JSON',
                    data : {
                         allownce : $row.find(".allw").find("input").val(),         
                        Refid : $row.find(".t").text(),

                    },

                    success : function(data, success) {

                      $('#myModal').modal('hide');
                      var text6 = $tableRow.find(".allw").find("input").val(); 


                      alert("sucess")

                    },
                    error : function(data, error) {
                        alert("error")

                    }

                });

            });
        </script>