Correct Answer : Get Lastest Questions and Answer : Explanation: Open MainActivity.java. onCreateOptionsMenu method is responsible for creating a menu. Menu object is passed to this method as a parameter. We will add our menu items into this object. The adding procedure is simple, add method is used. This method takes the text of the menu item as a parameter. Let's add 4 items
public boolean onCreateOptionsMenu(Menu menu) { // TODO Auto-generated method stub
return super.onCreateOptionsMenu(menu); } onCreateOptionsMenu method returns a boolean result. True - show menu, False - do not show. So we could have made a checking of some condition, and as a result of this check do not show a menu returning False. We don't need this for now, so we delegate this choice to the method of superclass, it returns True by default.
Question : Which approval is necessary to execute Bluetooth actions such as connection requests, connection receipt, and data forwarding?
Correct Answer : Get Lastest Questions and Answer : Explanation: SensorManager lets you access the device's sensors. Get an instance of this class by calling Context.getSystemService() with the argument SENSOR_SERVICE.
Always make sure to disable sensors you don't need, especially when your activity is paused. Failing to do so can drain the battery in just a few hours. Note that the system will not disable sensors automatically when the screen turns off.