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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
1)Go to this line in your project file DetailedConversationAdapter.java | |
https://github.com/AppLozic/Applozic-Android-SDK/blob/master/mobicomkitui/src/main/java/com/applozic/mobicomkit/uiwidgets/conversation/adapter/DetailedConversationAdapter.java#L799 | |
2) | |
//Paste this code it will give you string userId in your activity intent based on that you can get and display your user profile screen | |
if (contactImage != null) { | |
contactImage.setOnClickListener(new View.OnClickListener() { | |
@Override |
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
1)Add this import statment | |
#import <Applozic/ALPushNotificationService.h> | |
2)In AppDelegate+notification.m file you need to replace this below code to handle the apns notifcation | |
- (void) application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo { | |
NSLog(@"clicked on the shade"); | |
ALPushNotificationService *pushNotificationService = [[ALPushNotificationService alloc] init]; | |
if([pushNotificationService isApplozicNotification:userInfo]){ |
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
ChannelUserMapper loggedInUserMapper = ChannelService.getInstance(this).getChannelUserMapperByUserId(groupId, MobiComUserPreference.getInstance(this).getUserId()); | |
if (alCustomizationSettings.isHideGroupAddMembersButton() || loggedInUserMapper != null && ChannelUserMapper.UserRole.MEMBER.getValue().equals(loggedInUserMapper.getRole()) || (!ChannelUtils.isAdminUserId(MobiComUserPreference.getInstance(this).getUserId(), channel) && loggedInUserMapper != null && Integer.valueOf(0).equals(loggedInUserMapper.getRole()))) { | |
//Here you can remove your menu options and make sure its visible by defualt | |
// example menu.removeItem(R.id.add_member_to_channel); | |
} |
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
build group info | |
1) | |
GroupInfoUpdate groupInfoUpdate = new GroupInfoUpdate(channelUserMapper.getKey());//groupId here | |
List<ChannelUsersFeed> channelUsersFeedList = new ArrayList<>(); | |
ChannelUsersFeed channelUsersFeed = new ChannelUsersFeed(); | |
channelUsersFeed.setUserId(channelUserMapper.getUserKey());//userid here whom you want to make admin or mod | |
channelUsersFeed.setRole(1); | |
channelUsersFeedList.add(channelUsersFeed); | |
groupInfoUpdate.setUsers(channelUsersFeedList); |
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
1) Open PermissionsUtils.java | |
public static boolean isStoragePermissionGranted(Context context) { | |
int storageRead = context.checkCallingOrSelfPermission(Manifest.permission.READ_EXTERNAL_STORAGE); | |
int storeWrite = context.checkCallingOrSelfPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE); | |
return ( storageRead == PackageManager.PERMISSION_GRANTED && storeWrite == PackageManager.PERMISSION_GRANTED ); | |
} | |
2)Open ConversationActivity.java file and find the method processCameraAction and replace the below complete code |
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
List<ChannelUserMapper> channelUserMapperList | |
= ChannelService.getInstance(this).getListOfUsersFromChannelUserMapper(channelKey);// pass the channe.getKey() group id | |
AppContactService appContactService = new AppContactService(this); | |
for (ChannelUserMapper channelUserMapper : channelUserMapperList) { | |
Contact contact = appContactService.getContactById(channelUserMapper.getUserKey()); | |
Log.i("Contact/user ", "object " + contact); //here you will get contact object then you can get the deatils of that user like display name, image etc | |
} |
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
add this | |
<meta-data android:name="com.package.name" | |
android:value="${applicationId}" /> <!-- NOTE: Do NOT change this, it should remain same i.e 'com.package.name' --> | |
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
<service | |
android:name="com.applozic.mobicomkit.api.notification.NotificationIntentService" | |
android:permission="android.permission.BIND_JOB_SERVICE" | |
android:exported="false" /> |
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
if( !message.hasAttachment()){ | |
return; | |
} | |
AttachmentManager attachmentManager = AttachmentManager.getInstance(); | |
if(message.getFileMetas().getContentType().contains("image") | |
|| message.getFileMetas().getContentType().contains("video")){ | |
AttachmentView attachmentView = new AttachmentView(context); |
OlderNewer