Skip to content

Commit

Permalink
fix: some major fixes, and doc changes
Browse files Browse the repository at this point in the history
Fixed an issue happening with widget that caused the app to crash on some devices. Removed proguard because apparently its stopping some devices from building and I actually have no idea what it was doing in the first place. Moved some hard coded strings to the strings file in res. Added some stuff to the TODO folder (such as moving some of the widget video play code to the widget class instead of the videosyncintentservice)
  • Loading branch information
itsnotafake committed Apr 6, 2017
1 parent 6958753 commit 456a651
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
1 change: 0 additions & 1 deletion Atakr/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ android {
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
debuggable true
signingConfig signingConfigs.udacity
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ protected void onCreate(Bundle savedInstanceState){
//Title and View have edited text rather than the raw values,
//so we create the editted strings and then place them in their
//respective text views
String viewString = mYoutubeViews + " Views";
String viewString = mYoutubeViews + " " + getResources().getString(R.string.share_cardview_views);

shareYoutubeTitle.setText(mYoutubeTitle);
shareYoutubeUploader.setText(mYoutubeUploader);
Expand Down Expand Up @@ -147,8 +147,7 @@ public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {
startActivityForResult(
AuthUI.getInstance()
.createSignInIntentBuilder()
.setProviders(Arrays.asList(new AuthUI.IdpConfig.Builder(AuthUI.EMAIL_PROVIDER).build(),
new AuthUI.IdpConfig.Builder(AuthUI.GOOGLE_PROVIDER).build()))
.setProviders(Arrays.asList(new AuthUI.IdpConfig.Builder(AuthUI.EMAIL_PROVIDER).build()))
.setTheme(R.style.AppTheme)
.setIsSmartLockEnabled(false)
.build(),
Expand Down Expand Up @@ -183,13 +182,13 @@ public void onDataChange(DataSnapshot dataSnapshot) {
mVideoDatabaseReference.child(mYoutubeId).setValue(video);
Toast.makeText(
getApplicationContext(),
"Video Posted!",
R.string.share_posted,
Toast.LENGTH_SHORT
).show();
}else{
Toast.makeText(
getApplicationContext(),
"This video has already been uploaded",
R.string.share_already_uploaded,
Toast.LENGTH_SHORT
).show();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ public void onDataChange(DataSnapshot dataSnapshot) {
if(counter == randomInt){
Video video = videoSnapshot.getValue(Video.class);
Intent videoPlay = new Intent(mContext, VideoPlayActivity.class);
videoPlay.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
videoPlay.putExtra(VideoPlayActivity.YOUTUBE_VIDEO_ID, video.getYoutubeVideoId());
mContext.startActivity(videoPlay);
}
Expand Down
2 changes: 2 additions & 0 deletions Atakr/app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
<string name="share_atakrTitle">(optional) New Title</string>
<string name="share_atakrGame">(optional) Game</string>
<string name="share_button">Post</string>
<string name="share_posted">Video Posted!</string>
<string name="share_already_uploaded">This video has already been uploaded</string>

<!--VIDEO BROWSE FRAGMENT -->
<string name="video_list_image_CD">Youtube Thumbnail</string>
Expand Down
1 change: 1 addition & 0 deletions TODO.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Atakr TODO (Long Term):
-make client side master app for more highly tuned popularity numbers
-better configure the widget
-fix problem where app crashes when you try to scroll down immediately after refreshing
-move getting random video from service to widget class


IMMEDIATE TODO (FOR APP LAUNCH):
Expand Down

0 comments on commit 456a651

Please sign in to comment.