Saturday, August 22, 2015

Top 2 best Torch/Flash/Light/LED Applications for Android

Following are the best torch apps on google play

Super-Rocket LED Torch Light:
This application realy meet the goals for any one wanted an application which support Only torch light.
I figure it out and rant it on first position

Download Super-Rocket Let Torch

Super-Bright LED Flashlight:
I rank this application on 2nd number because it also have others things to play around mean you can change your screen color etc.
Download this app


Tuesday, August 18, 2015

How to integrate Facebook With Parse



Parse.com tutorial will not help you provide complete workable Facebook solution.

Following are the easiest Steps to integrate Facebook Using Parse



  1. Set up a Facebook app, if you haven't already.
  2. Add your application's Facebook Application ID on your Parse application's settings page.
  3. Follow Facebook's instructions for getting started with the Facebook SDK to create an app linked to the Facebook SDK. Once you get to Step 6, stop after linking the Facebook SDK project and configuring the Facebook app ID. You can use our guide to attach your Parse users to Facebook accounts when logging in.
  4. Go to you app build.gradle  file and copy follwing in dependencies
  5.               compile fileTree(dir: 'libs', include: 'ParseFacebookUtilsV4-1.9.2.jar')
             compile 'com.facebook.android:facebook-android-sdk:4.1.0'
    • Go to your manifest file and copy the following in application tag
            <meta-data
             Android: name="com. Facebook. SDK. ApplicationId"
             android:value="#facebook_app_id"/>

          <activity android:name="com.facebook.FacebookActivity"
                android:configChanges=
                    "keyboard|keyboardHidden|screenLayout|screenSize|orientation"
                android:theme="@android:style/Theme.Translucent.NoTitleBar"
                android:label="@string/app_name" />
    • Now go to your Application class and initilize Facebook util by using following line
               ParseFacebookUtils.initialize(context);
    • Copy the following code in the activty from where you want to login to facebook
    protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); ParseFacebookUtils.onActivityResult(requestCode, resultCode, data); }
    • Finally Copy the following code in the activity from where you want to login to facebook
    ParseFacebookUtils.logInWithReadPermissionsInBackground(Dashboard.this, null, new LogInCallback() { @Override public void done(ParseUser user, ParseException err) { if (user == null) { Log.d("MyApp", "Uh oh. The user cancelled the Facebook login."); } else if (user.isNew()) { Log.d("MyApp", "User signed up and logged in through Facebook!"); } else { Log.d("MyApp", "User logged in through Facebook!"); } }});


    Enjoy

    Monday, April 20, 2015

    ChromeCast Sender  Android Application Tutorial (How to Create a chrome Cast application)



    Code Source -> Source
    Follwing Questions can be answerd in this tutorial

    How to get default cast player ID
    How to use Cast button on another place then top bar
    Easy to Use Cast


    Requirements

    Just need cast Companion library and place it in same directry as your project

    https://github.com/googlecast/CastCompanionLibrary-android

    Step1:
    Make a new android studio Project
    Open Settings File and place follwoing line of code in it

    include ':CastCompanionLibrary-android'
    project(':CastCompanionLibrary-android').projectDir = new File(rootDir, '../CastCompanionLibrary-android')

    Step 2:
    Open androidManifiest file and place following code inside it

    Permissions

        <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
        <uses-permission android:name="android.permission.INTERNET"/>

    CastCompanion Services and activities in manifiest
    -> Just chnage the name of parent in below code


            <receiver android:name="com.google.android.libraries.cast.companionlibrary.remotecontrol.VideoIntentReceiver" >
                <intent-filter>
                    <action android:name="android.media.AUDIO_BECOMING_NOISY" />
                    <action android:name="android.intent.action.MEDIA_BUTTON" />
                    <action android:name="com.google.android.libraries.cast.companionlibrary.action.toggleplayback" />
                    <action android:name="com.google.android.libraries.cast.companionlibrary.action.stop" />
                </intent-filter>
            </receiver>

            <service
                android:name="com.google.android.libraries.cast.companionlibrary.notification.VideoCastNotificationService"
                android:exported="false" >
                <intent-filter>
                    <action android:name="com.google.android.libraries.cast.companionlibrary.action.toggleplayback" />
                    <action android:name="com.google.android.libraries.cast.companionlibrary.action.stop" />
                    <action android:name="com.google.android.libraries.cast.companionlibrary.action.notificationvisibility" />
                </intent-filter>
            </service>

            <service android:name="com.google.android.libraries.cast.companionlibrary.cast.reconnection.ReconnectionService"/>


            <activity
                android:name="com.google.android.libraries.cast.companionlibrary.cast.player.VideoCastControllerActivity"
                android:label="@string/app_name"
                android:launchMode="singleTask"
                android:theme="@style/Theme.AppCompat.Light.NoActionBar"
                android:parentActivityName="com.example.tahir.castapplication.CastActivity"
                android:screenOrientation="portrait" >
                <meta-data
                    android:name="android.support.PARENT_ACTIVITY"
                    android:value="com.example.tahir.castapplication.CastActivity" />

                <intent-filter>
                    <onacti: androidname="android.intent.action.MAIN" />
                </intent-filter>
            </activity>


    Step 3:
    Create a new class and Extends it to Application
    Paste followings lines in onCreate of Application Class

        public void onCreate() {
            super.onCreate();

            VideoCastManager.
                    initialize(this, CastMediaControlIntent.DEFAULT_MEDIA_RECEIVER_APPLICATION_ID, null, null).
                    setVolumeStep(0.5).
                    enableFeatures(VideoCastManager.FEATURE_NOTIFICATION |
                            VideoCastManager.FEATURE_LOCKSCREEN |
                            VideoCastManager.FEATURE_WIFI_RECONNECT |
                            VideoCastManager.FEATURE_CAPTIONS_PREFERENCE)
            ;

        }

    This is the line use to get Default media Player ID in Receiver

    CastMediaControlIntent.DEFAULT_MEDIA_RECEIVER_APPLICATION_ID




    Open Your Activity XML file and place following code for the button

    <android.support.v7.app.MediaRouteButton
            android:id="@+id/media_route_button"
            android:layout_width="wrap_content"
            android:layout_alignParentTop="true"
            android:background="@android:color/transparent"
            android:layout_height="wrap_content"
            android:mediaRouteTypes="user"

            />

    If you want to show button in Menu Bar , Paste follwing code in menu file

        <item
            android:id="@+id/media_route_menu_item"
            android:title="Cast"
            app:actionProviderClass="android.support.v7.app.MediaRouteActionProvider"
            app:showAsAction="always"/>



    Step4:
    Now open Activity class to register Cll backs


    onCreate
     mCastManager = VideoCastManager.getInstance();

            // -- Adding MiniController
            mMini = (MiniController) findViewById(R.id.miniController);
            mCastManager.addMiniController(mMini);
            mCastManager.addMediaRouterButton(mediaRoutebtn);
            mCastConsumer = new VideoCastConsumerImpl() {


                @Override
                public void onApplicationConnected(ApplicationMetadata appMetadata, String sessionId, boolean wasLaunched) {

                    Toast.makeText(CastActivity.this,"Successfully Connected to Receiver Application", Toast.LENGTH_LONG).show();
                    super.onApplicationConnected(appMetadata, sessionId, wasLaunched);
                }

                @Override
                public void onFailed(int resourceId, int statusCode) {

                }

                @Override
                public void onConnectionSuspended(int cause) {
                }

                @Override
                public void onConnectivityRecovered() {

                }

                @Override
                public void onCastDeviceDetected(final MediaRouter.RouteInfo info) {

                }

                @Override
                public void onConnectionFailed(ConnectionResult result) {
                }
            };

            mCastManager.reconnectSessionIfPossible(20);



    Line of code to add button on anywhere

            mCastManager.addMediaRouterButton(mediaRoutebtn);

    OnResume:
    protected void onResume() {
            super.onResume();

            mCastManager = VideoCastManager.getInstance();
            mCastManager.addVideoCastConsumer(mCastConsumer);
            mCastManager.incrementUiCounter();

        }

    OnPause


    protected void onPause() {

            mCastManager.decrementUiCounter();
            mCastManager.removeVideoCastConsumer(mCastConsumer);

            super.onPause();
        }

    onDestroy


     protected void onDestroy() {
            super.onDestroy();
            if (null != mCastManager) {
                mMini.removeOnMiniControllerChangedListener(mCastManager);
                if(mMini != null) {
                    mCastManager.removeMiniController(mMini);
                }
            }
        }


    Code to add button in onOptionItems

        @Override
        public boolean onCreateOptionsMenu(Menu menu) {
            // Inflate the menu; this adds items to the action bar if it is present.
            getMenuInflater().inflate(R.menu.menu_cast, menu);
            mediaRouteMenuItem = mCastManager.
                    addMediaRouterButton(menu, R.id.media_route_menu_item);
            return true;
        }

    Now you need to have a function which will start casting any mp4 on you device

        private void startCast(){
            MediaMetadata mediaMetadata = new MediaMetadata( MediaMetadata.MEDIA_TYPE_MOVIE );

            mediaMetadata.putString( MediaMetadata.KEY_TITLE, "Main Title");
            mediaMetadata.putString( MediaMetadata.KEY_SUBTITLE, "Sub Title");

                mediaMetadata.addImage(new WebImage(Uri.parse(""))); // Cast Icon
                mediaMetadata.addImage(new WebImage(Uri.parse(""))); // Wallper


            MediaInfo mediaInfo = new MediaInfo.Builder(urlField.getText().toString())
                    .setContentType("video/mp4") //for live -> "application/vnd.apple.mpegurl"
                    .setStreamType(MediaInfo.STREAM_TYPE_BUFFERED ) // Repplace for live -> MediaInfo.STREAM_TYPE_LIVE
                    .setMetadata(mediaMetadata)
                    .build();


            Bundle bundles = com.google.android.libraries.cast.companionlibrary.utils.Utils.mediaInfoToBundle(mediaInfo);



            mCastManager.startVideoCastControllerActivity(CastActivity.this,bundles,0,true);
        }



    If you have any Question let me know,
    Source is also attached with the tutorial    Code Source

    Sunday, April 12, 2015

    Game of Thrones: First four episodes of season five leaked




    The first four episodes of the highly anticipated fifth season of Game of Thrones have leaked online, sending fans into a frenzy


    Here is the link to torrent files

    http://extratorrent.cc/category/8/TV+Torrents.html

    Saturday, February 7, 2015

    SuperSU app stuck on KNOX Disabling (Samsung galaxy models KNOX problem)


    So here is the simple solution to disable KNOX in samsung phones

    Step 1:
    Download Terminal Emulator android from google play store
    Step 2:
    Give it root access by writing su in command
    Step 3:
    Open Emulator Terminal application and write following command

    1->   su2->   pm disable com.sec.knox.seandroid


    Cheers' Now.
    Now SuperSu will perfectly ok

    ad

    Top 2 best Torch/Flash/Light/LED Applications for Android

    Following are the best torch apps on google play

    Super-Rocket LED Torch Light:
    This application realy meet the goals for any one wanted an application which support Only torch light.
    I figure it out and rant it on first position

    Download Super-Rocket Let Torch

    Super-Bright LED Flashlight:
    I rank this application on 2nd number because it also have others things to play around mean you can change your screen color etc.
    Download this app


    How to integrate Facebook With Parse



    Parse.com tutorial will not help you provide complete workable Facebook solution.

    Following are the easiest Steps to integrate Facebook Using Parse



    1. Set up a Facebook app, if you haven't already.
    2. Add your application's Facebook Application ID on your Parse application's settings page.
    3. Follow Facebook's instructions for getting started with the Facebook SDK to create an app linked to the Facebook SDK. Once you get to Step 6, stop after linking the Facebook SDK project and configuring the Facebook app ID. You can use our guide to attach your Parse users to Facebook accounts when logging in.
    4. Go to you app build.gradle  file and copy follwing in dependencies
    5.               compile fileTree(dir: 'libs', include: 'ParseFacebookUtilsV4-1.9.2.jar')
               compile 'com.facebook.android:facebook-android-sdk:4.1.0'
      • Go to your manifest file and copy the following in application tag
              <meta-data
               Android: name="com. Facebook. SDK. ApplicationId"
               android:value="#facebook_app_id"/>

            <activity android:name="com.facebook.FacebookActivity"
                  android:configChanges=
                      "keyboard|keyboardHidden|screenLayout|screenSize|orientation"
                  android:theme="@android:style/Theme.Translucent.NoTitleBar"
                  android:label="@string/app_name" />
      • Now go to your Application class and initilize Facebook util by using following line
                 ParseFacebookUtils.initialize(context);
      • Copy the following code in the activty from where you want to login to facebook
      protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); ParseFacebookUtils.onActivityResult(requestCode, resultCode, data); }
      • Finally Copy the following code in the activity from where you want to login to facebook
      ParseFacebookUtils.logInWithReadPermissionsInBackground(Dashboard.this, null, new LogInCallback() { @Override public void done(ParseUser user, ParseException err) { if (user == null) { Log.d("MyApp", "Uh oh. The user cancelled the Facebook login."); } else if (user.isNew()) { Log.d("MyApp", "User signed up and logged in through Facebook!"); } else { Log.d("MyApp", "User logged in through Facebook!"); } }});


      Enjoy

      ChromeCast Sender  Android Application Tutorial (How to Create a chrome Cast application)



      Code Source -> Source
      Follwing Questions can be answerd in this tutorial

      How to get default cast player ID
      How to use Cast button on another place then top bar
      Easy to Use Cast


      Requirements

      Just need cast Companion library and place it in same directry as your project

      https://github.com/googlecast/CastCompanionLibrary-android

      Step1:
      Make a new android studio Project
      Open Settings File and place follwoing line of code in it

      include ':CastCompanionLibrary-android'
      project(':CastCompanionLibrary-android').projectDir = new File(rootDir, '../CastCompanionLibrary-android')

      Step 2:
      Open androidManifiest file and place following code inside it

      Permissions

          <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
          <uses-permission android:name="android.permission.INTERNET"/>

      CastCompanion Services and activities in manifiest
      -> Just chnage the name of parent in below code


              <receiver android:name="com.google.android.libraries.cast.companionlibrary.remotecontrol.VideoIntentReceiver" >
                  <intent-filter>
                      <action android:name="android.media.AUDIO_BECOMING_NOISY" />
                      <action android:name="android.intent.action.MEDIA_BUTTON" />
                      <action android:name="com.google.android.libraries.cast.companionlibrary.action.toggleplayback" />
                      <action android:name="com.google.android.libraries.cast.companionlibrary.action.stop" />
                  </intent-filter>
              </receiver>

              <service
                  android:name="com.google.android.libraries.cast.companionlibrary.notification.VideoCastNotificationService"
                  android:exported="false" >
                  <intent-filter>
                      <action android:name="com.google.android.libraries.cast.companionlibrary.action.toggleplayback" />
                      <action android:name="com.google.android.libraries.cast.companionlibrary.action.stop" />
                      <action android:name="com.google.android.libraries.cast.companionlibrary.action.notificationvisibility" />
                  </intent-filter>
              </service>

              <service android:name="com.google.android.libraries.cast.companionlibrary.cast.reconnection.ReconnectionService"/>


              <activity
                  android:name="com.google.android.libraries.cast.companionlibrary.cast.player.VideoCastControllerActivity"
                  android:label="@string/app_name"
                  android:launchMode="singleTask"
                  android:theme="@style/Theme.AppCompat.Light.NoActionBar"
                  android:parentActivityName="com.example.tahir.castapplication.CastActivity"
                  android:screenOrientation="portrait" >
                  <meta-data
                      android:name="android.support.PARENT_ACTIVITY"
                      android:value="com.example.tahir.castapplication.CastActivity" />

                  <intent-filter>
                      <onacti: androidname="android.intent.action.MAIN" />
                  </intent-filter>
              </activity>


      Step 3:
      Create a new class and Extends it to Application
      Paste followings lines in onCreate of Application Class

          public void onCreate() {
              super.onCreate();

              VideoCastManager.
                      initialize(this, CastMediaControlIntent.DEFAULT_MEDIA_RECEIVER_APPLICATION_ID, null, null).
                      setVolumeStep(0.5).
                      enableFeatures(VideoCastManager.FEATURE_NOTIFICATION |
                              VideoCastManager.FEATURE_LOCKSCREEN |
                              VideoCastManager.FEATURE_WIFI_RECONNECT |
                              VideoCastManager.FEATURE_CAPTIONS_PREFERENCE)
              ;

          }

      This is the line use to get Default media Player ID in Receiver

      CastMediaControlIntent.DEFAULT_MEDIA_RECEIVER_APPLICATION_ID




      Open Your Activity XML file and place following code for the button

      <android.support.v7.app.MediaRouteButton
              android:id="@+id/media_route_button"
              android:layout_width="wrap_content"
              android:layout_alignParentTop="true"
              android:background="@android:color/transparent"
              android:layout_height="wrap_content"
              android:mediaRouteTypes="user"

              />

      If you want to show button in Menu Bar , Paste follwing code in menu file

          <item
              android:id="@+id/media_route_menu_item"
              android:title="Cast"
              app:actionProviderClass="android.support.v7.app.MediaRouteActionProvider"
              app:showAsAction="always"/>



      Step4:
      Now open Activity class to register Cll backs


      onCreate
       mCastManager = VideoCastManager.getInstance();

              // -- Adding MiniController
              mMini = (MiniController) findViewById(R.id.miniController);
              mCastManager.addMiniController(mMini);
              mCastManager.addMediaRouterButton(mediaRoutebtn);
              mCastConsumer = new VideoCastConsumerImpl() {


                  @Override
                  public void onApplicationConnected(ApplicationMetadata appMetadata, String sessionId, boolean wasLaunched) {

                      Toast.makeText(CastActivity.this,"Successfully Connected to Receiver Application", Toast.LENGTH_LONG).show();
                      super.onApplicationConnected(appMetadata, sessionId, wasLaunched);
                  }

                  @Override
                  public void onFailed(int resourceId, int statusCode) {

                  }

                  @Override
                  public void onConnectionSuspended(int cause) {
                  }

                  @Override
                  public void onConnectivityRecovered() {

                  }

                  @Override
                  public void onCastDeviceDetected(final MediaRouter.RouteInfo info) {

                  }

                  @Override
                  public void onConnectionFailed(ConnectionResult result) {
                  }
              };

              mCastManager.reconnectSessionIfPossible(20);



      Line of code to add button on anywhere

              mCastManager.addMediaRouterButton(mediaRoutebtn);

      OnResume:
      protected void onResume() {
              super.onResume();

              mCastManager = VideoCastManager.getInstance();
              mCastManager.addVideoCastConsumer(mCastConsumer);
              mCastManager.incrementUiCounter();

          }

      OnPause


      protected void onPause() {

              mCastManager.decrementUiCounter();
              mCastManager.removeVideoCastConsumer(mCastConsumer);

              super.onPause();
          }

      onDestroy


       protected void onDestroy() {
              super.onDestroy();
              if (null != mCastManager) {
                  mMini.removeOnMiniControllerChangedListener(mCastManager);
                  if(mMini != null) {
                      mCastManager.removeMiniController(mMini);
                  }
              }
          }


      Code to add button in onOptionItems

          @Override
          public boolean onCreateOptionsMenu(Menu menu) {
              // Inflate the menu; this adds items to the action bar if it is present.
              getMenuInflater().inflate(R.menu.menu_cast, menu);
              mediaRouteMenuItem = mCastManager.
                      addMediaRouterButton(menu, R.id.media_route_menu_item);
              return true;
          }

      Now you need to have a function which will start casting any mp4 on you device

          private void startCast(){
              MediaMetadata mediaMetadata = new MediaMetadata( MediaMetadata.MEDIA_TYPE_MOVIE );

              mediaMetadata.putString( MediaMetadata.KEY_TITLE, "Main Title");
              mediaMetadata.putString( MediaMetadata.KEY_SUBTITLE, "Sub Title");

                  mediaMetadata.addImage(new WebImage(Uri.parse(""))); // Cast Icon
                  mediaMetadata.addImage(new WebImage(Uri.parse(""))); // Wallper


              MediaInfo mediaInfo = new MediaInfo.Builder(urlField.getText().toString())
                      .setContentType("video/mp4") //for live -> "application/vnd.apple.mpegurl"
                      .setStreamType(MediaInfo.STREAM_TYPE_BUFFERED ) // Repplace for live -> MediaInfo.STREAM_TYPE_LIVE
                      .setMetadata(mediaMetadata)
                      .build();


              Bundle bundles = com.google.android.libraries.cast.companionlibrary.utils.Utils.mediaInfoToBundle(mediaInfo);



              mCastManager.startVideoCastControllerActivity(CastActivity.this,bundles,0,true);
          }



      If you have any Question let me know,
      Source is also attached with the tutorial    Code Source

      Game of Thrones: First four episodes of season five leaked




      The first four episodes of the highly anticipated fifth season of Game of Thrones have leaked online, sending fans into a frenzy


      Here is the link to torrent files

      http://extratorrent.cc/category/8/TV+Torrents.html

      SuperSU app stuck on KNOX Disabling (Samsung galaxy models KNOX problem)


      So here is the simple solution to disable KNOX in samsung phones

      Step 1:
      Download Terminal Emulator android from google play store
      Step 2:
      Give it root access by writing su in command
      Step 3:
      Open Emulator Terminal application and write following command

      1->   su2->   pm disable com.sec.knox.seandroid


      Cheers' Now.
      Now SuperSu will perfectly ok