This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.rasikagayan.android.criminalintent; | |
import android.content.Context; | |
import android.util.Log; | |
import java.util.ArrayList; | |
import java.util.UUID; | |
/** | |
* Created by Rasika Gayan on 12/3/2015. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class TestClassFromAPI extends IntentService { | |
private boolean isFlashOn = false; | |
private static Camera camera; | |
Context context ; | |
private static Camera.Parameters mParams; | |
PackageManager pm; | |
public TestClassFromAPI() { | |
super("TestClassFromAPI"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class FlashLightActivity extends AppCompatActivity { | |
private ImageButton mSwich; | |
private boolean isFlashOn; | |
private boolean isDeviceHasFlas; | |
private MediaPlayer mMediaPlayer; | |
@Override |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class FlashLightBackGroundService extends IntentService { | |
private static Camera mCamera; | |
private Camera.Parameters mParams; | |
public FlashLightBackGroundService() { | |
super("FlashLightBackGroundService"); | |
} | |
@Override |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.rasikag.androidflashlight"> | |
<uses-permission android:name="android.permission.CAMERA" /> | |
<uses-permission android:name="android.permission.FLASHLIGHT" /> | |
<uses-feature android:name="android.hardware.camera" /> | |
<application | |
android:allowBackup="true" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
An error occurred while calling method 'ConfigureServices' on startup class 'Startup'. Consider using IDbContextFactory to override the initialization of the DbContext at design-time. Error: This method could not find a user secret ID because the application's entry assembly is not set. Try using the ".AddUserSecrets(string userSecretsId)" or ".AddUserSecrets<TStartup>()" method instead. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public IHttpActionResult CreateTrigger() | |
{ | |
logger.Error("start point of create trigger"); | |
try | |
{ | |
new CheckMode(); | |
} | |
catch (Exception ex) | |
{ | |
logger.Error("Message: "+ex.Message + Environment.NewLine + "Stack Trace: "+ ex.StackTrace); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CheckMode | |
{ | |
private readonly static Lazy<CheckMode> _instance | |
= new Lazy<CheckMode>(() => new CheckMode( | |
GlobalHost.ConnectionManager.GetHubContext<ModeChangesUpdateHub>().Clients) | |
); | |
private IHubConnectionContext<dynamic> Clients { get; set; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[HubName("ModeChangesUpdater")] | |
public class ModeChangesUpdateHub : Hub | |
{ | |
private readonly CheckMode _checkMode; | |
public ModeChangesUpdateHub() : | |
this(CheckMode.Instance) | |
{ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Product | |
{ | |
public string Name { get; private set; } | |
public decimal Price { get; private set; } | |
public Product(string name, decimal price) | |
{ | |
Name = name; | |
Price = price; | |
} |
OlderNewer