This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//initiate Player | |
//Create a default TrackSelector | |
BandwidthMeter bandwidthMeter = new DefaultBandwidthMeter(); | |
TrackSelection.Factory videoTrackSelectionFactory = new AdaptiveTrackSelection.Factory(bandwidthMeter); | |
TrackSelector trackSelector = new DefaultTrackSelector(videoTrackSelectionFactory); | |
//Create the player | |
SimpleExoPlayer player = ExoPlayerFactory.newSimpleInstance(this, trackSelector); | |
PlayerView playerView = findViewById(R.id.simple_player); | |
playerView.setPlayer(player); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.net.Uri; | |
import com.google.android.exoplayer2.C; | |
import com.google.android.exoplayer2.upstream.DataSource; | |
import com.google.android.exoplayer2.upstream.DataSpec; | |
import net.butterflytv.rtmp_client.RtmpClient; | |
import java.io.IOException; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try { | |
Field mScroller = null; | |
mScroller = ViewPager.class.getDeclaredField("mScroller"); | |
mScroller.setAccessible(true); | |
ViewPagerScroller scroller = new ViewPagerScroller(viewPager.getContext()); | |
mScroller.set(viewPager, scroller); | |
} catch (Exception e) { | |
Log.e("GHM", "error ", e); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.jalvarado.mlsview.utils; | |
import com.squareup.okhttp.Callback; | |
import com.squareup.okhttp.MediaType; | |
import com.squareup.okhttp.OkHttpClient; | |
import com.squareup.okhttp.Request; | |
import com.squareup.okhttp.RequestBody; | |
import com.squareup.okhttp.Response; | |
import java.io.IOException; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void sendSms() { | |
try { | |
String SENT = "SMS_SENT"; | |
String DELIVERED = "SMS_DELIVERED"; | |
PendingIntent sentPI = PendingIntent.getBroadcast(this, 0, new Intent( | |
SENT), 0); | |
PendingIntent deliveredPI = PendingIntent.getBroadcast(this, 0, | |
new Intent(DELIVERED), 0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { | |
super.onViewCreated(view, savedInstanceState); | |
MapFragment mapFragment = (MapFragment) getActivity().getFragmentManager().findFragmentById(R.id.map); | |
mapFragment.getMapAsync(this); | |
} | |
@Override | |
public void onMapReady(GoogleMap map) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<!-- | |
Copyright 2017 Google Inc. | |
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except | |
in compliance with the License. You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software distributed under the License |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static String toTitleCase(String str) | |
{ | |
String[] words = str.trim().split(" "); | |
StringBuilder ret = new StringBuilder(); | |
for(int i = 0; i < words.length; i++) | |
{ | |
if(words[i].trim().length() > 0) | |
{ | |
Log.e("words[i].trim",""+words[i].trim().charAt(0)); | |
ret.append(Character.toUpperCase(words[i].trim().charAt(0))); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.ghm.rtoexam.utils; | |
/** | |
* Created by ponna on 16-08-2017. | |
*/ | |
import android.content.Context; | |
import android.graphics.Canvas; | |
import android.support.v7.widget.AppCompatTextView; | |
import android.text.Layout; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# To enable ProGuard in your project, edit project.properties | |
# to define the proguard.config property as described in that file. | |
# | |
# Add project specific ProGuard rules here. | |
# By default, the flags in this file are appended to flags specified | |
# in ${sdk.dir}/tools/proguard/proguard-android.txt | |
# You can edit the include path and order by changing the ProGuard | |
# include property in project.properties. | |
# | |
# For more details, see |
OlderNewer