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
-> Android manifest | |
<service | |
android:name=".service.LocationService" | |
android:enabled="true" | |
android:exported="true" /> | |
----------------------------------------------------------------------------------------------------------------- | |
-> public class locationSevices |
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
-> Android manifest | |
<service | |
android:name=".service.LocationService" | |
android:enabled="true" | |
android:exported="true" /> | |
----------------------------------------------------------------------------------------------------------------- | |
-> public class locationSevices |
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
-> Android manifest | |
<service | |
android:name=".service.LocationService" | |
android:enabled="true" | |
android:exported="true" /> | |
----------------------------------------------------------------------------------------------------------------- | |
-> public class locationSevices |
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
ViewHolder (Kotlin) | |
val rlBackground = itemView.findViewById<RelativeLayout>(R.id.rlBackground) | |
// init color parse | |
Int color = Color.parseColor("#ff0000") | |
// init background color | |
rlBackground.setBackgroundColor(check) |
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
imageView.image = Qiscus.image(named: "ar_record")?.withRenderingMode(.alwaysTemplate) | |
imageView.layer.cornerRadius = 42 | |
imageView.clipsToBounds = true | |
imageView.tintColor = UIColor.red | |
imageView.backgroundColor = UIColor.white | |
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
a: [866, 7920, 5963, 194, 262, 8640, 4270, 4677, 4496, 9983, 4757, 5561, 4330, 4293, 1729, 6863, 4856, 385, 6528, 2557, 6466, 9925, 3908, 3334, 8456, 2636, 2115, 2399, 3582, 5177, 6277, 7729, 9504, 3436, 6132, 1891, 5826, 8201, 1367, 9537, 6238, 7177, 3577, 7404, 6402, 2109, 6541, 8948, 4178, 1890, 686, 1919, 625, 7936, 5426, 5514, 6433, 7422, 8870, 3995, 2800, 4755, 3424, 2561, 124, 5007, 6171, 5142, 5830, 7374, 2192, 7624, 9092, 419, 5382, 1602, 214, 51, 5994, 4155, 7945, 9545, 3569, 5550, 6377, 6726, 2259, 8703, 6729, 6429, 6138, 5074, 256, 497, 8635, 4092, 6835, 1833, 3868, 6741, 9833, 5406, 6762, 141, 4322, 7555, 4104, 6494, 9568, 509, 9700, 3886, 5164, 6082, 9390, 1915, 5022, 4411, 3422, 9844, 1970, 3730, 9694, 697, 8820, 1819, 3160, 9549, 5344, 4167, 6639, 4417, 3009, 925, 5563, 7686, 8262, 3895, 9214, 6311, 2834, 914, 8317, 9163, 5388, 6638, 192, 8396, 5940, 2648, 2959, 462, 4597, 9453, 8993, 9706, 9599, 362, 9865, 3701, 4113, 4191, 1617, 3811, 3766, 5812, 7723, 6352, 3676, 6938, 8040, 7493, 412, 9138 |
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
Qiscus.getChatConfig().setNotificationClickListener(new NotificationClickListener() { | |
@Override | |
public void onClick(final Context context, QiscusComment qiscusComment) { | |
QiscusChatRoom savedRoom = Qiscus.getDataStore().getChatRoom(qiscusComment.getRoomId()); | |
if (savedRoom != null) { | |
openChatroom(context, savedRoom); | |
} else { | |
QiscusApi.getInstance() | |
.getChatRoom(qiscusComment.getRoomId()) | |
.subscribeOn(Schedulers.io()) |
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 FirebaseService extends QiscusFirebaseService { | |
@Override | |
public void onMessageReceived(RemoteMessage remoteMessage) { | |
Map<String, String> data = remoteMessage.getData(); | |
Log.d("onMessageReceived", "onMessageReceived: " + data.toString()); | |
if (QiscusFirebaseService.handleMessageReceived(remoteMessage)) { // SDK PN, contains key qiscus_sdk |
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
@Override | |
protected int getItemViewTypeCustomMessage(QiscusComment qiscusComment, int position) { | |
try { | |
JSONObject payload = new JSONObject(qiscusComment.getExtraPayload()); | |
if (payload.optString("type").equals("survey")) { | |
return qiscusComment.getSenderEmail().equals(qiscusAccount.getEmail()) ? TYPE_SURVEY : TYPE_SURVEY_OTHERS; | |
} | |
} catch (JSONException ignored) { |
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
private void sendSurvey() { | |
String message = "Survey Qiscus"; | |
JSONObject payload = new JSONObject(); | |
try { | |
payload.put("sticker_url", "https://res.cloudinary.com/qiscus/image/upload/fxwzBRPcdz/Bubble-Pup-Yup.gif"); | |
payload.put("profile_url", "http://res.cloudinary.com/diufvqwbr/image/upload/v1507608923/logo_gb4lzy.png"); | |
payload.put("title_survey", "Qiscus@ Selles Survey"); | |
payload.put("date", "2017-10-29"); | |
payload.put("link_url", "https://www.qiscus.com/"); | |
} catch (JSONException e) { |
NewerOlder