December 2013
Beginner
416 pages
12h 45m
English
For the On Your Bike app, taking photos is a nice feature, but it isn’t essential. You can just check whether the device has a camera and provide a default app to handle taking photographs. Follow these steps.
1. Create a new Java class named Camera in the com.androiddevbook.onyourbike.chapter8.helpers package. In the constructor, change the function to accept a single parameter of type Activity, and log that it has been called (see Listing 8.4).
Listing 8.4 Creating the Camera Java Class
public class Camera { public Camera(Activity activity) { CLASS_NAME = getClass().getName(); }}
2. As you have done before, you will use the CLASS_NAME static string to store ...
Read now
Unlock full access