Skip to content

Commit

Permalink
UI with SDK 1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
yadavmangesh committed Mar 21, 2019
1 parent 9f71b50 commit 810e29f
Show file tree
Hide file tree
Showing 42 changed files with 1,090 additions and 232 deletions.
9 changes: 6 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,15 @@ dependencies {
implementation 'com.android.support:support-annotations:28.0.0'
implementation 'com.github.bumptech.glide:glide:4.8.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'
// cometchat sdk
implementation 'com.cometchat:pro-android-chat-sdk:1.2.0'

//cometchat sdk
implementation 'com.cometchat:pro-android-chat-sdk:1.3.0'
implementation 'com.facebook.shimmer:shimmer:0.3.0'
implementation 'com.google.firebase:firebase-core:16.0.8'
implementation 'com.google.firebase:firebase-messaging:17.4.0'

}
apply plugin: 'com.google.gms.google-services'
repositories {
mavenCentral()
}

11 changes: 8 additions & 3 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@

<uses-feature android:name="android.hardware.camera.autofocus" />



<uses-feature
android:name="android.hardware.camera"
android:required="true" />
Expand All @@ -32,6 +30,12 @@
android:usesCleartextTraffic="true"
tools:replace="android:allowBackup">

<service android:name=".Fcm.MyFirebaseService">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>


<activity
android:name=".Activity.CometChatActivity"
Expand Down Expand Up @@ -63,13 +67,14 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

<activity
android:name=".Activity.GroupDetailActivity"
android:launchMode="singleTop"
android:screenOrientation="portrait" />
<activity android:name=".Activity.VideoViewActivity" />
<activity android:name=".Activity.IncomingCallActivity" />
<activity android:name=".Activity.CallActivity"></activity>
<activity android:name=".Activity.CallActivity"/>
</application>

</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import com.inscripts.cometchatpulse.demo.Contracts.CometChatActivityContract;
import com.inscripts.cometchatpulse.demo.Contracts.IncomingCallActivityContract;
import com.inscripts.cometchatpulse.demo.Contracts.StringContract;
import com.inscripts.cometchatpulse.demo.Fcm.MyFirebaseService;
import com.inscripts.cometchatpulse.demo.Fragments.ContactsFragment;
import com.inscripts.cometchatpulse.demo.Fragments.GroupListFragment;
import com.inscripts.cometchatpulse.demo.Helper.FabIconAnimator;
Expand Down Expand Up @@ -59,8 +60,6 @@ public class CometChatActivity extends AppCompatActivity implements

private CometChatActivityContract.CometChatActivityPresenter cometChatActivityPresenter;

private IncomingCallActivityContract.IncomingCallActivityPresenter incomingCallActivityPresenter;

private ViewPagerAdapter adapter;

private static final String TAG = "CometChatActivity";
Expand All @@ -73,13 +72,9 @@ protected void onCreate(Bundle savedInstanceState) {
context = this;
initViewComponents();
cometChatActivityPresenter = new CometChatActivityPresenter();
incomingCallActivityPresenter = new IncomingCallActivityPresenter();
cometChatActivityPresenter.attach(this);

}



private void initViewComponents() {

toolbar = findViewById(R.id.toolbar);
Expand All @@ -92,12 +87,13 @@ private void initViewComponents() {

getSupportActionBar().setTitle("");

MyFirebaseService.messageList=null;

Drawable groupDrawable = getResources().getDrawable(R.drawable.ic_group_add_white_24dp);

container = findViewById(R.id.constraint_container);
mainContent = findViewById(R.id.main_content);


fabIconAnimator = new FabIconAnimator(container);
fabIconAnimator.update(groupDrawable, R.string.group);
fabIconAnimator.setExtended(true);
Expand Down Expand Up @@ -142,14 +138,11 @@ public void onPageScrollStateChanged(int i) {
@Override
protected void onStart() {
super.onStart();


}

@Override
protected void onStop() {
super.onStop();

}


Expand All @@ -158,6 +151,7 @@ protected void onStop() {
@Override
protected void onResume() {
super.onResume();
MyFirebaseService.messageList=null;
cometChatActivityPresenter.addCallEventListener(context, TAG);
Log.d(TAG, "onResume: ");
cometChatActivityPresenter.addMessageListener(CometChatActivity.this,TAG);
Expand All @@ -169,21 +163,19 @@ protected void onResume() {
protected void onPause() {
super.onPause();
Log.d(TAG, "onPause: ");

cometChatActivityPresenter.removeMessageListener(TAG);
cometChatActivityPresenter.removeCallEventListener(TAG);
}

@Override
protected void onDestroy() {
super.onDestroy();

MyFirebaseService.messageList=null;
}

@Override
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
super.onActivityResult(requestCode, resultCode, data);

new GroupListFragment().onActivityResult(requestCode, resultCode, data);
mViewPager.setCurrentItem(2);
}
Expand Down
Loading

0 comments on commit 810e29f

Please sign in to comment.