I´m trying to configure a Android Single Use app. I´m using a Huawei P8 Lite with Android 6.0 and a Samsung Galaxy A3 2017 with Android 6.0. I´ve set the app to Device Owner and everything works well. I´ve deactivated Toast messages via adb and set the home button to the app. So everything works fine. When I start the app you can´t leave it anymore, even with a restart. But now there are 2 problems left. On the Samsung it works fine to deactivate Toast messages with the adb code
adb shell appops set android TOAST_WINDOW deny
but on the Huawei it does not work. It doesn´t show an error.
The second problem I got with the Samsung. When I restart the Huawei and press the "Home" Button I get directly into the app without having to swipe at the lockscreen. When I open the app at the Samsung it´s the same, but after a restart I always get into the lockscreen before entering the app. This is a little problem because it´s possible to open the dropdown menu with swiping down. The buttons there do not work but I want to get directly into the app when I press the Home or Power button.
So my Questions are:
- How to deactivate the toast messages on the Huawei?
- How to deactivate the whole lockscreen on the Samsung?
Anyone got an idea?
Thanks
To bypass the lockscreen on the Samsung, you can try wake up the device by launching an activity as soon as the device starts, with the following flags
this.getWindow().setFlags(
WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD |
WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED |
WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON,
WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD |
WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED |
WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON);
copied from how to wakeup android phone from sleep?. Just make sure that you have chosen "None" as a screen lock type or called setKeyguardDisabled, which has the same effect.
To deactivate toast you need root privilege, so your device needs to be rooted and you need to do
adb root & adb shell appops set android TOAST_WINDOW deny
Related
I have implemented a React Player. On iPad & iPhone once I click over the start button the video starts and then immediately pauses. So, another click over the start button is needed.
later on, I've got the following error:
{"message":"The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission.","name":"NotAllowedError","method":"play"}
Note: it works well in windows.
i'm using firebase for my react PWA push notification , I've got everything setup for web app firebase push notification. when I try requesting a notification to desktop it works perfectly but on android devices when I send notification, event hough Postman gives success and message ID and etc but nothing shows on the screen neither in use, nor in background.
Not saying this is the answer in your case but, I had the same problem (notifications worked on desktop and IOS devices but not on Android). My problem was that I had notifications turned off. On your Android phone or tablet, open the Chrome app and try this.
To the right of the address bar, tap More. Settings. List item
Tap SiteSettings. Notifications.
At the top, turn the setting on or off.
I implemented a local notification test per this example https://www.codenameone.com/blog/local-notifications.html
I have the following two questions:
1) can I test local notifications from CN1 simulator. In the link above, I see a local notification test screenshot using the iPhone 6 simulator. Is there a way to force the app to run in background form the simulator in CN1?
2) If a local notification is sent when the app is running in foreground, I understand that the notification will not fire. Is the message lost in this case or is it queued somewhere?
Currently you can only test this on the device, it will work in the native simulator for iOS as you saw in the screeshot. You can run on the native iOS simulator using a Mac and include source.
The message would be lost if you fire in the foreground on iOS as it's the assumption that this is something you can notify within your app more effectively. You can determine if your app is in the foreground using the Display.isMinimized() method. In the foreground case you can use a tool like ToastBar to show a notification.
My app displays MPVolumeView button. When no earphone or bluetooth headset is not connected, clicking on this button shows two options. iPhone and iPhone speaker (for speaker and ear piece). This was perfectly fine till iOS 10. But on iOS 11, this button is disabled. It shows available routes only when connected to wireless headset.
I do not see any change or deprecated APIs in MPVolumeView. Anyone else seeing this issue?
Also a thing to note here is I still see old volume control indicator while I read about volume control indicator designed differently on iOS 11.
Figured out that I need to use AVRoutePickerView on iOS 11. This offers audio route options and also volume slider.
I can't figure out what is causing this issue on the BlackBerry Z10 where the mobile menu that I created for disinherited.com won't properly function as links.
The menu items won't click through to their href's or show their dropdown menus(javascript).
It works well on a number of other browsers and devices. This is just one that won't work.
Anybody have any suggestions as to what browser compatibility issues I might be missing?
The "About Us" link doesn't do anything for me (even on Desktop browsers).
I would guess that there might be some CSS (a layer maybe) that is interfering with the click/action event. I would suggest connecting remote web inspector to see what exactly is going on.
Did you know that BlackBerry 10 has some of the best remote web debugging capabilities?
Plug your device in via USB
Enable Settings -> Developer Mode
Open http://disinherited.com in the BlackBerry browser
from your desktop browser, open http://169.254.0.1:1337
You are connected to the live content, running on the BlackBerry, from your desktop browser. From there, you can inspect, debug, profile what your website is doing.