I try to use this inline java code:
But I get this error:
Any Ideas?
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:
Any Ideas?