Uploads a note on OSM using the API and - * OAuth authentication.
+ *Uploads a note on OSM using the API and OAuth authentication.
* *This activity may be called twice during a single
* upload cycle: First to start the upload, then a second
@@ -37,7 +38,7 @@
*
* @author Most of the code was made by Nicolas Guillaumin, adapted by Jose Andrés Vargas Serrano
*/
-public class OpenStreetMapNotesUpload extends Activity {
+public class OpenStreetMapNotesUpload extends AppCompatActivity {
private static final String TAG = OpenStreetMapNotesUpload.class.getSimpleName();
@@ -51,19 +52,39 @@ public class OpenStreetMapNotesUpload extends Activity {
/** URL that the browser will call once the user is authenticated */
public final static String OAUTH2_CALLBACK_URL = "osmtracker://osm-upload/oath2-completed/";
- public final static int RC_AUTH = 7;
-
private AuthorizationService authService;
+ private ActivityResultLauncher