Android Question Java Inline Code - Compile error

mmucek

Member
Licensed User
Longtime User
I try to use this inline java code:

B4X:
#If JAVA

import java.util.*;
import java.lang.String;
import android.net.Uri;
import android.content.ContentValues;
import org.json.JSONObject;

public static final String MANAGED_APPLICATION_PREFS_FEEDBACK_KEY = "ManagedApplicationPrefsFeedbackKey.";
public static final Uri CONTENT_URI = Uri.parse("content://com.promdm.fort.prefsprovider");

private void saveFeedbackToFortPrefsFile() {
Map<String, Object> feedbackMap = new HashMap<String, Object>();
ContentValues contentValues = new ContentValues();
String identifier = getApplicationContext().getPackageName();

feedbackMap.put("key1", "Object1");
feedbackMap.put("key2", "Object2");
feedbackMap.put("keyN", "ObjectN");

JSONObject jsonObject = new JSONObject(feedbackMap);
contentValues.put(MANAGED_APPLICATION_PREFS_FEEDBACK_KEY + identifier, jsonObject.toString());
getContentResolver().update(CONTENT_URI, contentValues, Null, Null);
}

#end if

But I get this error:

upload_2017-10-30_9-47-40.png


Any Ideas?
 
Top