Java Code Examples for org.appcelerator.kroll.common.Log#i()

The following examples show how to use org.appcelerator.kroll.common.Log#i() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GCMModule.java    From gcmpush with Apache License 2.0 5 votes vote down vote up
/**
 * Cancel a notification by the id given in the payload.
 * @param notificationId
 */
@Kroll.method
public void cancelNotificationById(int notificationId) {
    try {
        NotificationManager notificationManager = (NotificationManager) TiApplication.getInstance().getApplicationContext().getSystemService(TiApplication.NOTIFICATION_SERVICE);
        notificationManager.cancel(notificationId);
        Log.i(LCAT, "Notification " + notificationId + " cleared successfully");
    } catch (Exception ex) {
        Log.e(LCAT, "Cannot cancel notification:" + notificationId + " Error: " + ex.getMessage());
    }
}
 
Example 2
Source File: NovarumbluetoothModule.java    From NovarumBluetooth with MIT License 5 votes vote down vote up
@Kroll.method
public void enableBluetooth()
{
       if(!bluetoothAdapter.isEnabled())
       {
           bluetoothAdapter.enable();
           Log.i(TAG, "Bluetooth Enabled");
       }		
}
 
Example 3
Source File: NovarumbluetoothModule.java    From NovarumBluetooth with MIT License 5 votes vote down vote up
@Kroll.method
public void disableBluetooth()
{
       if(bluetoothAdapter.isEnabled())
       {
           bluetoothAdapter.disable();
           Log.i(TAG, "Bluetooth Disabled");
       }		
}