Compare commits

..

7 commits

Author SHA1 Message Date
jessopb
fdd759b241
Merge pull request #1236 from ktprograms/readme-google-services
Add google-services.json instructions to README
2022-11-29 13:07:52 -05:00
jessopb
57cd649c02
Update README.md 2022-11-29 13:07:30 -05:00
jessopb
7250435d7f
Create deploy.yml 2022-11-25 14:03:02 -05:00
jessopb
b81abf74a1
Merge pull request #1244 from Coolguy3289/patch-1
Update LBRY_TV_CONNECTION_STRING to new Odysee Backend
2022-11-23 13:59:38 -05:00
Ralph
208e2c2d42
Update LBRY_TV_CONNECTION_STRING to new Odysee Backend 2022-11-23 11:29:52 -05:00
kt programs
a5bdd1c042 Add google-services.json instructions to README 2022-04-18 12:14:25 +08:00
Alex Grin
1e3a74cae1
Update README.md 2021-09-28 10:19:37 -04:00
6 changed files with 5 additions and 113 deletions

1
.github/workflows/deploy.yml vendored Normal file
View file

@ -0,0 +1 @@

View file

@ -28,6 +28,8 @@ twitterConsumerKey=XXXXXX
twitterConsumerSecret=XXXXXX
```
Copy the file 'google-services.sample.json' to 'google-services.json' in the app/ folder.
Click the Sync button and when process finishes, the Run button to launch the app on your simulator or connected debugging device after the build process is complete.
## Contributing
@ -37,7 +39,7 @@ Contributions to this project are welcome, encouraged, and compensated. For more
This project is MIT licensed. For the full license, see [LICENSE](LICENSE).
## Security
We take security seriously. Please contact security@lbry.com regarding any security issues. Our PGP key is [here](https://keybase.io/lbry/key.asc) if you need it.
We take security seriously. Please contact security@lbry.com regarding any security issues. Our PGP key is [here](https://lbry.com/faq/pgp-key) if you need it.
## Contact
The primary contact for this project is [@akinwale](https://github.com/akinwale) (akinwale@lbry.com)

View file

@ -1,20 +1,14 @@
package io.lbry.browser.adapter;
import android.content.Context;
import android.content.Intent;
import android.text.format.DateUtils;
import android.util.Log;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.ProgressBar;
import android.widget.TextView;
import android.widget.Toast;
import androidx.appcompat.widget.PopupMenu;
import androidx.recyclerview.widget.RecyclerView;
import com.bumptech.glide.Glide;
@ -27,9 +21,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import io.lbry.browser.MainActivity;
import io.lbry.browser.R;
import io.lbry.browser.exceptions.LbryUriException;
import io.lbry.browser.listener.SelectionModeListener;
import io.lbry.browser.model.Claim;
import io.lbry.browser.model.LbryFile;
@ -40,7 +32,6 @@ import lombok.Getter;
import lombok.Setter;
public class ClaimListAdapter extends RecyclerView.Adapter<ClaimListAdapter.ViewHolder> {
private static final String TAG = ClaimListAdapter.class.getSimpleName();
private static final int VIEW_TYPE_STREAM = 1;
private static final int VIEW_TYPE_CHANNEL = 2;
private static final int VIEW_TYPE_FEATURED = 3; // featured search result
@ -378,11 +369,6 @@ public class ClaimListAdapter extends RecyclerView.Adapter<ClaimListAdapter.View
vh.itemView.setOnLongClickListener(new View.OnLongClickListener() {
@Override
public boolean onLongClick(View view) {
if (original != null) {
showClaimPopupMenu(view, original);
}
if (!canEnterSelectionMode) {
return false;
}
@ -533,79 +519,6 @@ public class ClaimListAdapter extends RecyclerView.Adapter<ClaimListAdapter.View
notifyDataSetChanged();
}
public void showClaimPopupMenu(View view, Claim claim) {
Toast.makeText(context, "LONG CLICKED: " + claim.getTitle(), Toast.LENGTH_SHORT).show(); //Don't need, but it's nice to see it on the UI
Log.d(TAG, "LONG CLICKED: " + claim.getTitle());
//do I need to do a check if context is null?
PopupMenu popup = new PopupMenu(context, view);
popup.getMenuInflater().inflate(R.menu.menu_claim_popup, popup.getMenu());
popup.setGravity(Gravity.END);
popup.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
public boolean onMenuItemClick(MenuItem item) {
int i = item.getItemId();
if (i == R.id.menu_claim_popup_share) {
//share the claim
Log.d(TAG, "Let's share: " + claim.getTitle());
try{
String shareUrl = LbryUri.parse(
!Helper.isNullOrEmpty(claim.getCanonicalUrl()) ? claim.getCanonicalUrl() :
(!Helper.isNullOrEmpty(claim.getShortUrl()) ? claim.getShortUrl() : claim.getPermanentUrl())).toTvString();
Intent shareIntent = new Intent();
shareIntent.setAction(Intent.ACTION_SEND);
shareIntent.setType("text/plain");
shareIntent.putExtra(Intent.EXTRA_TEXT, shareUrl);
MainActivity.startingShareActivity = true;
Intent shareUrlIntent = Intent.createChooser(shareIntent, context.getString(R.string.share_lbry_content));
shareUrlIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(shareUrlIntent);
Log.d(TAG, "Sharing: " + shareUrl);
} catch (LbryUriException lbryUriException){
lbryUriException.printStackTrace();
}
return true;
}
else if (i == R.id.menu_claim_popup_support){
//support the claim
Log.d(TAG, "Let's support: " + claim.getTitle());
return true;
}
else if (i == R.id.menu_claim_popup_repost) {
//repost the claim
Log.d(TAG, "Let's repost: " + claim.getTitle());
return true;
}
else if (i == R.id.menu_claim_popup_download) {
//download the claim
Log.d(TAG, "Let's download: " + claim.getTitle());
return true;
}
else if (i == R.id.menu_claim_popup_report) {
//report the claim
Log.d(TAG, "Let's report: " + claim.getTitle());
return true;
}
else {
return onMenuItemClick(item);
}
}
});
popup.show();
}
public interface ClaimListItemListener {
void onClaimClicked(Claim claim);
}

View file

@ -51,7 +51,7 @@ public final class Lbry {
public static final int TTL_CLAIM_SEARCH_VALUE = 120000; // 2-minute TTL for cache
public static final String SDK_CONNECTION_STRING = "http://127.0.0.1:5279";
public static final String LBRY_TV_CONNECTION_STRING = "https://api.lbry.tv/api/v1/proxy";
public static final String LBRY_TV_CONNECTION_STRING = "https://api.na-backend.odysee.com/api/v1/proxy";
public static final String TAG = "Lbry";
// Values to obtain from LBRY SDK status

View file

@ -1,18 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/menu_claim_popup_share"
android:title="@string/share" />
<item android:id="@+id/menu_claim_popup_support"
android:title="@string/support" />
<item android:id="@+id/menu_claim_popup_repost"
android:title="@string/repost" />
<item android:id="@+id/menu_claim_popup_download"
android:title="@string/download" />
<item android:id="@+id/menu_claim_popup_report"
android:title="@string/report" />
</menu>

View file

@ -9,7 +9,6 @@
<item name="windowActionModeOverlay">true</item>
<item name="android:windowBackground">@color/colorPrimaryDark</item>
<item name="drawerArrowStyle">@style/AppTheme.DrawerArrowStyle</item>
<item name="popupMenuStyle">@style/ClaimPopupMenu</item>
<!--item name="android:windowLightStatusBar">true</item-->
</style>
@ -33,9 +32,4 @@
<item name="color">@color/actionBarForeground</item>
</style>
<style name="ClaimPopupMenu" parent="Widget.AppCompat.PopupMenu">
<item name="android:dropDownHorizontalOffset">-8dp</item>
<item name="android:dropDownVerticalOffset">8dp</item>
</style>
</resources>