stickers-internet
stickers-internet copied to clipboard
Please Provide doc as well as some extra features details
I checked it working like boss add documentation or i tell me how to addd sticker pack details activity to it? now its now showing sticker publisher and etc information
I guess the owner of the source code is busy these days. I'm looking forward to her.
@hazarbozkurt hey bro what are the exactly changes i need to do with this source?
I want exactly clone of WhatsApp sticker app by WhatsApp
On Fri 4 Jan, 2019, 7:26 AM Hari <[email protected] wrote:
@hazarbozkurt https://github.com/hazarbozkurt what are the exactly changes i need to do with this source?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/viztushar/stickers-internet/issues/6#issuecomment-451334601, or mute the thread https://github.com/notifications/unsubscribe-auth/AX8BPRRvYSGIbm_12LBed8tv45bfTt1cks5u_rTegaJpZM4ZnwCf .
I'm too busy right now because of exam and other stuff so I'll do what all you want after I done with all stuff
Ok
On Fri 4 Jan, 2019, 10:29 AM Tushar <[email protected] wrote:
I'm too busy right now because of exam and other stuff so I'll do what all you want after I done with all stuff
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/viztushar/stickers-internet/issues/6#issuecomment-451353854, or mute the thread https://github.com/notifications/unsubscribe-auth/AX8BPVBbS8CV538uXgSRz4GO-UTx3xKIks5u_t_IgaJpZM4ZnwCf .
@varundeva Hey bro plz solve my problem.. Whenever i placed my stickers links in json file its not showing in app.
Put link same as they showed in given Json file
On Fri 4 Jan, 2019, 8:39 PM Hari <[email protected] wrote:
@varundeva https://github.com/varundeva Hey bro plz solve my problem.. Whenever i placed my stickers links in json file its not showing in app.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/viztushar/stickers-internet/issues/6#issuecomment-451469803, or mute the thread https://github.com/notifications/unsubscribe-auth/AX8BPR8fypsbTmw7mH_4unGgYK0ytdlAks5u_26ggaJpZM4ZnwCf .
@varundeva Broo then how can i add my stickers to app?
@hariiprasad send me your json link.
@viztushar bro here is the link https://gist.github.com/hariiprasad/4a2eddc021f52d71c9f87914df8904c0
@viztushar sorry for late reply here is the raw link https://gist.githubusercontent.com/hariiprasad/4a2eddc021f52d71c9f87914df8904c0/raw/43862a5d343672a89912b8769017905621c5fac4/contents.json
https://whatsappaero.com/contents.json My json file works fine.
@hazarbozkurt broo where you added your own stickers links in json file???
@hazarbozkurt broo where you added your stickers link???
here:
@viztushar sorry for late reply here is the raw link https://gist.githubusercontent.com/hariiprasad/4a2eddc021f52d71c9f87914df8904c0/raw/43862a5d343672a89912b8769017905621c5fac4/contents.json
Are you sure this part is right?
The smallest mistake spoils everything. Can you try the sample json file?
@hazarbozkurt yes it is correct bro .its just a single tray. i removed 2nd tray and i tried using sample json file also but didnt worked. i have replaced old json_link with my contents.json link in strings values also...
@hazarbozkurt bro did you tried with your own stickers links in json file?
https://user-images.githubusercontent.com/42040267/50701275-4cf63c80-1073-11e9-9d3c-c9523d98c8b3.png
Before you can view sticker images, you must download them from the download button on the main screen.
(sorry for my bad English)
@hazarbozkurt bro did you tried with your own stickers links in json file?
No yet
@hazarbozkurt bro i have downloaded and i checked.still its not working.Once you plz check with your stickers link
I Exactly done what you have done.
But at the end of the add sticker pack to whatsapp it throw exception FileNotFound.
private AssetFileDescriptor fetchFile(@NonNull Uri uri, @NonNull AssetManager am, @NonNull String fileName, @NonNull String identifier) { try { File file; if(fileName.endsWith(".png")){ // file = new File(getContext().getFilesDir()+ "/" + "stickers_asset" + "/" + identifier + "/tray/", fileName); file = new File(Environment.getExternalStorageDirectory()+ "/" + "stickers_asset" + "/" + identifier + "/tray/", fileName); } else { file = new File(Environment.getExternalStorageDirectory()+ "/" + "stickers_asset" + "/" + identifier + "/", fileName); } if (!file.exists()) { Log.d("fetFile", "StickerPack dir not found"); } Log.d("fetchFile", "StickerPack " + file.getPath()); return new AssetFileDescriptor(ParcelFileDescriptor.open(file,ParcelFileDescriptor.MODE_READ_ONLY), 0L, -1L); } catch (IOException e) { Log.e(Objects.requireNonNull(getContext()).getPackageName(), "IOException when getting asset file, uri:" + uri, e); return null; } }
This Line Throw FileNotFound Exception
return new AssetFileDescriptor(ParcelFileDescriptor.open(file,ParcelFileDescriptor.MODE_READ_ONLY), 0L, -1L);
Please help me
@Naynesh-Patel you are using my code?? Or you use just that part of the code in your app??
i fully use your StickerProvider class
other code is mine
Here Is My Download Sticker Code :
class DownloadSticker extends AsyncTask<String, Integer, List<RowItem>> { List<RowItem> rowItems; int noOfURLs;
@Override
protected List<RowItem> doInBackground(String... urls) {
noOfURLs = urls.length;
rowItems = new ArrayList<RowItem>();
Bitmap map = null;
for (String url : urls) {
map = downloadImage(url);
rowItems.add(new RowItem(map));
}
return rowItems;
}
private Bitmap downloadImage(String urlString) {
int count = 0;
Bitmap bitmap = null;
URL url;
InputStream inputStream = null;
BufferedOutputStream outputStream = null;
try {
url = new URL(urlString);
URLConnection connection = url.openConnection();
int lenghtOfFile = connection.getContentLength();
inputStream = new BufferedInputStream(url.openStream());
ByteArrayOutputStream dataStream = new ByteArrayOutputStream();
outputStream = new BufferedOutputStream(dataStream);
byte data[] = new byte[512];
long total = 0;
while ((count = inputStream.read(data)) != -1) {
total += count;
publishProgress((int) ((total * 100) / lenghtOfFile));
outputStream.write(data, 0, count);
}
outputStream.flush();
BitmapFactory.Options bmOptions = new BitmapFactory.Options();
bmOptions.outWidth=512;
bmOptions.outHeight=512;
bmOptions.inSampleSize = 1;
byte[] bytes = dataStream.toByteArray();
bitmap = BitmapFactory.decodeByteArray(bytes, 0, bytes.length, bmOptions);
saveImage(bitmap, getLastBitFromUrl(url.toString()), stickerPack.identifier);
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
} finally {
FileUtils.close(inputStream);
FileUtils.close(outputStream);
}
return bitmap;
}
@Override
protected void onProgressUpdate(Integer... values) {
progressBar.setProgress(values[0]);
tvPercentage.setText(values[0] + "%");
}
@Override
protected void onPostExecute(List<RowItem> rowItems) {
rltPercentage.setVisibility(View.GONE);
btnDownload.setVisibility(View.VISIBLE);
btnDownload.setText("Add To Whatsapp");
btnDownload.setBackgroundResource(R.drawable.download_complete_bg);
isDownloaded = true;
}
}
Here Is My Save Sticker To Internal Storage Code :
public String path;
public void saveImage(Bitmap finalBitmap, String name, String identifier) {
String root = path + "/" + identifier;
File myDir = new File(root);
myDir.mkdirs();
String fname = name;
fname = name.replace(".png","")
.replace(".jpg","")
.replace(" ","_") + ".webp";
File file = new File(myDir, fname);
if (file.exists()) file.delete();
try {
FileOutputStream out = new FileOutputStream(file);
finalBitmap.compress(Bitmap.CompressFormat.WEBP, 90, out);
out.flush();
out.close();
} catch (Exception e) {
e.printStackTrace();
}
}
Please tell me what you need exactly ?
So i give you
Here i stop
@viztushar Hey broo... In stickerAdapter jave file when i replaced trayimage link with my link.. its showing error like [ There's is a problem with this sticker pack] . Can you resolve this?.
@Naynesh-Patel I guess you are saving image some where else and find in somewhere so that's why you are getting that error.
First check all image are save in same direction/location as you find in context provider.
@varundeva No i get same path at the save time and get time