Showing posts with label Mobile. Show all posts
Showing posts with label Mobile. Show all posts

Thursday, March 8, 2018

Part 51 - Send OTP ( One Time Password ) to any mobile number in Asp.net MVC



In this video you will be able to know how to send OTP ( One time password) to any mobile number.  You need to follow below steps

1. Visit  TextLocal  official website and Register yourself
2. Generate API Key as show in video

3. Use your API key in C# MVC to send OTP via textlocal API 

Please copy below codes after generating API key.

# View Page (Index.cshtml)
Right click on your controller' s Index method and add a view. After adding view, replace content with below code. 

@model MVCTutorial.Models.EmployeeViewModel
@{
    ViewBag.Title = "Index";
    // Layout = null;
}

        <div class="well">
           
            <a href="#" class="btn btn-success" onclick="SendOTP()">Send OTP</a>

        </div>

<script>


    var SendOTP = function () {
        
        $.ajax({
            url: "/Test/SendOTP",
            type: "post",
            success: function (data) {
                if (data == "success") {
                    
                    alert("OTP sent successfully");
                    window.location = "/Test/EnterOTP";
                }
                else {
                    alert("failed");
                }
            }


        })

    }

</script>




# Controller Code (TestController.cs)
Create a Test controller and copy below code into this. 

using ASPSnippets.SmsAPI;
using MVCTutorial.Models;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Configuration;
using System.IO;
using System.Linq;
using System.Net;
using System.Web;
using System.Web.Mvc;

namespace MVCTutorial.Controllers
{
    public class TestController : Controller
    {
        public ActionResult Index()
        {         

            return View();
        }

      
        public JsonResult SendOTP()
        {
            int otpValue = new Random().Next(100000, 999999);
            var status = "";
            try
            {
                string recipient =  ConfigurationManager.AppSettings["RecipientNumber"].ToString();
                string APIKey = ConfigurationManager.AppSettings["APIKey"].ToString();

                string message = "Your OTP Number is " + otpValue + " ( Sent By : Technotips-Ashish )";
                String encodedMessage = HttpUtility.UrlEncode(message);

                using (var webClient = new WebClient())
                {
                    byte[] response = webClient.UploadValues("https://api.textlocal.in/send/", new NameValueCollection(){
                                        
                                         {"apikey" , APIKey},
                                         {"numbers" , recipient},
                                         {"message" , encodedMessage},
                                         {"sender" , "TXTLCL"}});

                    string result = System.Text.Encoding.UTF8.GetString(response);

                    var jsonObject = JObject.Parse(result);

                    status = jsonObject["status"].ToString();

                    Session["CurrentOTP"] = otpValue;
                }


                return Json(status, JsonRequestBehavior.AllowGet);


            }
            catch (Exception e)
            {

                throw (e);

            }

        }

        public ActionResult EnterOTP()
        {
            return View();
        }
        
        [HttpPost]
        public JsonResult VerifyOTP(string otp)
        {
            bool result = false;

            string sessionOTP = Session["CurrentOTP"].ToString();

            if (otp == sessionOTP)
            {
                result = true;

            }

            return Json(result, JsonRequestBehavior.AllowGet);
        }

    }
}




#Web.Config file
Add two keys into your web.config file . In first key, Enter Your API key generated by textlocal.com website . In second key, Enter your mobile number as recipient  with country code. example: 919234567895 . You can get mobile number either from database or from the textbox in which user enter his mobile number.


  <add key="APIKey" value="Enter your API key here" />
  <add key="RecipientNumber" value="91XXXXXXXXXX" />
  



All Code Factory


Monday, September 19, 2016

Jio barcode is stollen but sim not activated

If your barcode is redeemed and you got your jio sim in hand then you dont need to be worried about. It will take some time to activate.
Or if your barcode showing redeemed and you did not get any sim then its a big problem .Anyone can get jio sim with your barcode but he won't be able to avail jio unlimited 4g plan .
If ur sim not started then you should complain to customer care .Dont worry if customer care not picking up your call ..keep trying calling at 18008899999 (wait minimum 10mins at night ),he'll definitely get to you.

Tuesday, September 13, 2016

Jio Scam ! How jio store staffs blacking Jio SIM at 500rs


Now the scenario is that people start making queue from the morning 7am .Around  100 people get collected there hoping that they will definitely get jio sim but when jio staff cames He says the sim are not available.After forcing by people he is agreed to give only 30sim .This is as usual scenario.
This is not the end ...
Recently Reliance jio has started the scheme, those who are holding Adhar card  they will get a quick activation by using biometric verification process.
Now what jio staffs do generally?
They provide token to all 30 people and keep there contact no.in a notepad and tell people to come after they called .Unfortunately people dont get any calls. Then they are supposed to visit at night after 7pm. When frustrated people visit store then again they have to make queue for getting sim .
After activating 2 to 3 sim  jio staffs finally say , the biometric machine is not responding please come on next day .
When staffs do blacking of jio SIM ?
At around 8pm you will find a guy outside the store asking the tired people secretly, do you really want to get Jio Sim ? I will provide you an activated sim at 500rs only .No need to wait for 15days for activation.That guy is indirectly  connected jio store staffs. The jio staffs has already sent a guy on different location with biometric machine who will activate the sim by taking 500rs .And here on the store they say the machine is not working.
Moreover they are rejecting the forms by doing  some mistakes at their own.
No more jio sim is available for free.

Friday, September 9, 2016

Jio sim not activated problem -Solution

Fix Jio sim Activation time – Too much delay
Jio was to launch 4G service after Dec 31st, 2016 but due to pressure from Telecom Regulatory & incumbents companies, Jio is all set to launch service from Sept 5 but testing phase as well as Preview Offer aka Welcome Offer will continue till Dec 31st.
This desperate launch generates huge loads in system due to huge number of new Jio connections coming to system every new day.
Jio is making too much delay in new Sim activation. We are getting comments on issue:
Comment 1: From Priyanka,
Sir mai priyanka patna mishrouli
Hata kushinagar up mob.no.700770xxxx date26.8.16 se 5.9.16 tak activate nahi huaa.jio offer code.5557024956x hai.aadhar no.xxxx1359xxxx.hai.Sir generate code use bata raha hai..Sir no.chaalu karane ji0 kripa karey
Comment 2:  From Vivek Kumar,
Company wale jab number chalu nahi kar pa rahi hai free kr naam par paisa kam kar kab bhagegi 12 din me number nahi chalu kar paya 7007655xxx
Comment 3: From Kulwinder,
I have purchased Jio sim on 22 Aug but till date I have nor received any activation Sms but mobile network is appearing what should I do………..help me
These are clear sign of frustration over Jio and Sim activation. We have comments customers saying Sim activation failed after document loss !
Jio to launch Adhar based eKYC in 15 minutes in next few days.
Jio should immediately launch Adhar based Sim activation (eKYC) from day one of launch to avoid further delay in Jio sim activation after Sept 5 otherwise Jio is going to face more issues in upcoming days.
Telecom customers are already frustrated over meaning of ‘Unlimited’ for last couple of years – The last Hope Jio is seems taking same strategy towards customers – Jio 4G plans already proved that.
Jio is taking more than 10 days to activate new 4G sim where company clearly mentioned that Sim activation becomes instant & hassle-free.
We also check few stores and found Store guys are not up to mark for Jio service : Jio should immediately increase Experts or CAF activation machine so that multiple Sim activation become smoother and customers can keep the smile.
How to fix Jio sim Activation time
Jio sim will be available to supported mobiles after Sept 5.
#1: Wait for eKYC based Sim activation: If you didn’t get sim then please ask store if eKYC based Sim activation is available. If not, then wait few more days at least 5 days, until eKYC comes to your nearest Jio Store.
#2: Got Jio Sim and Order SMS: Follow this: For data activation, you need to dial 1977 from VoLTE enable phone or dial 1800-890-1977 from alternate number then enter last 4 digits of documents submitted  – Once done -> For voice service activation, Call 1977 again from VoLTE enable phone or use JioJoin app and enter last 4 digits again – you will get confirmation SMS instantly.
#3: Got Jio Sim but No SMS : Nothing to do in this case except call back to Jio Store: Visit Reliance store from where you got sim and ask them to activate service.
#4: Jio Sim activated but 2GB data limit: If this happens for your sim check solution here: Jio offers 2GB 4G data, 100 Mins call & 100 SMS
#5: Got Blank Jio Sim in Blue packet: Few issues reported that users are getting blank Jio sim in blue packet and Sim number is given later to customers. Wait until you get number & Order SMS then follow ‘Fix 1’.
#6: Got Signal in Jio Sim but no SMS: Order SMS for your Jio sim is probably pending – Please check for SMS and, also try ‘Fix 1’ to activate service.
# 7: No Jio Network – Emergency Calls only : Your Jio Sim activation status is pending, Once you get ‘Ord
Keep calm you will definitely get successful activation.

Friday, August 19, 2016

Resolve battery drainage problem after Marshmallow update on android device.

☞If you have problems with your Android device including the dreaded Black Screen of Death you may be told to WIPE THE CACHE PARTITION.  On a Samsung Galaxy A8 or S6, you can do this by:
1.Powering off the device
2.Press the VOLUME UP + HOME  + POWER buttons all the same time and HOLD THEM DOWN
3.Release only the POWER button when the device vibrates
4.Release the other buttons when the ANDROID SYSTEM RECOVERY screen appears
5.Using the VOLUME DOWN / UP buttons to navigate, select WIPE CACHE PARTITION
6.Press the POWER button, which will act the ENTER key on your keyboard
7.You will likely see some progress notes (at the bottom of the screen in small print) and after about 20 seconds it will likely show DONE
8.You can then reboot the device and see if your problems are fixed
On some Android devices you can clear the cache through the typical user interface:
☞SETTINGS
☞APP MANAGER
☞LAUNCHER
☞CLEAR DATA, CLEAR CACHE
You may ask yourself, what does clearing the cache on my cell/tablet actually do? 
♯The cache partition contains most of the temporary files, logs and remembered bits from the various applications on your Android device.  They can also be left over files from before your last Android update.  If that happens your device could be trying to use stored files that are not meant for your current version of Android.  Think of it the same way you think of your browser cache.  Just like a browser cache, sometimes those stored bits cause more problem than they solve and so it is a good idea to delete the cache periodically.
♯Wiping the cache will NOT delete your apps or your data or your configuration.  It will simply delete the temporary junk.
This can resolve MANY problems:
✔Black Screen of Death (BSoD)
✔Slow performance of apps
✔Lag in the User Interface
✔Apparently random errors and failures
On a related note, there main cache should not be confused with the DALVIK CACHE.
♯When your phone starts up, the Dalvik Virtual Machine looks at all your APPS and frameworks, and creates a tree of dependencies which is stored in the dalvik-cache. This allows applications to run in an optimised state (and explains why your phone takes longer to boot up after applying a new rom, it’s rebuilding the cache.)
♯the /data/dalvik-cache directory that can be found on typical Android devices. When you install an application on Android, it performs some modifications and optimizations on that application’s dex file (the file that contains all the dalvik bytecode for the application). It then caches the resulting odex (optimized dex) file in the /data/dalvik-cache directory, so that it doesn’t have to perform the optimization process every time it loads an application.
CREDIT: www.ddsystems.com.au/other/android-2/android/
♯Deleting the DALVIK CACHE will slow your Android devices boot up and application speed; this is not good.
♯If you are wondering about the CACHE partition, wonder no more:
♯/cache partition is mostly for saving the downloads from Google Play Store, found in /cache/downloads. It also can hold the recovery log found in /cache/recovery called last_log as well (this holds any errors and/or diagnostics from the recovery binary a la CWM or stock, which will get logged in the file to aid debugging and development of the recovery binary).
♯There is also another directory in there called lost+found which holds any recovered files (if any) as a result of file-system corruption, such as incorrectly removing the SDcard without un-mounting it.
So really, there is no loss of data from clearing it.
In fact, upon Android boot-up, the script will clear out the /cache/downloads to make way for any new downloads/updates from Google Play Store.
CREDIT: forums.androidcentral.com/droid-razr/343560-what-exactly-wipe-cache-partition.html
☞Take note that because the CACHE PARTITION is just that, a separate partition, you will not see your FREE SPACE increase after you delete the content.
I hope this helps resolve your problems, but if not you may find techrez.com/fix-samsung-galaxy-s6-black-screen/ and gadgetguideonline.com/galaxys6/samsung-galaxy-s6-guides/how-to-boot-into-galaxy-s6-recovery-mode/ helpful .
Thanks..

Friday, April 29, 2016

How use free wifi ? 100% guaranteed


There are several routers that has default userId and Password


1.Binatone

step 1. Open wifi setting.click on add wifi network
step 2. on network ssid name : binatone_1
step 3.select the wifi security : wpa/wpa2psk
step 4.Set password :0987654321step
 5.Save settings


2.Airtel

step 1. Open wifi setting.click on add wifi network
step 2. on network ssid name : Management
step 3.select the wifi security : wep
step 4.Set password :0987654321
step 5.Save settings


Try this when any network is available.
Thanks

Monday, April 4, 2016

Samsung Galaxy A8 Review

Samsung Galaxy A8 The powerful phone ever


Hi !
I am using this phone since 15th december 2015. For that date to till date I could not find single issue.This is the most powerful phone in the current market .If you u talk about its design then no phone can beat this .Coming to battery backup ,Whenever I go out of station I used to recharge it at 9AM morning  and the battery ends on next day at 12 o'clock .Its ultra power saving mode keep it live for 2days .










The features that user must know are :
1.Nice gallery UI
2.You can download any game and run on it ,the phone will never hang.
3.Almost every video format supported .No need to convert to specified format.(FHD)
4.Camera is mind blowing .It has voice sensor to help you to shoot your video or take Pictures.(keep your  phone on table and say Chees,Shoot,Record Video etc).It will server your voice command.
5. 2 GB RAM is enough to manage it all application to run it smoothly .
6. 32 GB Memory is enough to keep movies and videos.No need to insert SDCard.
7.Touch is awesome.
8.There are many best app available for this phone to make it Queen
9.Its earphone can manage you call and music play in a smart way.(The single button right below the volume keys of earphone can be used for multi purpose.Some function are following.
 a.single click to play and pause,
 b. double click to play next song
 c. three click to play prev song
 )