SlideShare a Scribd company logo
Creating a WhatsApp Clone - Part III
package com.codename1.whatsapp.model;
import java.util.List;
public interface ServerMessages {
public void connected();
public void disconnected();
public void messageReceived(ChatMessage m);
public void userTyping(String contactId);
public void messageViewed(String messageId, List<String> userIds);
}
ServerMessages
package com.codename1.whatsapp.model;
import java.util.List;
public interface ServerMessages {
public void connected();
public void disconnected();
public void messageReceived(ChatMessage m);
public void userTyping(String contactId);
public void messageViewed(String messageId, List<String> userIds);
}
ServerMessages
package com.codename1.whatsapp.model;
import java.util.List;
public interface ServerMessages {
public void connected();
public void disconnected();
public void messageReceived(ChatMessage m);
public void userTyping(String contactId);
public void messageViewed(String messageId, List<String> userIds);
}
ServerMessages
public class ChatContact implements PropertyBusinessObject {
public final Property<String, ChatContact> id = new Property<>("id");
public final Property<String, ChatContact> localId =
new Property<>("localId");
public final Property<String, ChatContact> phone =
new Property<>("phone");
public final Property<Image, ChatContact> photo =
new Property<>("photo", Image.class);
public final Property<String, ChatContact> name =
new Property<>("name");
public final Property<String, ChatContact> tagline =
new Property<>("tagline");
public final Property<String, ChatContact> token =
new Property<>("token");
public final SetProperty<String, ChatContact> members =
new SetProperty<>("members", String.class);
public final SetProperty<String, ChatContact> admins =
new SetProperty<>("admins", String.class);
public final LongProperty<ChatContact> muteUntil =
ChatContact
public class ChatContact implements PropertyBusinessObject {
public final Property<String, ChatContact> id = new Property<>("id");
public final Property<String, ChatContact> localId =
new Property<>("localId");
public final Property<String, ChatContact> phone =
new Property<>("phone");
public final Property<Image, ChatContact> photo =
new Property<>("photo", Image.class);
public final Property<String, ChatContact> name =
new Property<>("name");
public final Property<String, ChatContact> tagline =
new Property<>("tagline");
public final Property<String, ChatContact> token =
new Property<>("token");
public final SetProperty<String, ChatContact> members =
new SetProperty<>("members", String.class);
public final SetProperty<String, ChatContact> admins =
new SetProperty<>("admins", String.class);
public final LongProperty<ChatContact> muteUntil =
ChatContact
public class ChatContact implements PropertyBusinessObject {
public final Property<String, ChatContact> id = new Property<>("id");
public final Property<String, ChatContact> localId =
new Property<>("localId");
public final Property<String, ChatContact> phone =
new Property<>("phone");
public final Property<Image, ChatContact> photo =
new Property<>("photo", Image.class);
public final Property<String, ChatContact> name =
new Property<>("name");
public final Property<String, ChatContact> tagline =
new Property<>("tagline");
public final Property<String, ChatContact> token =
new Property<>("token");
public final SetProperty<String, ChatContact> members =
new SetProperty<>("members", String.class);
public final SetProperty<String, ChatContact> admins =
new SetProperty<>("admins", String.class);
public final LongProperty<ChatContact> muteUntil =
ChatContact
public class ChatContact implements PropertyBusinessObject {
public final Property<String, ChatContact> id = new Property<>("id");
public final Property<String, ChatContact> localId =
new Property<>("localId");
public final Property<String, ChatContact> phone =
new Property<>("phone");
public final Property<Image, ChatContact> photo =
new Property<>("photo", Image.class);
public final Property<String, ChatContact> name =
new Property<>("name");
public final Property<String, ChatContact> tagline =
new Property<>("tagline");
public final Property<String, ChatContact> token =
new Property<>("token");
public final SetProperty<String, ChatContact> members =
new SetProperty<>("members", String.class);
public final SetProperty<String, ChatContact> admins =
new SetProperty<>("admins", String.class);
public final LongProperty<ChatContact> muteUntil =
ChatContact
public class ChatContact implements PropertyBusinessObject {
public final Property<String, ChatContact> id = new Property<>("id");
public final Property<String, ChatContact> localId =
new Property<>("localId");
public final Property<String, ChatContact> phone =
new Property<>("phone");
public final Property<Image, ChatContact> photo =
new Property<>("photo", Image.class);
public final Property<String, ChatContact> name =
new Property<>("name");
public final Property<String, ChatContact> tagline =
new Property<>("tagline");
public final Property<String, ChatContact> token =
new Property<>("token");
public final SetProperty<String, ChatContact> members =
new SetProperty<>("members", String.class);
public final SetProperty<String, ChatContact> admins =
new SetProperty<>("admins", String.class);
public final LongProperty<ChatContact> muteUntil =
ChatContact
public class ChatContact implements PropertyBusinessObject {
public final Property<String, ChatContact> id = new Property<>("id");
public final Property<String, ChatContact> localId =
new Property<>("localId");
public final Property<String, ChatContact> phone =
new Property<>("phone");
public final Property<Image, ChatContact> photo =
new Property<>("photo", Image.class);
public final Property<String, ChatContact> name =
new Property<>("name");
public final Property<String, ChatContact> tagline =
new Property<>("tagline");
public final Property<String, ChatContact> token =
new Property<>("token");
public final SetProperty<String, ChatContact> members =
new SetProperty<>("members", String.class);
public final SetProperty<String, ChatContact> admins =
new SetProperty<>("admins", String.class);
public final LongProperty<ChatContact> muteUntil =
ChatContact
public class ChatContact implements PropertyBusinessObject {
public final Property<String, ChatContact> id = new Property<>("id");
public final Property<String, ChatContact> localId =
new Property<>("localId");
public final Property<String, ChatContact> phone =
new Property<>("phone");
public final Property<Image, ChatContact> photo =
new Property<>("photo", Image.class);
public final Property<String, ChatContact> name =
new Property<>("name");
public final Property<String, ChatContact> tagline =
new Property<>("tagline");
public final Property<String, ChatContact> token =
new Property<>("token");
public final SetProperty<String, ChatContact> members =
new SetProperty<>("members", String.class);
public final SetProperty<String, ChatContact> admins =
new SetProperty<>("admins", String.class);
public final LongProperty<ChatContact> muteUntil =
ChatContact
new Property<>("name");
public final Property<String, ChatContact> tagline =
new Property<>("tagline");
public final Property<String, ChatContact> token =
new Property<>("token");
public final SetProperty<String, ChatContact> members =
new SetProperty<>("members", String.class);
public final SetProperty<String, ChatContact> admins =
new SetProperty<>("admins", String.class);
public final LongProperty<ChatContact> muteUntil =
new LongProperty<>("muteUntil");
public final Property<String, ChatContact> createdBy =
new Property<>("createdBy");
public final Property<Date, ChatContact> creationDate =
new Property<>("creationDate", Date.class);
public final Property<Date, ChatContact> lastActivityTime =
new Property<>("lastActivityTime", Date.class);
public final ListProperty<ChatMessage, ChatContact> chats =
new ListProperty<>("chat", ChatMessage.class);
private final PropertyIndex idx = new PropertyIndex(this, "ChatContact",
id, localId, phone, photo, name, tagline, token, members, admins,
ChatContact
new Property<>("name");
public final Property<String, ChatContact> tagline =
new Property<>("tagline");
public final Property<String, ChatContact> token =
new Property<>("token");
public final SetProperty<String, ChatContact> members =
new SetProperty<>("members", String.class);
public final SetProperty<String, ChatContact> admins =
new SetProperty<>("admins", String.class);
public final LongProperty<ChatContact> muteUntil =
new LongProperty<>("muteUntil");
public final Property<String, ChatContact> createdBy =
new Property<>("createdBy");
public final Property<Date, ChatContact> creationDate =
new Property<>("creationDate", Date.class);
public final Property<Date, ChatContact> lastActivityTime =
new Property<>("lastActivityTime", Date.class);
public final ListProperty<ChatMessage, ChatContact> chats =
new ListProperty<>("chat", ChatMessage.class);
private final PropertyIndex idx = new PropertyIndex(this, "ChatContact",
id, localId, phone, photo, name, tagline, token, members, admins,
ChatContact
new Property<>("name");
public final Property<String, ChatContact> tagline =
new Property<>("tagline");
public final Property<String, ChatContact> token =
new Property<>("token");
public final SetProperty<String, ChatContact> members =
new SetProperty<>("members", String.class);
public final SetProperty<String, ChatContact> admins =
new SetProperty<>("admins", String.class);
public final LongProperty<ChatContact> muteUntil =
new LongProperty<>("muteUntil");
public final Property<String, ChatContact> createdBy =
new Property<>("createdBy");
public final Property<Date, ChatContact> creationDate =
new Property<>("creationDate", Date.class);
public final Property<Date, ChatContact> lastActivityTime =
new Property<>("lastActivityTime", Date.class);
public final ListProperty<ChatMessage, ChatContact> chats =
new ListProperty<>("chat", ChatMessage.class);
private final PropertyIndex idx = new PropertyIndex(this, "ChatContact",
id, localId, phone, photo, name, tagline, token, members, admins,
ChatContact
new Property<>("name");
public final Property<String, ChatContact> tagline =
new Property<>("tagline");
public final Property<String, ChatContact> token =
new Property<>("token");
public final SetProperty<String, ChatContact> members =
new SetProperty<>("members", String.class);
public final SetProperty<String, ChatContact> admins =
new SetProperty<>("admins", String.class);
public final LongProperty<ChatContact> muteUntil =
new LongProperty<>("muteUntil");
public final Property<String, ChatContact> createdBy =
new Property<>("createdBy");
public final Property<Date, ChatContact> creationDate =
new Property<>("creationDate", Date.class);
public final Property<Date, ChatContact> lastActivityTime =
new Property<>("lastActivityTime", Date.class);
public final ListProperty<ChatMessage, ChatContact> chats =
new ListProperty<>("chat", ChatMessage.class);
private final PropertyIndex idx = new PropertyIndex(this, "ChatContact",
id, localId, phone, photo, name, tagline, token, members, admins,
ChatContact
new Property<>("name");
public final Property<String, ChatContact> tagline =
new Property<>("tagline");
public final Property<String, ChatContact> token =
new Property<>("token");
public final SetProperty<String, ChatContact> members =
new SetProperty<>("members", String.class);
public final SetProperty<String, ChatContact> admins =
new SetProperty<>("admins", String.class);
public final LongProperty<ChatContact> muteUntil =
new LongProperty<>("muteUntil");
public final Property<String, ChatContact> createdBy =
new Property<>("createdBy");
public final Property<Date, ChatContact> creationDate =
new Property<>("creationDate", Date.class);
public final Property<Date, ChatContact> lastActivityTime =
new Property<>("lastActivityTime", Date.class);
public final ListProperty<ChatMessage, ChatContact> chats =
new ListProperty<>("chat", ChatMessage.class);
private final PropertyIndex idx = new PropertyIndex(this, "ChatContact",
id, localId, phone, photo, name, tagline, token, members, admins,
ChatContact
new Property<>("name");
public final Property<String, ChatContact> tagline =
new Property<>("tagline");
public final Property<String, ChatContact> token =
new Property<>("token");
public final SetProperty<String, ChatContact> members =
new SetProperty<>("members", String.class);
public final SetProperty<String, ChatContact> admins =
new SetProperty<>("admins", String.class);
public final LongProperty<ChatContact> muteUntil =
new LongProperty<>("muteUntil");
public final Property<String, ChatContact> createdBy =
new Property<>("createdBy");
public final Property<Date, ChatContact> creationDate =
new Property<>("creationDate", Date.class);
public final Property<Date, ChatContact> lastActivityTime =
new Property<>("lastActivityTime", Date.class);
public final ListProperty<ChatMessage, ChatContact> chats =
new ListProperty<>("chat", ChatMessage.class);
private final PropertyIndex idx = new PropertyIndex(this, "ChatContact",
id, localId, phone, photo, name, tagline, token, members, admins,
ChatContact
new Property<>("createdBy");
public final Property<Date, ChatContact> creationDate =
new Property<>("creationDate", Date.class);
public final Property<Date, ChatContact> lastActivityTime =
new Property<>("lastActivityTime", Date.class);
public final ListProperty<ChatMessage, ChatContact> chats =
new ListProperty<>("chat", ChatMessage.class);
private final PropertyIndex idx = new PropertyIndex(this, "ChatContact",
id, localId, phone, photo, name, tagline, token, members, admins,
muteUntil, createdBy, creationDate, lastActivityTime, chats);
@Override
public PropertyIndex getPropertyIndex() {
return idx;
}
public ChatContact() {
idx.setExcludeFromJSON(photo, true);
}
private static final int SMALL_IMAGE = 0;
private static final int LARGE_IMAGE = 1;
ChatContact
return idx;
}
public ChatContact() {
idx.setExcludeFromJSON(photo, true);
}
private static final int SMALL_IMAGE = 0;
private static final int LARGE_IMAGE = 1;
private static final float[] IMAGE_SIZES = {4f, 6.5f};
private static final Image[] maskImage = new Image[2];
private static final Object[] maskObject = new Object[2];
private static final EncodedImage[] placeholder = new EncodedImage[2];
private static Image createMaskImage(int size) {
Image m = Image.createImage(size, size, 0);
Graphics g = m.getGraphics();
g.setAntiAliased(true);
g.setColor(0xffffff);
g.fillArc(0, 0, size - 1, size -1, 0, 360);
return m;
}
ChatContact
return idx;
}
public ChatContact() {
idx.setExcludeFromJSON(photo, true);
}
private static final int SMALL_IMAGE = 0;
private static final int LARGE_IMAGE = 1;
private static final float[] IMAGE_SIZES = {4f, 6.5f};
private static final Image[] maskImage = new Image[2];
private static final Object[] maskObject = new Object[2];
private static final EncodedImage[] placeholder = new EncodedImage[2];
private static Image createMaskImage(int size) {
Image m = Image.createImage(size, size, 0);
Graphics g = m.getGraphics();
g.setAntiAliased(true);
g.setColor(0xffffff);
g.fillArc(0, 0, size - 1, size -1, 0, 360);
return m;
}
ChatContact
return idx;
}
public ChatContact() {
idx.setExcludeFromJSON(photo, true);
}
private static final int SMALL_IMAGE = 0;
private static final int LARGE_IMAGE = 1;
private static final float[] IMAGE_SIZES = {4f, 6.5f};
private static final Image[] maskImage = new Image[2];
private static final Object[] maskObject = new Object[2];
private static final EncodedImage[] placeholder = new EncodedImage[2];
private static Image createMaskImage(int size) {
Image m = Image.createImage(size, size, 0);
Graphics g = m.getGraphics();
g.setAntiAliased(true);
g.setColor(0xffffff);
g.fillArc(0, 0, size - 1, size -1, 0, 360);
return m;
}
ChatContact
return idx;
}
public ChatContact() {
idx.setExcludeFromJSON(photo, true);
}
private static final int SMALL_IMAGE = 0;
private static final int LARGE_IMAGE = 1;
private static final float[] IMAGE_SIZES = {4f, 6.5f};
private static final Image[] maskImage = new Image[2];
private static final Object[] maskObject = new Object[2];
private static final EncodedImage[] placeholder = new EncodedImage[2];
private static Image createMaskImage(int size) {
Image m = Image.createImage(size, size, 0);
Graphics g = m.getGraphics();
g.setAntiAliased(true);
g.setColor(0xffffff);
g.fillArc(0, 0, size - 1, size -1, 0, 360);
return m;
}
ChatContact
return idx;
}
public ChatContact() {
idx.setExcludeFromJSON(photo, true);
}
private static final int SMALL_IMAGE = 0;
private static final int LARGE_IMAGE = 1;
private static final float[] IMAGE_SIZES = {4f, 6.5f};
private static final Image[] maskImage = new Image[2];
private static final Object[] maskObject = new Object[2];
private static final EncodedImage[] placeholder = new EncodedImage[2];
private static Image createMaskImage(int size) {
Image m = Image.createImage(size, size, 0);
Graphics g = m.getGraphics();
g.setAntiAliased(true);
g.setColor(0xffffff);
g.fillArc(0, 0, size - 1, size -1, 0, 360);
return m;
}
ChatContact
Graphics g = m.getGraphics();
g.setAntiAliased(true);
g.setColor(0xffffff);
g.fillArc(0, 0, size - 1, size -1, 0, 360);
return m;
}
private Image createPlaceholder(int size) {
Image i = Image.createImage(size, size, 0xffe2e7ea);
Graphics g = i.getGraphics();
g.setAntiAliased(true);
g.setAntiAliasedText(true);
g.setColor(0xffffff);
Font fnt = FontImage.getMaterialDesignFont().
derive(size, Font.STYLE_PLAIN);
g.setFont(fnt);
String s = "" + FontImage.MATERIAL_PERSON;
g.drawString(s, size / 2 - fnt.stringWidth(s) / 2, 0);
return i;
}
private Image getImage(int offset) {
ChatContact
return i;
}
private Image getImage(int offset) {
if(maskImage[offset] == null) {
maskImage[offset] =
createMaskImage(convertToPixels(IMAGE_SIZES[offset]));
maskObject[offset] = maskImage[offset].createMask();
Image i = createPlaceholder(
convertToPixels(IMAGE_SIZES[offset]));
placeholder[offset] = EncodedImage.createFromImage(
i.applyMask(maskObject[offset]), false);
}
if(photo.get() == null) {
return placeholder[offset];
}
return photo.get().
fill(maskImage[offset].getWidth(),
maskImage[offset].getHeight()).
applyMask(maskObject[offset]);
}
ChatContact
return i;
}
private Image getImage(int offset) {
if(maskImage[offset] == null) {
maskImage[offset] =
createMaskImage(convertToPixels(IMAGE_SIZES[offset]));
maskObject[offset] = maskImage[offset].createMask();
Image i = createPlaceholder(
convertToPixels(IMAGE_SIZES[offset]));
placeholder[offset] = EncodedImage.createFromImage(
i.applyMask(maskObject[offset]), false);
}
if(photo.get() == null) {
return placeholder[offset];
}
return photo.get().
fill(maskImage[offset].getWidth(),
maskImage[offset].getHeight()).
applyMask(maskObject[offset]);
}
ChatContact
return i;
}
private Image getImage(int offset) {
if(maskImage[offset] == null) {
maskImage[offset] =
createMaskImage(convertToPixels(IMAGE_SIZES[offset]));
maskObject[offset] = maskImage[offset].createMask();
Image i = createPlaceholder(
convertToPixels(IMAGE_SIZES[offset]));
placeholder[offset] = EncodedImage.createFromImage(
i.applyMask(maskObject[offset]), false);
}
if(photo.get() == null) {
return placeholder[offset];
}
return photo.get().
fill(maskImage[offset].getWidth(),
maskImage[offset].getHeight()).
applyMask(maskObject[offset]);
}
ChatContact
return i;
}
private Image getImage(int offset) {
if(maskImage[offset] == null) {
maskImage[offset] =
createMaskImage(convertToPixels(IMAGE_SIZES[offset]));
maskObject[offset] = maskImage[offset].createMask();
Image i = createPlaceholder(
convertToPixels(IMAGE_SIZES[offset]));
placeholder[offset] = EncodedImage.createFromImage(
i.applyMask(maskObject[offset]), false);
}
if(photo.get() == null) {
return placeholder[offset];
}
return photo.get().
fill(maskImage[offset].getWidth(),
maskImage[offset].getHeight()).
applyMask(maskObject[offset]);
}
ChatContact
return i;
}
private Image getImage(int offset) {
if(maskImage[offset] == null) {
maskImage[offset] =
createMaskImage(convertToPixels(IMAGE_SIZES[offset]));
maskObject[offset] = maskImage[offset].createMask();
Image i = createPlaceholder(
convertToPixels(IMAGE_SIZES[offset]));
placeholder[offset] = EncodedImage.createFromImage(
i.applyMask(maskObject[offset]), false);
}
if(photo.get() == null) {
return placeholder[offset];
}
return photo.get().
fill(maskImage[offset].getWidth(),
maskImage[offset].getHeight()).
applyMask(maskObject[offset]);
}
ChatContact
applyMask(maskObject[offset]);
}
private Image smallIcon;
private Image largeIcon;
public Image getSmallIcon() {
if(smallIcon != null) {
return smallIcon;
}
smallIcon = getImage(SMALL_IMAGE);
return smallIcon;
}
public Image getLargeIcon() {
if(largeIcon != null) {
return largeIcon;
}
largeIcon = getImage(LARGE_IMAGE);
return largeIcon;
}
ChatContact

More Related Content

Similar to Creating a Whatsapp Clone - Part III.pdf

Creating a Whatsapp Clone - Part II.pdf
Creating a Whatsapp Clone - Part II.pdfCreating a Whatsapp Clone - Part II.pdf
Creating a Whatsapp Clone - Part II.pdf
ShaiAlmog1
 
Week 12 code
Week 12 codeWeek 12 code
Week 12 code
abhi7692271
 
Creating a Whatsapp Clone - Part IX - Transcript.pdf
Creating a Whatsapp Clone - Part IX - Transcript.pdfCreating a Whatsapp Clone - Part IX - Transcript.pdf
Creating a Whatsapp Clone - Part IX - Transcript.pdf
ShaiAlmog1
 
Creating a Facebook Clone - Part XXIII.pdf
Creating a Facebook Clone - Part XXIII.pdfCreating a Facebook Clone - Part XXIII.pdf
Creating a Facebook Clone - Part XXIII.pdf
ShaiAlmog1
 
Creating a Facebook Clone - Part X.pdf
Creating a Facebook Clone - Part X.pdfCreating a Facebook Clone - Part X.pdf
Creating a Facebook Clone - Part X.pdf
ShaiAlmog1
 
Creating a Whatsapp Clone - Part XI.pdf
Creating a Whatsapp Clone - Part XI.pdfCreating a Whatsapp Clone - Part XI.pdf
Creating a Whatsapp Clone - Part XI.pdf
ShaiAlmog1
 
Creating a Facebook Clone - Part XX.pdf
Creating a Facebook Clone - Part XX.pdfCreating a Facebook Clone - Part XX.pdf
Creating a Facebook Clone - Part XX.pdf
ShaiAlmog1
 
Creating a Facebook Clone - Part XIV - Transcript.pdf
Creating a Facebook Clone - Part XIV - Transcript.pdfCreating a Facebook Clone - Part XIV - Transcript.pdf
Creating a Facebook Clone - Part XIV - Transcript.pdf
ShaiAlmog1
 
Creating a Facebook Clone - Part XIV.pdf
Creating a Facebook Clone - Part XIV.pdfCreating a Facebook Clone - Part XIV.pdf
Creating a Facebook Clone - Part XIV.pdf
ShaiAlmog1
 
Creating a Whatsapp Clone - Part II - Transcript.pdf
Creating a Whatsapp Clone - Part II - Transcript.pdfCreating a Whatsapp Clone - Part II - Transcript.pdf
Creating a Whatsapp Clone - Part II - Transcript.pdf
ShaiAlmog1
 
Need help on creating code using cart. The output has to show multip.pdf
Need help on creating code using cart. The output has to show multip.pdfNeed help on creating code using cart. The output has to show multip.pdf
Need help on creating code using cart. The output has to show multip.pdf
meerobertsonheyde608
 
Laporan multi client
Laporan multi clientLaporan multi client
Laporan multi client
ichsanbarokah
 
Best of build 2021 - C# 10 & .NET 6
Best of build 2021 -  C# 10 & .NET 6Best of build 2021 -  C# 10 & .NET 6
Best of build 2021 - C# 10 & .NET 6
Moaid Hathot
 
Creating an Uber Clone - Part XIII - Transcript.pdf
Creating an Uber Clone - Part XIII - Transcript.pdfCreating an Uber Clone - Part XIII - Transcript.pdf
Creating an Uber Clone - Part XIII - Transcript.pdf
ShaiAlmog1
 
Creating an Uber Clone - Part XII.pdf
Creating an Uber Clone - Part XII.pdfCreating an Uber Clone - Part XII.pdf
Creating an Uber Clone - Part XII.pdf
ShaiAlmog1
 
Creating a Whatsapp Clone - Part XIII.pdf
Creating a Whatsapp Clone - Part XIII.pdfCreating a Whatsapp Clone - Part XIII.pdf
Creating a Whatsapp Clone - Part XIII.pdf
ShaiAlmog1
 
Dev Day Andreas Roth.pdf
Dev Day Andreas Roth.pdfDev Day Andreas Roth.pdf
Dev Day Andreas Roth.pdf
CarolinaMatthies
 
Codemotion appengine
Codemotion appengineCodemotion appengine
Codemotion appengine
Ignacio Coloma
 
Kotlin coroutines
Kotlin coroutines Kotlin coroutines
Kotlin coroutines
TSE-JU LIN(Louis)
 
Creating a Facebook Clone - Part XIX - Transcript.pdf
Creating a Facebook Clone - Part XIX - Transcript.pdfCreating a Facebook Clone - Part XIX - Transcript.pdf
Creating a Facebook Clone - Part XIX - Transcript.pdf
ShaiAlmog1
 

Similar to Creating a Whatsapp Clone - Part III.pdf (20)

Creating a Whatsapp Clone - Part II.pdf
Creating a Whatsapp Clone - Part II.pdfCreating a Whatsapp Clone - Part II.pdf
Creating a Whatsapp Clone - Part II.pdf
 
Week 12 code
Week 12 codeWeek 12 code
Week 12 code
 
Creating a Whatsapp Clone - Part IX - Transcript.pdf
Creating a Whatsapp Clone - Part IX - Transcript.pdfCreating a Whatsapp Clone - Part IX - Transcript.pdf
Creating a Whatsapp Clone - Part IX - Transcript.pdf
 
Creating a Facebook Clone - Part XXIII.pdf
Creating a Facebook Clone - Part XXIII.pdfCreating a Facebook Clone - Part XXIII.pdf
Creating a Facebook Clone - Part XXIII.pdf
 
Creating a Facebook Clone - Part X.pdf
Creating a Facebook Clone - Part X.pdfCreating a Facebook Clone - Part X.pdf
Creating a Facebook Clone - Part X.pdf
 
Creating a Whatsapp Clone - Part XI.pdf
Creating a Whatsapp Clone - Part XI.pdfCreating a Whatsapp Clone - Part XI.pdf
Creating a Whatsapp Clone - Part XI.pdf
 
Creating a Facebook Clone - Part XX.pdf
Creating a Facebook Clone - Part XX.pdfCreating a Facebook Clone - Part XX.pdf
Creating a Facebook Clone - Part XX.pdf
 
Creating a Facebook Clone - Part XIV - Transcript.pdf
Creating a Facebook Clone - Part XIV - Transcript.pdfCreating a Facebook Clone - Part XIV - Transcript.pdf
Creating a Facebook Clone - Part XIV - Transcript.pdf
 
Creating a Facebook Clone - Part XIV.pdf
Creating a Facebook Clone - Part XIV.pdfCreating a Facebook Clone - Part XIV.pdf
Creating a Facebook Clone - Part XIV.pdf
 
Creating a Whatsapp Clone - Part II - Transcript.pdf
Creating a Whatsapp Clone - Part II - Transcript.pdfCreating a Whatsapp Clone - Part II - Transcript.pdf
Creating a Whatsapp Clone - Part II - Transcript.pdf
 
Need help on creating code using cart. The output has to show multip.pdf
Need help on creating code using cart. The output has to show multip.pdfNeed help on creating code using cart. The output has to show multip.pdf
Need help on creating code using cart. The output has to show multip.pdf
 
Laporan multi client
Laporan multi clientLaporan multi client
Laporan multi client
 
Best of build 2021 - C# 10 & .NET 6
Best of build 2021 -  C# 10 & .NET 6Best of build 2021 -  C# 10 & .NET 6
Best of build 2021 - C# 10 & .NET 6
 
Creating an Uber Clone - Part XIII - Transcript.pdf
Creating an Uber Clone - Part XIII - Transcript.pdfCreating an Uber Clone - Part XIII - Transcript.pdf
Creating an Uber Clone - Part XIII - Transcript.pdf
 
Creating an Uber Clone - Part XII.pdf
Creating an Uber Clone - Part XII.pdfCreating an Uber Clone - Part XII.pdf
Creating an Uber Clone - Part XII.pdf
 
Creating a Whatsapp Clone - Part XIII.pdf
Creating a Whatsapp Clone - Part XIII.pdfCreating a Whatsapp Clone - Part XIII.pdf
Creating a Whatsapp Clone - Part XIII.pdf
 
Dev Day Andreas Roth.pdf
Dev Day Andreas Roth.pdfDev Day Andreas Roth.pdf
Dev Day Andreas Roth.pdf
 
Codemotion appengine
Codemotion appengineCodemotion appengine
Codemotion appengine
 
Kotlin coroutines
Kotlin coroutines Kotlin coroutines
Kotlin coroutines
 
Creating a Facebook Clone - Part XIX - Transcript.pdf
Creating a Facebook Clone - Part XIX - Transcript.pdfCreating a Facebook Clone - Part XIX - Transcript.pdf
Creating a Facebook Clone - Part XIX - Transcript.pdf
 

More from ShaiAlmog1

The Duck Teaches Learn to debug from the masters. Local to production- kill ...
The Duck Teaches  Learn to debug from the masters. Local to production- kill ...The Duck Teaches  Learn to debug from the masters. Local to production- kill ...
The Duck Teaches Learn to debug from the masters. Local to production- kill ...
ShaiAlmog1
 
create-netflix-clone-06-client-ui.pdf
create-netflix-clone-06-client-ui.pdfcreate-netflix-clone-06-client-ui.pdf
create-netflix-clone-06-client-ui.pdf
ShaiAlmog1
 
create-netflix-clone-01-introduction_transcript.pdf
create-netflix-clone-01-introduction_transcript.pdfcreate-netflix-clone-01-introduction_transcript.pdf
create-netflix-clone-01-introduction_transcript.pdf
ShaiAlmog1
 
create-netflix-clone-02-server_transcript.pdf
create-netflix-clone-02-server_transcript.pdfcreate-netflix-clone-02-server_transcript.pdf
create-netflix-clone-02-server_transcript.pdf
ShaiAlmog1
 
create-netflix-clone-04-server-continued_transcript.pdf
create-netflix-clone-04-server-continued_transcript.pdfcreate-netflix-clone-04-server-continued_transcript.pdf
create-netflix-clone-04-server-continued_transcript.pdf
ShaiAlmog1
 
create-netflix-clone-01-introduction.pdf
create-netflix-clone-01-introduction.pdfcreate-netflix-clone-01-introduction.pdf
create-netflix-clone-01-introduction.pdf
ShaiAlmog1
 
create-netflix-clone-06-client-ui_transcript.pdf
create-netflix-clone-06-client-ui_transcript.pdfcreate-netflix-clone-06-client-ui_transcript.pdf
create-netflix-clone-06-client-ui_transcript.pdf
ShaiAlmog1
 
create-netflix-clone-03-server.pdf
create-netflix-clone-03-server.pdfcreate-netflix-clone-03-server.pdf
create-netflix-clone-03-server.pdf
ShaiAlmog1
 
create-netflix-clone-04-server-continued.pdf
create-netflix-clone-04-server-continued.pdfcreate-netflix-clone-04-server-continued.pdf
create-netflix-clone-04-server-continued.pdf
ShaiAlmog1
 
create-netflix-clone-05-client-model_transcript.pdf
create-netflix-clone-05-client-model_transcript.pdfcreate-netflix-clone-05-client-model_transcript.pdf
create-netflix-clone-05-client-model_transcript.pdf
ShaiAlmog1
 
create-netflix-clone-03-server_transcript.pdf
create-netflix-clone-03-server_transcript.pdfcreate-netflix-clone-03-server_transcript.pdf
create-netflix-clone-03-server_transcript.pdf
ShaiAlmog1
 
create-netflix-clone-02-server.pdf
create-netflix-clone-02-server.pdfcreate-netflix-clone-02-server.pdf
create-netflix-clone-02-server.pdf
ShaiAlmog1
 
create-netflix-clone-05-client-model.pdf
create-netflix-clone-05-client-model.pdfcreate-netflix-clone-05-client-model.pdf
create-netflix-clone-05-client-model.pdf
ShaiAlmog1
 
Creating a Whatsapp Clone - Part V - Transcript.pdf
Creating a Whatsapp Clone - Part V - Transcript.pdfCreating a Whatsapp Clone - Part V - Transcript.pdf
Creating a Whatsapp Clone - Part V - Transcript.pdf
ShaiAlmog1
 
Creating a Whatsapp Clone - Part I - Transcript.pdf
Creating a Whatsapp Clone - Part I - Transcript.pdfCreating a Whatsapp Clone - Part I - Transcript.pdf
Creating a Whatsapp Clone - Part I - Transcript.pdf
ShaiAlmog1
 
Creating a Whatsapp Clone - Part VI.pdf
Creating a Whatsapp Clone - Part VI.pdfCreating a Whatsapp Clone - Part VI.pdf
Creating a Whatsapp Clone - Part VI.pdf
ShaiAlmog1
 
Creating a Whatsapp Clone - Part XI - Transcript.pdf
Creating a Whatsapp Clone - Part XI - Transcript.pdfCreating a Whatsapp Clone - Part XI - Transcript.pdf
Creating a Whatsapp Clone - Part XI - Transcript.pdf
ShaiAlmog1
 
Creating a Whatsapp Clone - Part VII.pdf
Creating a Whatsapp Clone - Part VII.pdfCreating a Whatsapp Clone - Part VII.pdf
Creating a Whatsapp Clone - Part VII.pdf
ShaiAlmog1
 
Creating a Whatsapp Clone - Part V.pdf
Creating a Whatsapp Clone - Part V.pdfCreating a Whatsapp Clone - Part V.pdf
Creating a Whatsapp Clone - Part V.pdf
ShaiAlmog1
 
Creating a Whatsapp Clone - Part X - Transcript.pdf
Creating a Whatsapp Clone - Part X - Transcript.pdfCreating a Whatsapp Clone - Part X - Transcript.pdf
Creating a Whatsapp Clone - Part X - Transcript.pdf
ShaiAlmog1
 

More from ShaiAlmog1 (20)

The Duck Teaches Learn to debug from the masters. Local to production- kill ...
The Duck Teaches  Learn to debug from the masters. Local to production- kill ...The Duck Teaches  Learn to debug from the masters. Local to production- kill ...
The Duck Teaches Learn to debug from the masters. Local to production- kill ...
 
create-netflix-clone-06-client-ui.pdf
create-netflix-clone-06-client-ui.pdfcreate-netflix-clone-06-client-ui.pdf
create-netflix-clone-06-client-ui.pdf
 
create-netflix-clone-01-introduction_transcript.pdf
create-netflix-clone-01-introduction_transcript.pdfcreate-netflix-clone-01-introduction_transcript.pdf
create-netflix-clone-01-introduction_transcript.pdf
 
create-netflix-clone-02-server_transcript.pdf
create-netflix-clone-02-server_transcript.pdfcreate-netflix-clone-02-server_transcript.pdf
create-netflix-clone-02-server_transcript.pdf
 
create-netflix-clone-04-server-continued_transcript.pdf
create-netflix-clone-04-server-continued_transcript.pdfcreate-netflix-clone-04-server-continued_transcript.pdf
create-netflix-clone-04-server-continued_transcript.pdf
 
create-netflix-clone-01-introduction.pdf
create-netflix-clone-01-introduction.pdfcreate-netflix-clone-01-introduction.pdf
create-netflix-clone-01-introduction.pdf
 
create-netflix-clone-06-client-ui_transcript.pdf
create-netflix-clone-06-client-ui_transcript.pdfcreate-netflix-clone-06-client-ui_transcript.pdf
create-netflix-clone-06-client-ui_transcript.pdf
 
create-netflix-clone-03-server.pdf
create-netflix-clone-03-server.pdfcreate-netflix-clone-03-server.pdf
create-netflix-clone-03-server.pdf
 
create-netflix-clone-04-server-continued.pdf
create-netflix-clone-04-server-continued.pdfcreate-netflix-clone-04-server-continued.pdf
create-netflix-clone-04-server-continued.pdf
 
create-netflix-clone-05-client-model_transcript.pdf
create-netflix-clone-05-client-model_transcript.pdfcreate-netflix-clone-05-client-model_transcript.pdf
create-netflix-clone-05-client-model_transcript.pdf
 
create-netflix-clone-03-server_transcript.pdf
create-netflix-clone-03-server_transcript.pdfcreate-netflix-clone-03-server_transcript.pdf
create-netflix-clone-03-server_transcript.pdf
 
create-netflix-clone-02-server.pdf
create-netflix-clone-02-server.pdfcreate-netflix-clone-02-server.pdf
create-netflix-clone-02-server.pdf
 
create-netflix-clone-05-client-model.pdf
create-netflix-clone-05-client-model.pdfcreate-netflix-clone-05-client-model.pdf
create-netflix-clone-05-client-model.pdf
 
Creating a Whatsapp Clone - Part V - Transcript.pdf
Creating a Whatsapp Clone - Part V - Transcript.pdfCreating a Whatsapp Clone - Part V - Transcript.pdf
Creating a Whatsapp Clone - Part V - Transcript.pdf
 
Creating a Whatsapp Clone - Part I - Transcript.pdf
Creating a Whatsapp Clone - Part I - Transcript.pdfCreating a Whatsapp Clone - Part I - Transcript.pdf
Creating a Whatsapp Clone - Part I - Transcript.pdf
 
Creating a Whatsapp Clone - Part VI.pdf
Creating a Whatsapp Clone - Part VI.pdfCreating a Whatsapp Clone - Part VI.pdf
Creating a Whatsapp Clone - Part VI.pdf
 
Creating a Whatsapp Clone - Part XI - Transcript.pdf
Creating a Whatsapp Clone - Part XI - Transcript.pdfCreating a Whatsapp Clone - Part XI - Transcript.pdf
Creating a Whatsapp Clone - Part XI - Transcript.pdf
 
Creating a Whatsapp Clone - Part VII.pdf
Creating a Whatsapp Clone - Part VII.pdfCreating a Whatsapp Clone - Part VII.pdf
Creating a Whatsapp Clone - Part VII.pdf
 
Creating a Whatsapp Clone - Part V.pdf
Creating a Whatsapp Clone - Part V.pdfCreating a Whatsapp Clone - Part V.pdf
Creating a Whatsapp Clone - Part V.pdf
 
Creating a Whatsapp Clone - Part X - Transcript.pdf
Creating a Whatsapp Clone - Part X - Transcript.pdfCreating a Whatsapp Clone - Part X - Transcript.pdf
Creating a Whatsapp Clone - Part X - Transcript.pdf
 

Recently uploaded

Session 1 - Intro to Robotic Process Automation.pdf
Session 1 - Intro to Robotic Process Automation.pdfSession 1 - Intro to Robotic Process Automation.pdf
Session 1 - Intro to Robotic Process Automation.pdf
UiPathCommunity
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
Fwdays
 
Mutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented ChatbotsMutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented Chatbots
Pablo GĂłmez Abajo
 
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
saastr
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
Miro Wengner
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
Antonios Katsarakis
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |
AstuteBusiness
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
Zilliz
 
"Scaling RAG Applications to serve millions of users", Kevin Goedecke
"Scaling RAG Applications to serve millions of users",  Kevin Goedecke"Scaling RAG Applications to serve millions of users",  Kevin Goedecke
"Scaling RAG Applications to serve millions of users", Kevin Goedecke
Fwdays
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
saastr
 
Must Know Postgres Extension for DBA and Developer during Migration
Must Know Postgres Extension for DBA and Developer during MigrationMust Know Postgres Extension for DBA and Developer during Migration
Must Know Postgres Extension for DBA and Developer during Migration
Mydbops
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
Alex Pruden
 
AppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSFAppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSF
Ajin Abraham
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
Christine's Product Research Presentation.pptx
Christine's Product Research Presentation.pptxChristine's Product Research Presentation.pptx
Christine's Product Research Presentation.pptx
christinelarrosa
 
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge GraphGraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
Neo4j
 
Essentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation ParametersEssentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation Parameters
Safe Software
 

Recently uploaded (20)

Session 1 - Intro to Robotic Process Automation.pdf
Session 1 - Intro to Robotic Process Automation.pdfSession 1 - Intro to Robotic Process Automation.pdf
Session 1 - Intro to Robotic Process Automation.pdf
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
 
Mutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented ChatbotsMutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented Chatbots
 
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 
"Scaling RAG Applications to serve millions of users", Kevin Goedecke
"Scaling RAG Applications to serve millions of users",  Kevin Goedecke"Scaling RAG Applications to serve millions of users",  Kevin Goedecke
"Scaling RAG Applications to serve millions of users", Kevin Goedecke
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
 
Must Know Postgres Extension for DBA and Developer during Migration
Must Know Postgres Extension for DBA and Developer during MigrationMust Know Postgres Extension for DBA and Developer during Migration
Must Know Postgres Extension for DBA and Developer during Migration
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
 
AppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSFAppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSF
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
Christine's Product Research Presentation.pptx
Christine's Product Research Presentation.pptxChristine's Product Research Presentation.pptx
Christine's Product Research Presentation.pptx
 
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge GraphGraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
 
Essentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation ParametersEssentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation Parameters
 

Creating a Whatsapp Clone - Part III.pdf

  • 1. Creating a WhatsApp Clone - Part III
  • 2. package com.codename1.whatsapp.model; import java.util.List; public interface ServerMessages { public void connected(); public void disconnected(); public void messageReceived(ChatMessage m); public void userTyping(String contactId); public void messageViewed(String messageId, List<String> userIds); } ServerMessages
  • 3. package com.codename1.whatsapp.model; import java.util.List; public interface ServerMessages { public void connected(); public void disconnected(); public void messageReceived(ChatMessage m); public void userTyping(String contactId); public void messageViewed(String messageId, List<String> userIds); } ServerMessages
  • 4. package com.codename1.whatsapp.model; import java.util.List; public interface ServerMessages { public void connected(); public void disconnected(); public void messageReceived(ChatMessage m); public void userTyping(String contactId); public void messageViewed(String messageId, List<String> userIds); } ServerMessages
  • 5. public class ChatContact implements PropertyBusinessObject { public final Property<String, ChatContact> id = new Property<>("id"); public final Property<String, ChatContact> localId = new Property<>("localId"); public final Property<String, ChatContact> phone = new Property<>("phone"); public final Property<Image, ChatContact> photo = new Property<>("photo", Image.class); public final Property<String, ChatContact> name = new Property<>("name"); public final Property<String, ChatContact> tagline = new Property<>("tagline"); public final Property<String, ChatContact> token = new Property<>("token"); public final SetProperty<String, ChatContact> members = new SetProperty<>("members", String.class); public final SetProperty<String, ChatContact> admins = new SetProperty<>("admins", String.class); public final LongProperty<ChatContact> muteUntil = ChatContact
  • 6. public class ChatContact implements PropertyBusinessObject { public final Property<String, ChatContact> id = new Property<>("id"); public final Property<String, ChatContact> localId = new Property<>("localId"); public final Property<String, ChatContact> phone = new Property<>("phone"); public final Property<Image, ChatContact> photo = new Property<>("photo", Image.class); public final Property<String, ChatContact> name = new Property<>("name"); public final Property<String, ChatContact> tagline = new Property<>("tagline"); public final Property<String, ChatContact> token = new Property<>("token"); public final SetProperty<String, ChatContact> members = new SetProperty<>("members", String.class); public final SetProperty<String, ChatContact> admins = new SetProperty<>("admins", String.class); public final LongProperty<ChatContact> muteUntil = ChatContact
  • 7. public class ChatContact implements PropertyBusinessObject { public final Property<String, ChatContact> id = new Property<>("id"); public final Property<String, ChatContact> localId = new Property<>("localId"); public final Property<String, ChatContact> phone = new Property<>("phone"); public final Property<Image, ChatContact> photo = new Property<>("photo", Image.class); public final Property<String, ChatContact> name = new Property<>("name"); public final Property<String, ChatContact> tagline = new Property<>("tagline"); public final Property<String, ChatContact> token = new Property<>("token"); public final SetProperty<String, ChatContact> members = new SetProperty<>("members", String.class); public final SetProperty<String, ChatContact> admins = new SetProperty<>("admins", String.class); public final LongProperty<ChatContact> muteUntil = ChatContact
  • 8. public class ChatContact implements PropertyBusinessObject { public final Property<String, ChatContact> id = new Property<>("id"); public final Property<String, ChatContact> localId = new Property<>("localId"); public final Property<String, ChatContact> phone = new Property<>("phone"); public final Property<Image, ChatContact> photo = new Property<>("photo", Image.class); public final Property<String, ChatContact> name = new Property<>("name"); public final Property<String, ChatContact> tagline = new Property<>("tagline"); public final Property<String, ChatContact> token = new Property<>("token"); public final SetProperty<String, ChatContact> members = new SetProperty<>("members", String.class); public final SetProperty<String, ChatContact> admins = new SetProperty<>("admins", String.class); public final LongProperty<ChatContact> muteUntil = ChatContact
  • 9. public class ChatContact implements PropertyBusinessObject { public final Property<String, ChatContact> id = new Property<>("id"); public final Property<String, ChatContact> localId = new Property<>("localId"); public final Property<String, ChatContact> phone = new Property<>("phone"); public final Property<Image, ChatContact> photo = new Property<>("photo", Image.class); public final Property<String, ChatContact> name = new Property<>("name"); public final Property<String, ChatContact> tagline = new Property<>("tagline"); public final Property<String, ChatContact> token = new Property<>("token"); public final SetProperty<String, ChatContact> members = new SetProperty<>("members", String.class); public final SetProperty<String, ChatContact> admins = new SetProperty<>("admins", String.class); public final LongProperty<ChatContact> muteUntil = ChatContact
  • 10. public class ChatContact implements PropertyBusinessObject { public final Property<String, ChatContact> id = new Property<>("id"); public final Property<String, ChatContact> localId = new Property<>("localId"); public final Property<String, ChatContact> phone = new Property<>("phone"); public final Property<Image, ChatContact> photo = new Property<>("photo", Image.class); public final Property<String, ChatContact> name = new Property<>("name"); public final Property<String, ChatContact> tagline = new Property<>("tagline"); public final Property<String, ChatContact> token = new Property<>("token"); public final SetProperty<String, ChatContact> members = new SetProperty<>("members", String.class); public final SetProperty<String, ChatContact> admins = new SetProperty<>("admins", String.class); public final LongProperty<ChatContact> muteUntil = ChatContact
  • 11. public class ChatContact implements PropertyBusinessObject { public final Property<String, ChatContact> id = new Property<>("id"); public final Property<String, ChatContact> localId = new Property<>("localId"); public final Property<String, ChatContact> phone = new Property<>("phone"); public final Property<Image, ChatContact> photo = new Property<>("photo", Image.class); public final Property<String, ChatContact> name = new Property<>("name"); public final Property<String, ChatContact> tagline = new Property<>("tagline"); public final Property<String, ChatContact> token = new Property<>("token"); public final SetProperty<String, ChatContact> members = new SetProperty<>("members", String.class); public final SetProperty<String, ChatContact> admins = new SetProperty<>("admins", String.class); public final LongProperty<ChatContact> muteUntil = ChatContact
  • 12. new Property<>("name"); public final Property<String, ChatContact> tagline = new Property<>("tagline"); public final Property<String, ChatContact> token = new Property<>("token"); public final SetProperty<String, ChatContact> members = new SetProperty<>("members", String.class); public final SetProperty<String, ChatContact> admins = new SetProperty<>("admins", String.class); public final LongProperty<ChatContact> muteUntil = new LongProperty<>("muteUntil"); public final Property<String, ChatContact> createdBy = new Property<>("createdBy"); public final Property<Date, ChatContact> creationDate = new Property<>("creationDate", Date.class); public final Property<Date, ChatContact> lastActivityTime = new Property<>("lastActivityTime", Date.class); public final ListProperty<ChatMessage, ChatContact> chats = new ListProperty<>("chat", ChatMessage.class); private final PropertyIndex idx = new PropertyIndex(this, "ChatContact", id, localId, phone, photo, name, tagline, token, members, admins, ChatContact
  • 13. new Property<>("name"); public final Property<String, ChatContact> tagline = new Property<>("tagline"); public final Property<String, ChatContact> token = new Property<>("token"); public final SetProperty<String, ChatContact> members = new SetProperty<>("members", String.class); public final SetProperty<String, ChatContact> admins = new SetProperty<>("admins", String.class); public final LongProperty<ChatContact> muteUntil = new LongProperty<>("muteUntil"); public final Property<String, ChatContact> createdBy = new Property<>("createdBy"); public final Property<Date, ChatContact> creationDate = new Property<>("creationDate", Date.class); public final Property<Date, ChatContact> lastActivityTime = new Property<>("lastActivityTime", Date.class); public final ListProperty<ChatMessage, ChatContact> chats = new ListProperty<>("chat", ChatMessage.class); private final PropertyIndex idx = new PropertyIndex(this, "ChatContact", id, localId, phone, photo, name, tagline, token, members, admins, ChatContact
  • 14. new Property<>("name"); public final Property<String, ChatContact> tagline = new Property<>("tagline"); public final Property<String, ChatContact> token = new Property<>("token"); public final SetProperty<String, ChatContact> members = new SetProperty<>("members", String.class); public final SetProperty<String, ChatContact> admins = new SetProperty<>("admins", String.class); public final LongProperty<ChatContact> muteUntil = new LongProperty<>("muteUntil"); public final Property<String, ChatContact> createdBy = new Property<>("createdBy"); public final Property<Date, ChatContact> creationDate = new Property<>("creationDate", Date.class); public final Property<Date, ChatContact> lastActivityTime = new Property<>("lastActivityTime", Date.class); public final ListProperty<ChatMessage, ChatContact> chats = new ListProperty<>("chat", ChatMessage.class); private final PropertyIndex idx = new PropertyIndex(this, "ChatContact", id, localId, phone, photo, name, tagline, token, members, admins, ChatContact
  • 15. new Property<>("name"); public final Property<String, ChatContact> tagline = new Property<>("tagline"); public final Property<String, ChatContact> token = new Property<>("token"); public final SetProperty<String, ChatContact> members = new SetProperty<>("members", String.class); public final SetProperty<String, ChatContact> admins = new SetProperty<>("admins", String.class); public final LongProperty<ChatContact> muteUntil = new LongProperty<>("muteUntil"); public final Property<String, ChatContact> createdBy = new Property<>("createdBy"); public final Property<Date, ChatContact> creationDate = new Property<>("creationDate", Date.class); public final Property<Date, ChatContact> lastActivityTime = new Property<>("lastActivityTime", Date.class); public final ListProperty<ChatMessage, ChatContact> chats = new ListProperty<>("chat", ChatMessage.class); private final PropertyIndex idx = new PropertyIndex(this, "ChatContact", id, localId, phone, photo, name, tagline, token, members, admins, ChatContact
  • 16. new Property<>("name"); public final Property<String, ChatContact> tagline = new Property<>("tagline"); public final Property<String, ChatContact> token = new Property<>("token"); public final SetProperty<String, ChatContact> members = new SetProperty<>("members", String.class); public final SetProperty<String, ChatContact> admins = new SetProperty<>("admins", String.class); public final LongProperty<ChatContact> muteUntil = new LongProperty<>("muteUntil"); public final Property<String, ChatContact> createdBy = new Property<>("createdBy"); public final Property<Date, ChatContact> creationDate = new Property<>("creationDate", Date.class); public final Property<Date, ChatContact> lastActivityTime = new Property<>("lastActivityTime", Date.class); public final ListProperty<ChatMessage, ChatContact> chats = new ListProperty<>("chat", ChatMessage.class); private final PropertyIndex idx = new PropertyIndex(this, "ChatContact", id, localId, phone, photo, name, tagline, token, members, admins, ChatContact
  • 17. new Property<>("name"); public final Property<String, ChatContact> tagline = new Property<>("tagline"); public final Property<String, ChatContact> token = new Property<>("token"); public final SetProperty<String, ChatContact> members = new SetProperty<>("members", String.class); public final SetProperty<String, ChatContact> admins = new SetProperty<>("admins", String.class); public final LongProperty<ChatContact> muteUntil = new LongProperty<>("muteUntil"); public final Property<String, ChatContact> createdBy = new Property<>("createdBy"); public final Property<Date, ChatContact> creationDate = new Property<>("creationDate", Date.class); public final Property<Date, ChatContact> lastActivityTime = new Property<>("lastActivityTime", Date.class); public final ListProperty<ChatMessage, ChatContact> chats = new ListProperty<>("chat", ChatMessage.class); private final PropertyIndex idx = new PropertyIndex(this, "ChatContact", id, localId, phone, photo, name, tagline, token, members, admins, ChatContact
  • 18. new Property<>("createdBy"); public final Property<Date, ChatContact> creationDate = new Property<>("creationDate", Date.class); public final Property<Date, ChatContact> lastActivityTime = new Property<>("lastActivityTime", Date.class); public final ListProperty<ChatMessage, ChatContact> chats = new ListProperty<>("chat", ChatMessage.class); private final PropertyIndex idx = new PropertyIndex(this, "ChatContact", id, localId, phone, photo, name, tagline, token, members, admins, muteUntil, createdBy, creationDate, lastActivityTime, chats); @Override public PropertyIndex getPropertyIndex() { return idx; } public ChatContact() { idx.setExcludeFromJSON(photo, true); } private static final int SMALL_IMAGE = 0; private static final int LARGE_IMAGE = 1; ChatContact
  • 19. return idx; } public ChatContact() { idx.setExcludeFromJSON(photo, true); } private static final int SMALL_IMAGE = 0; private static final int LARGE_IMAGE = 1; private static final float[] IMAGE_SIZES = {4f, 6.5f}; private static final Image[] maskImage = new Image[2]; private static final Object[] maskObject = new Object[2]; private static final EncodedImage[] placeholder = new EncodedImage[2]; private static Image createMaskImage(int size) { Image m = Image.createImage(size, size, 0); Graphics g = m.getGraphics(); g.setAntiAliased(true); g.setColor(0xffffff); g.fillArc(0, 0, size - 1, size -1, 0, 360); return m; } ChatContact
  • 20. return idx; } public ChatContact() { idx.setExcludeFromJSON(photo, true); } private static final int SMALL_IMAGE = 0; private static final int LARGE_IMAGE = 1; private static final float[] IMAGE_SIZES = {4f, 6.5f}; private static final Image[] maskImage = new Image[2]; private static final Object[] maskObject = new Object[2]; private static final EncodedImage[] placeholder = new EncodedImage[2]; private static Image createMaskImage(int size) { Image m = Image.createImage(size, size, 0); Graphics g = m.getGraphics(); g.setAntiAliased(true); g.setColor(0xffffff); g.fillArc(0, 0, size - 1, size -1, 0, 360); return m; } ChatContact
  • 21. return idx; } public ChatContact() { idx.setExcludeFromJSON(photo, true); } private static final int SMALL_IMAGE = 0; private static final int LARGE_IMAGE = 1; private static final float[] IMAGE_SIZES = {4f, 6.5f}; private static final Image[] maskImage = new Image[2]; private static final Object[] maskObject = new Object[2]; private static final EncodedImage[] placeholder = new EncodedImage[2]; private static Image createMaskImage(int size) { Image m = Image.createImage(size, size, 0); Graphics g = m.getGraphics(); g.setAntiAliased(true); g.setColor(0xffffff); g.fillArc(0, 0, size - 1, size -1, 0, 360); return m; } ChatContact
  • 22. return idx; } public ChatContact() { idx.setExcludeFromJSON(photo, true); } private static final int SMALL_IMAGE = 0; private static final int LARGE_IMAGE = 1; private static final float[] IMAGE_SIZES = {4f, 6.5f}; private static final Image[] maskImage = new Image[2]; private static final Object[] maskObject = new Object[2]; private static final EncodedImage[] placeholder = new EncodedImage[2]; private static Image createMaskImage(int size) { Image m = Image.createImage(size, size, 0); Graphics g = m.getGraphics(); g.setAntiAliased(true); g.setColor(0xffffff); g.fillArc(0, 0, size - 1, size -1, 0, 360); return m; } ChatContact
  • 23. return idx; } public ChatContact() { idx.setExcludeFromJSON(photo, true); } private static final int SMALL_IMAGE = 0; private static final int LARGE_IMAGE = 1; private static final float[] IMAGE_SIZES = {4f, 6.5f}; private static final Image[] maskImage = new Image[2]; private static final Object[] maskObject = new Object[2]; private static final EncodedImage[] placeholder = new EncodedImage[2]; private static Image createMaskImage(int size) { Image m = Image.createImage(size, size, 0); Graphics g = m.getGraphics(); g.setAntiAliased(true); g.setColor(0xffffff); g.fillArc(0, 0, size - 1, size -1, 0, 360); return m; } ChatContact
  • 24. Graphics g = m.getGraphics(); g.setAntiAliased(true); g.setColor(0xffffff); g.fillArc(0, 0, size - 1, size -1, 0, 360); return m; } private Image createPlaceholder(int size) { Image i = Image.createImage(size, size, 0xffe2e7ea); Graphics g = i.getGraphics(); g.setAntiAliased(true); g.setAntiAliasedText(true); g.setColor(0xffffff); Font fnt = FontImage.getMaterialDesignFont(). derive(size, Font.STYLE_PLAIN); g.setFont(fnt); String s = "" + FontImage.MATERIAL_PERSON; g.drawString(s, size / 2 - fnt.stringWidth(s) / 2, 0); return i; } private Image getImage(int offset) { ChatContact
  • 25. return i; } private Image getImage(int offset) { if(maskImage[offset] == null) { maskImage[offset] = createMaskImage(convertToPixels(IMAGE_SIZES[offset])); maskObject[offset] = maskImage[offset].createMask(); Image i = createPlaceholder( convertToPixels(IMAGE_SIZES[offset])); placeholder[offset] = EncodedImage.createFromImage( i.applyMask(maskObject[offset]), false); } if(photo.get() == null) { return placeholder[offset]; } return photo.get(). fill(maskImage[offset].getWidth(), maskImage[offset].getHeight()). applyMask(maskObject[offset]); } ChatContact
  • 26. return i; } private Image getImage(int offset) { if(maskImage[offset] == null) { maskImage[offset] = createMaskImage(convertToPixels(IMAGE_SIZES[offset])); maskObject[offset] = maskImage[offset].createMask(); Image i = createPlaceholder( convertToPixels(IMAGE_SIZES[offset])); placeholder[offset] = EncodedImage.createFromImage( i.applyMask(maskObject[offset]), false); } if(photo.get() == null) { return placeholder[offset]; } return photo.get(). fill(maskImage[offset].getWidth(), maskImage[offset].getHeight()). applyMask(maskObject[offset]); } ChatContact
  • 27. return i; } private Image getImage(int offset) { if(maskImage[offset] == null) { maskImage[offset] = createMaskImage(convertToPixels(IMAGE_SIZES[offset])); maskObject[offset] = maskImage[offset].createMask(); Image i = createPlaceholder( convertToPixels(IMAGE_SIZES[offset])); placeholder[offset] = EncodedImage.createFromImage( i.applyMask(maskObject[offset]), false); } if(photo.get() == null) { return placeholder[offset]; } return photo.get(). fill(maskImage[offset].getWidth(), maskImage[offset].getHeight()). applyMask(maskObject[offset]); } ChatContact
  • 28. return i; } private Image getImage(int offset) { if(maskImage[offset] == null) { maskImage[offset] = createMaskImage(convertToPixels(IMAGE_SIZES[offset])); maskObject[offset] = maskImage[offset].createMask(); Image i = createPlaceholder( convertToPixels(IMAGE_SIZES[offset])); placeholder[offset] = EncodedImage.createFromImage( i.applyMask(maskObject[offset]), false); } if(photo.get() == null) { return placeholder[offset]; } return photo.get(). fill(maskImage[offset].getWidth(), maskImage[offset].getHeight()). applyMask(maskObject[offset]); } ChatContact
  • 29. return i; } private Image getImage(int offset) { if(maskImage[offset] == null) { maskImage[offset] = createMaskImage(convertToPixels(IMAGE_SIZES[offset])); maskObject[offset] = maskImage[offset].createMask(); Image i = createPlaceholder( convertToPixels(IMAGE_SIZES[offset])); placeholder[offset] = EncodedImage.createFromImage( i.applyMask(maskObject[offset]), false); } if(photo.get() == null) { return placeholder[offset]; } return photo.get(). fill(maskImage[offset].getWidth(), maskImage[offset].getHeight()). applyMask(maskObject[offset]); } ChatContact
  • 30. applyMask(maskObject[offset]); } private Image smallIcon; private Image largeIcon; public Image getSmallIcon() { if(smallIcon != null) { return smallIcon; } smallIcon = getImage(SMALL_IMAGE); return smallIcon; } public Image getLargeIcon() { if(largeIcon != null) { return largeIcon; } largeIcon = getImage(LARGE_IMAGE); return largeIcon; } ChatContact