Link donate : Facebook : Link source code : In this tutorial , you will …
40 Comments
Hello sir , i wrote the same code but i got an error in gson part "com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 2 path $" Sir please help me to resolve this error
Hello sir, thank you for this tutorial. Unlike you, I use the Coinranking API in MainActivity. This link you used when loading images in CoinAdapter is not working, how can I fix it?
Hai, I implementing your project. I am facing the below error. can you please guide me. Your Videos are very helpful. I am trying to do all your projects.
Process: com.example.cointracker, PID: 10871
java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()
at android.os.Handler.<init>(Handler.java:200)
at android.os.Handler.<init>(Handler.java:114)
at android.widget.Toast$TN.<init>(Toast.java:342)
at android.widget.Toast.<init>(Toast.java:99)
at android.widget.Toast.makeText(Toast.java:248)
at com.example.cointracker.MainActivity$5.onFailure(MainActivity.java:130)
Hi i did exactly what you did, step by step. But when I launch the app. It crashes. Doesn't show anything just open and close. I revised the code, line by line and I did not find anything.
says they will take down version 1 by November 2018.
CoinMarketCap Public API Documentation
Version 2
The Public API will be migrating to the new, more powerful Professional API on December 4th, 2018. Please update your application to use the free tier of the Professional API before then.
Hey Thank you for your great videos. However, when I code Picasso.with(activity).load(new StringBuilder("https://en.bitcoin.it/w/images/en/6/69/Btc-sans.png"😉 , "with" does not work. Got the error of cannot resolve. How to fix or change it? Appreciate for help!
final List<CoinModel> newItems=gson.fromJson(body,new TypeToken<List<CoinModel>>(){}.getType()); please any one resolve my error in this line. error type: FATAL EXCEPTION: OkHttp Dispatcher Process: com.example.fakhar.coinmarketcap, PID: 11962 com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 2 path $
its giving crash on Google play console oppo A37 and android 5.1
Aug 4, 12:56 AM on app version 1 Oppo A37f (A37f), Android 5.1 Report 1
java.lang.NullPointerException: at abduldev.cryptocoins.Adapter.CoinAdapter.onBindViewHolder (CoinAdapter.java:79) at android.support.v7.widget.RecyclerView$Adapter.onBindViewHolder (RecyclerView.java:6673) at android.support.v7.widget.RecyclerView$Adapter.bindViewHolder (RecyclerView.java:6714) at android.support.v7.widget.RecyclerView$Recycler.tryBindViewHolderByDeadline (RecyclerView.java:5647) my code is absolutely write as i write according to your tutorial
public class CoinAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>{
-19 02:00:37.731 29160-29178/cryotocoins.abduldev.cryptocoinrates E/AndroidRuntime: FATAL EXCEPTION: OkHttp Dispatcher Process: cryotocoins.abduldev.cryptocoinrates, PID: 29160 java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare() at android.os.Handler.<init>(Handler.java:200) at android.os.Handler.<init>(Handler.java:114) at android.widget.Toast$TN.<init>(Toast.java:372) at android.widget.Toast.<init>(Toast.java:105) at android.widget.Toast.makeText(Toast.java:264) at cryotocoins.abduldev.cryptocoinrates.MainActivity$5.onFailure(MainActivity.java:135)
how much request it can handle i developed your news app its good but its crashes due to bad worst api and showing fatal error of loading images or request at picasso line so i decided to not publish it to store can you tell its api better than newsapi.org??? or not
Really nice tutorial. Just to point out, in 12:15 is not constraintTop, but constraintBottom… same for the next TextViews. That's why percentages don't align with the bottom of the icon's coin when you test it at the end of the video.
Thank you so much! I have a problem with this line 🙁 private void loadFirst10Coin(int index) { …………………………… final List<CoinModel> newItems = gson.fromJson(body, new TypeToken<List<CoinModel>>(){}.getType()); } I would appreciate your help 🙂
sir plz also make the bit coin rates and its tracking app with api there are a lot of free api at google for #bitcoin$ money converter money rates checker etc plz make a pro app on thiz its a good idea
Hello sir , i wrote the same code but i got an error in gson part
"com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 2 path $"
Sir please help me to resolve this error
That is really smart sir!
Sir please make tutorial on bitcoin wallet app development in android studio with java
Thanks bro
Hello sir, thank you for this tutorial. Unlike you, I use the Coinranking API in MainActivity. This link you used when loading images in CoinAdapter is not working, how can I fix it?
https://res.cloudinary.com/dxi90ksom/image/upload/
Sir I watched this tutorial, and it's most useful, but sir right now in 2020 it's not working and this project need upgradation pls work on this sir.
Hai, I implementing your project. I am facing the below error. can you please guide me. Your Videos are very helpful. I am trying to do all your projects.
Process: com.example.cointracker, PID: 10871
java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()
at android.os.Handler.<init>(Handler.java:200)
at android.os.Handler.<init>(Handler.java:114)
at android.widget.Toast$TN.<init>(Toast.java:342)
at android.widget.Toast.<init>(Toast.java:99)
at android.widget.Toast.makeText(Toast.java:248)
at com.example.cointracker.MainActivity$5.onFailure(MainActivity.java:130)
I wrote the same code But my text views text color didn't changed to red or green
images are not loading? any suggestions?
Make a video showing how to add search option. Please.
Source Code link not working.
Showing only ads.
There is no link to download source code or skip ads.
Can you please provide another working link??
I'm from India and the link in not opening properly from there i also tried vpn but didn't worked
not show symbol pic
Awesome video! Can you make a video on how to add coins graph? Thank you!
Hi i did exactly what you did, step by step. But when I launch the app. It crashes. Doesn't show anything just open and close. I revised the code, line by line and I did not find anything.
(Ps. the images link isn't working, may it be the reason?)
The link: https://res.cloudinary.com/dxi90ksom/image/upload/
Please help me.
Hey EDMT,, Requesting a tutorial on using Version 2 of this API. Link to V2: https://coinmarketcap.com/api/
says they will take down version 1 by November 2018.
CoinMarketCap Public API Documentation
Version 2
The Public API will be migrating to the new, more powerful Professional API on December 4th, 2018. Please update your application to use the free tier of the Professional API before then.
Summary of Endpoints
How can I reduce the price_usd decimal places to "#.##"?
Problem um 23:08 Minuten Cannot resolve symbol 'coin_layot'
Hey Thank you for your great videos. However, when I code Picasso.with(activity).load(new StringBuilder("https://en.bitcoin.it/w/images/en/6/69/Btc-sans.png"😉 , "with" does not work. Got the error of cannot resolve. How to fix or change it? Appreciate for help!
Chào Anh, e muốn làm cái app về check domain và đăng ký domain thì mình làm tương tự như video của a được ko a? cảm ơn a
final List<CoinModel> newItems=gson.fromJson(body,new TypeToken<List<CoinModel>>(){}.getType());
please any one resolve my error in this line.
error type:
FATAL EXCEPTION: OkHttp Dispatcher
Process: com.example.fakhar.coinmarketcap, PID: 11962
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 2 path $
(String.format("https://api.coinmarketcap.com/v1/ticker/?start=%d&limit=10",index))
.build();
here index is showing RED, solution please
its giving crash on Google play console oppo A37 and android 5.1
Aug 4, 12:56 AM on app version 1
Oppo A37f (A37f), Android 5.1
Report 1
java.lang.NullPointerException:
at abduldev.cryptocoins.Adapter.CoinAdapter.onBindViewHolder (CoinAdapter.java:79)
at android.support.v7.widget.RecyclerView$Adapter.onBindViewHolder (RecyclerView.java:6673)
at android.support.v7.widget.RecyclerView$Adapter.bindViewHolder (RecyclerView.java:6714)
at android.support.v7.widget.RecyclerView$Recycler.tryBindViewHolderByDeadline (RecyclerView.java:5647)
my code is absolutely write as i write according to your tutorial
public class CoinAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>{
ILoadMore iLoadMore;
boolean isLoading;
Activity activity;
List<CoinModel> items;
int visibleThreshold = 5, lastVisibleItem,totalItemCount;
public CoinAdapter(RecyclerView recyclerView, Activity activity, final List<CoinModel> items) {
this.activity = activity;
this.items = items;
final LinearLayoutManager linearLayoutManager = (LinearLayoutManager) recyclerView.getLayoutManager();
recyclerView.addOnScrollListener(new RecyclerView.OnScrollListener() {
@Override
public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
super.onScrolled(recyclerView, dx, dy);
totalItemCount = linearLayoutManager.getItemCount();
lastVisibleItem = linearLayoutManager.findLastVisibleItemPosition();
if (!isLoading && totalItemCount <= (lastVisibleItem+visibleThreshold))
{
if (iLoadMore != null)
iLoadMore.onLoadMore();
isLoading = true;
}
}
});
}
public void setiLoadMore(ILoadMore iLoadMore) {
this.iLoadMore = iLoadMore;
}
@NonNull
@Override
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View view = LayoutInflater.from(activity)
.inflate(R.layout.coin_layout,parent,false);
return new CoinViewHolder(view);
}
@Override
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
CoinModel item = items.get(position);
CoinViewHolder holderItem = (CoinViewHolder)holder;
holderItem.coin_name.setText(item.getName());
holderItem.coin_price.setText(item.getPrice_usd());
holderItem.coin_symbol.setText(item.getSymbol());
holderItem.one_hour_change.setText(item.getPercent_change_1h()+"%");
holderItem.twenty_hours_change.setText(item.getPercent_change_24h()+"%");
holderItem.seven_days_change.setText(item.getPercent_change_7d()+"%");
// Now Load Image
Picasso.with(activity)
.load(new StringBuilder("https://res.cloudinary.com/dxi90ksom/image/upload/"😉
.append(item.getSymbol().toLowerCase()).append(".png").toString())
.into(holderItem.coin_icon);
holderItem.one_hour_change.setTextColor(item.getPercent_change_1h().contains("-")?
Color.parseColor("#FF0000"):Color.parseColor("#32CD32"));
holderItem.twenty_hours_change.setTextColor(item.getPercent_change_1h().contains("-")?
Color.parseColor("#FF0000"):Color.parseColor("#32CD32"));
holderItem.seven_days_change.setTextColor(item.getPercent_change_1h().contains("-")?
Color.parseColor("#FF0000"):Color.parseColor("#32CD32"));
}
@Override
public int getItemCount() {
return items.size();
}
public void setLoaded(){isLoading = false ;}
public void updateData(List<CoinModel> coinModels){
this.items = coinModels;
notifyDataSetChanged();
}
}
I did code same like you but am getting some error, and i don't know how to recover it. below is the Android Monitor pic…. can you please help!
Pic Linkhttps://drive.google.com/file/d/1y2kd_RFE9fp1HDaEbvHhmLN6iQFWNoUw/view?usp=sharing
-19 02:00:37.731 29160-29178/cryotocoins.abduldev.cryptocoinrates E/AndroidRuntime: FATAL EXCEPTION: OkHttp Dispatcher
Process: cryotocoins.abduldev.cryptocoinrates, PID: 29160
java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()
at android.os.Handler.<init>(Handler.java:200)
at android.os.Handler.<init>(Handler.java:114)
at android.widget.Toast$TN.<init>(Toast.java:372)
at android.widget.Toast.<init>(Toast.java:105)
at android.widget.Toast.makeText(Toast.java:264)
at cryotocoins.abduldev.cryptocoinrates.MainActivity$5.onFailure(MainActivity.java:135)
java file:
on MainActivity.java its crashes when internet connection is off?
private void loadFirst10Coin(int index) {
client = new OkHttpClient();
request = new Request.Builder().url(String.format("https://api.coinmarketcap.com/v1/ticker/?start=%d&limit=10", index))
.build();
swipeRefreshLayout.setRefreshing(true);
client.newCall(request)
.enqueue(new Callback() {
@Override
public void onFailure(Call call, IOException e) {
Toast.makeText(MainActivity.this, e.getMessage(), Toast.LENGTH_SHORT).show();
}
@Override
public void onResponse(Call call, Response response) throws IOException {
String body = response.body().string();
Gson gson = new Gson();
final List<CoinModel> newItems = gson.fromJson(body, new TypeToken<List<CoinModel>>() {
}.getType());
runOnUiThread(new Runnable() {
@Override
public void run() {
adapter.updateData(newItems);
}
});
}
});
if (swipeRefreshLayout.isRefreshing())
swipeRefreshLayout.setRefreshing(false);
}
what to do man?
"https://res.cloudinary.com/dxi90ksom/image/upload/" page is not opening
so i can't get crypto images. help me
FYI version 1 of the coinmarketcap API will end November 30th, 2018. Version 2 is quite different and doesn't support icons (as of right now).
how much request it can handle i developed your news app its good but its crashes due to bad worst api and showing fatal error of loading images or request at picasso line so i decided to not publish it to store can you tell its api better than newsapi.org??? or not
Nice video and start make videos on different apis
Hello Sir My App Cryptocurrency Tracker Icon Not Show Help Me Ser Plz
sir i have a query why u are using okhttp ? as compare to retrofit in news app ? i need strong reasons in ur reply thanks
Fantastic! You're the best!!!
Hey EDMT,, Requesting a tutorial on using Version 2 of this API.
hi!, how can I add a setOnClickListener to the adapter and display a message with the selected coin?
You are the best
Awesome tutorial. Can you create a tutorial with clean architecture pattern(lifecycle architecture, livedata) in kotlin with usage of retrofit
How to add searchbar?
Really nice tutorial. Just to point out, in 12:15 is not constraintTop, but constraintBottom… same for the next TextViews. That's why percentages don't align with the bottom of the icon's coin when you test it at the end of the video.
Thank you so much! I have a problem with this line 🙁
private void loadFirst10Coin(int index) {
……………………………
final List<CoinModel> newItems = gson.fromJson(body, new TypeToken<List<CoinModel>>(){}.getType());
}
I would appreciate your help 🙂
sir plz also make the bit coin rates and its tracking app with api there are a lot of free api at google for #bitcoin$ money converter money rates checker etc plz make a pro app on thiz its a good idea
Thank u for this awesome video