Pages

May 1, 2014

Solution - Mail could not be sent to the admin user. Vtiger CRM Outgoing Server Problem

Solution to the Error message in Vtiger CRM

"Mail could not be sent to the admin user. Please check the admin emailid/Server settings - Vtiger CRM"

Solution : specify tls or ssl along with smtp server and port

Server Name : tls://smtp.live.com:587
User Name : user@yourdomain.com
Password : *********
From Email : user@yourdomain.com
Requires Authentication : Yes

April 27, 2014

[Solution] Twitter oauth.signpost.exception.OAuthCommunicationException: Service provider responded in error: 403 (Forbidden)

I was searching solution for the error,
"oauth.signpost.exception.OAuthCommunicationException: Communication with the service provider failed: Service provider responded in error: 403 (Forbidden)" in android social sharing app that require twitter login. Finally found the problem with oauth urls.

Here's how to solve it.

Change,
public static final String REQUEST_URL = "http://api.twitter.com/oauth/request_token";
public static final String ACCESS_URL = "http://api.twitter.com/oauth/access_token";
public static final String AUTHORIZE_URL = "http://api.twitter.com/oauth/authorize
 To
public static final String REQUEST_URL = "https://api.twitter.com/oauth/request_token";
public static final String ACCESS_URL = "https://api.twitter.com/oauth/access_token";
public static final String AUTHORIZE_URL = "https://api.twitter.com/oauth/authorize";
Summary : change http to https and error got fixed.
Hope this helps! 

April 26, 2014

Essential Webmaster Tools to Setup After Launching Your New Website


Google Analytics

  • Track Pageviews
  • Track Events
  • Realtime Visitors
  • Keywords
  • Outbound Clicks
  • Measurable (Send Enquiry, Get Quote)

Google Webmaster Tool

  • Crawling
  • Submit Sitemap
  • Search Queries (Position, Keywords, CTR, Impression)
  • Crawling Errors
  • Robots.txt
  • Inbound Links

Bing Webmaster Tool

  • For Yahoo & Bing

A/B Testing Analytics

OR
  • Test headlines
  • Call to Action Button/Text
  • Links
  • Testimonials

[Solution] UTF-8 Gujarati Langauge Text Display Problem in Android

Gujarati Text (in UTF-8) in your JSON Response : ભારત - સર્વ શ્રેષ્ટ દેશ છે.

Steps to set it correctly in Android Textview:

  1. Copy Gujarati font in assest project directory
  2. Apply Gujarati font to textview, follow this steps.
  3. textView.setText(Html.fromHtml("YOUR UTF-8 Gujarati String HERE"));
This simple steps will display your all UTF-8 language text in android. Follow same steps for Punjabi, Tamil, Kannad, Bengali, Marathi language. 

Hope this helps!

April 16, 2014

Android Custom Crash Reporting Dialog & Reporting Data


MainApplication
package com.yourpkg;

import android.app.Application;
import android.content.Intent;
import android.util.Log;

public class MainApplication extends Application {

    @Override
    public void onCreate() {
        super.onCreate();
        Thread.setDefaultUncaughtExceptionHandler(new TopExceptionHandler(this));
    }

    public class TopExceptionHandler implements Thread.UncaughtExceptionHandler {

        private Application app = null;
        
        public TopExceptionHandler(Application app) {
            Thread.setDefaultUncaughtExceptionHandler(this);
            this.app = app;
        }

        public void uncaughtException(Thread t, Throwable e) {
            
            Log.v("tagas","uncaught exception ");
            
            StackTraceElement[] arr = e.getStackTrace();
            String report = e.toString() + "\n\n";
            report += "--------- Stack trace ---------\n\n";
            for (int i = 0; i < arr.length; i++) {
                report += "    " + arr[i].toString() + "\n";
            }
            report += "-------------------------------\n\n";

            // If the exception was thrown in a background thread inside
            // AsyncTask, then the actual exception can be found with getCause
            report += "--------- Cause ---------\n\n";
            Throwable cause = e.getCause();
            if (cause != null) {
                report += cause.toString() + "\n\n";
                arr = cause.getStackTrace();
                for (int i = 0; i < arr.length; i++) {
                    report += "    " + arr[i].toString() + "\n";
                }
            }
            report += "-------------------------------\n\n";

            final String reportText=report;

            Log.d("atag","report["+report+"]");

            notifyDialog(reportText);
            android.os.Process.killProcess(android.os.Process.myPid());
            System.exit(1);
           
        }
        
        void notifyDialog(String reportText) {
            try {
                Log.d("atg", "Creating Dialog for " + reportText);
                Intent dialogIntent = new Intent(app.getApplicationContext(), CrashReportDialog.class);
                dialogIntent.putExtra("CRASH_LOG", reportText);
                dialogIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                app.getApplicationContext().startActivity(dialogIntent);
                
                
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    }

}


CrashReportDialog

package com.example.exceptionhandlr;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

public class CrashReportDialog extends Activity implements OnClickListener {

    String VersionName;
    String PackageName;
    String FilePath;
    String PhoneModel;
    String AndroidVersion;
    String Board;
    String Brand;
    String Device;
    String Display;
    String FingerPrint;
    String Host;
    String ID;
    String Manufacturer;
    String Model;
    String Product;
    String Tags;
    long Time;
    String Type;
    String User;
    
    Context mContext;
    String crashLog="TEXT";
    private Button buttonSubmitReport;
    private Button buttonSubmitCancle;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        
        setContentView(R.layout.crashreport_activity);

        mContext = this;

        if (getIntent().getStringExtra("CRASH_LOG") != null) {
            crashLog = getIntent().getStringExtra("CRASH_LOG");
        }
        // showDialog(text);
        crashLog += CreateInformationString();

        ((TextView) findViewById(R.id.text1)).setText(crashLog);
        buttonSubmitReport = (Button) findViewById(R.id.buttonSumbmitReport);
        buttonSubmitCancle = (Button) findViewById(R.id.buttonCancleReport);
        buttonSubmitReport.setOnClickListener(this);
        buttonSubmitCancle.setOnClickListener(this);

    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
        case R.id.buttonSumbmitReport:
            sendEmailErrorReport(crashLog);
            break;

        case R.id.buttonCancleReport:
            restartApp();
            break;

        default:
            break;
        }
    }

    public void sendEmailErrorReport(String bodyContent) {

        final Intent emailIntent = new Intent(
                android.content.Intent.ACTION_SEND);

        // open with email supported apps
        emailIntent.setType("message/rfc822");

        // support mail from string.xml
        emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL,
                new String[] { getString(R.string.support_email) });

        // AppName + Subject text from string.xml
        emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT,
                getString(R.string.app_name)+getString(R.string.support_crash_subj));

        // Inital body text from string.xml + crash log 
        emailIntent.putExtra(android.content.Intent.EXTRA_TEXT,
                getString(R.string.support_crash_body) + bodyContent);

        finish();
        
        startActivity(Intent.createChooser(emailIntent, "Send Report"));

        // restart app
        // restartApp();
        
    }

    public void restartApp() {
        Intent i = getBaseContext().getPackageManager()
                .getLaunchIntentForPackage(getBaseContext().getPackageName());
        i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
        
        finish();
        startActivity(i);
    }
    

    void RecoltInformations(Context context) {
        try {
            PackageManager pm = context.getPackageManager();
            PackageInfo pi;
            // Version
            pi = pm.getPackageInfo(context.getPackageName(), 0);
            VersionName = pi.versionName;
            // Package name
            PackageName = pi.packageName;
            // Device model
            PhoneModel = android.os.Build.MODEL;
            // Android version
            AndroidVersion = android.os.Build.VERSION.RELEASE;

            Board = android.os.Build.BOARD;
            Brand = android.os.Build.BRAND;
            Device = android.os.Build.DEVICE;
            Display = android.os.Build.DISPLAY;
            FingerPrint = android.os.Build.FINGERPRINT;
            Host = android.os.Build.HOST;
            ID = android.os.Build.ID;
            Model = android.os.Build.MODEL;
            Product = android.os.Build.PRODUCT;
            Tags = android.os.Build.TAGS;
            Time = android.os.Build.TIME;
            Type = android.os.Build.TYPE;
            User = android.os.Build.USER;

        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public String CreateInformationString() {
        RecoltInformations(mContext);

        String ReturnVal = "";
        ReturnVal += "Version : " + VersionName;
        ReturnVal += "\n";
        ReturnVal += "Package : " + PackageName;
        ReturnVal += "\n";
        ReturnVal += "FilePath : " + FilePath;
        ReturnVal += "\n";
        ReturnVal += "Phone Model" + PhoneModel;
        ReturnVal += "\n";
        ReturnVal += "Android Version : " + AndroidVersion;
        ReturnVal += "\n";
        ReturnVal += "Board : " + Board;
        ReturnVal += "\n";
        ReturnVal += "Brand : " + Brand;
        ReturnVal += "\n";
        ReturnVal += "Device : " + Device;
        ReturnVal += "\n";
        ReturnVal += "Display : " + Display;
        ReturnVal += "\n";
        ReturnVal += "Finger Print : " + FingerPrint;
        ReturnVal += "\n";
        ReturnVal += "Host : " + Host;
        ReturnVal += "\n";
        ReturnVal += "ID : " + ID;
        ReturnVal += "\n";
        ReturnVal += "Model : " + Model;
        ReturnVal += "\n";
        ReturnVal += "Product : " + Product;
        ReturnVal += "\n";
        ReturnVal += "Tags : " + Tags;
        ReturnVal += "\n";
        ReturnVal += "Time : " + Time;
        ReturnVal += "\n";
        ReturnVal += "Type : " + Type;
        ReturnVal += "\n";
        ReturnVal += "User : " + User;
        ReturnVal += "\n";
        // ReturnVal += "Total Internal memory : " +
        // getTotalInternalMemorySize();
        // ReturnVal += "\n";
        // ReturnVal += "Available Internal memory : "
        // + getAvailableInternalMemorySize();
        ReturnVal += "\n";

        return ReturnVal;
    }

}


MainActivity

package com.example.exceptionhandlr;

import android.os.Bundle;
import android.app.Activity;
import android.view.View;
import android.view.View.OnClickListener;

public class MainActivity extends Activity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main_activity);
        
        findViewById(R.id.buttonCreateCrash).setOnClickListener(new OnClickListener() {
            
            @Override
            public void onClick(View v) {

                // DIVIDE by ZERO Error
                // THIS LINE CAUSE EXCEPTION
                int i=55/0;
            }
        });
        
    }
}

April 11, 2014

Why Web Based Software As A Service is Getting Popularity These Days?

Software As A Service (SAAS ) is now-a-days becoming too much viral in the software industry as it is very convenient to vendors as well as users. Many of us is not knowing what is software as a service, How it works and How it can benefit us in our work ? At SoftwareSuggest, we often get these questions from our users.

Software as a service is nothing but the software delivery method which provides access to the software and all its functionalities from anywhere and on any device remotely. Software as a Service allows organizations to access and manage their data at low costs than buying a licensed software as SAAS is mostly based on a monthly subscriptions. As software is hosted remotely, organizations don't have any additional expenses on hardware like servers. Software as a service makes organizations free from setting up and installation of software, backing up data and maintenance costs and problems of hardware.

In Software as a service, software and its associated data is hosted on the cloud than it is accessed by users using thin client via web browser on any device. Below are common reasons why web based software as a service is getting popular these days and why organizations should switch to SAAS -

  • Fast setup and installation
  • Non-Technical Configuration
  • Little IT involvement.
  • Integrated MDM Support
  • Upgrades included.
  • Frequent New Features.
  • No Hardware Costs.
  • Subscription Billing.

March 20, 2014

SoftwareSuggest.com‏ - Find Best Software For Business in India, Made In India Softwares

What is Software Suggest?

Software Suggest is a free service that helps Indian business, companies, organization, professionals and individuals find the best software solution for their business.

What can Software Suggest do for me?

In its Browse Software segment, Software Suggest provides a wide list of option for various business function like Accounting, Human Resource Management etc, and for various industry starting from Agriculture to Pharmaceuticals, so Indian business owner can select the best software fit for their business.
You can start browsing the available software options by clicking here.

However, if the user is still not sure as to which software shall be fitting his requirement best, he/she can contact our software expert who will help him/her come down to 1-3 best matches. To connect to our expert click here.

Everyday hundreds of Business uses SoftwareSuggest to find right Accounting Software, HR Software, Payroll Software, CRM Software, Helpdesk Software, Pharmaceutical Software, Email Marketing Software in India. Primarily Software Suggest Lists Made In India Software Product.


July 25, 2012

Hello to Tumblr; 'The Thinking Logs'

Hello !

I have decided to switch main blogging to Tumblr platform.
Hence i moved onto tumblr blog 'The Thinking Logs' http://patel.piyush.co

Note: Some of the technical articles related to android, will be re-blogged here too!!

Why I love tumblr:

  • It lets me post Quotes! i love quotes, images, and text.
  • Beautiful themes
  • Awesome social media integration
  • Ubercool mobile clients, for iOS and Android, awesome mobile apps!
Say hello to, http://patel.piyush.co


June 1, 2012

Example : Android Network connectivity check

    /**
     * Checks Internet connectivity
     * @return
     */
    public boolean isNetworkAvailable() {
           Context context = getApplicationContext();
           ConnectivityManager connectivity = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
           if (connectivity == null) {
              Log.e(tag,"network not available");
           } else {
              NetworkInfo[] info = connectivity.getAllNetworkInfo();
              if (info != null) {
                 for (int i = 0; i < info.length; i++) {
                    if (info[i].getState() == NetworkInfo.State.CONNECTED) {
                       return true;
                    }
                 }
              }
           }
           return false;
        }
Permission:

Example : Android Menu/Selected snippet.

    final int MENU_ADD=0;
    final int MENU_DELETE=1;
    final int MENU_VIEW=2;
    
    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        super.onCreateOptionsMenu(menu);
        
        menu.add(0, MENU_ADD, 0, "Add").setIcon(R.drawable.ic_launcher);
        menu.add(0, MENU_DELETE, 0, "Delete");
        menu.add(0, MENU_VIEW, 0, "View");
        
        return true;
    }
    
    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        super.onOptionsItemSelected(item);
        
        switch (item.getItemId()) {
        case MENU_ADD:
            Log.v("menu","Add clicked");
            return true;
            
        case MENU_DELETE:
            Log.v("menu","View clicked");
            return true;
            
        case MENU_VIEW:
            Log.v("menu","View clicked");
            return true;
        default:
            break;
        }
        
        return true;
    }

May 31, 2012

Example: Shared Preference Getter/Setter


import android.content.Context;
import android.content.SharedPreferences;

public class Util {

 private static String tag="util";
 private static String KP_PREF="kp_pref";
 private SharedPreferences mSharedPref;
 
 public static int getIntValue(Context ctx,String key,int defval)
 {
  SharedPreferences pref = ctx.getSharedPreferences(KP_PREF,Context.MODE_PRIVATE);
  int usageCount = pref.getInt(key, defval);
  return usageCount;
 }
 
 public static void putIntValue(Context ctx,String key,int defval)
 {
  SharedPreferences pref = ctx.getSharedPreferences(KP_PREF,Context.MODE_PRIVATE);
  pref.edit().putInt(key,defval).commit();  
 }
 
}

November 24, 2011

JaxtrSMS - What's new ?

Most interesting news on web/media, Sabeer bhatia again brought awesome concept FREE SMS worldwide - sounds like revolutionary concept!

I like the idea of FREE and Open texting app, but Today there's hell lot of competition in instant messenger segment. we starts comparing it with messenger app!

November 21, 2011

JaxtrSMS - free sms worldwide

JaxtrSMS - a wordwide free SMS ! currently in beta, lets users send free SMS worldwide in easiest way. JaxtrSMS is gaining popularity across all mobile platforms, exponentially catching large number of userbase.

Download JaxtrSMS and start sending messages. JaxtrSMS links directlyto your address book so you can send messages to anyone whether they have JaxtrSMS or not. There is no limit to the number of messages you can send.


November 20, 2011

How to update galaxy phones to Gingerbread v2.3

After a long long time, Samsung finally made v2.3 Gingerbread available to whole set of galaxy phones through kies. last week i updated my i9003 [galaxy SL] and my friend's s5830 [galaxy ace].

September 16, 2011

Should have features for app


You might be done with your app idea implementation/development ? right

Before you get ready to publish it on Android Market check your app have essential features?
If not than its good to have, and will help you to get more downloads and feedback.

Good to have features:
  1. Feedback : put a menu option so that user can send you feedback of app using email, feature request, get in touch with user.
  2. Share the app : put a menu option to "Share app with friends", it will help you to get more downloads (in tern more revenues) and free mouth publicity.
  3. About : a short introduction about you/your app, email address to contact and website.
  4. Help: help pages or dialogue which explains basics of how to use app

My favorite Android apps (sept #12)


A small list of few best/cool apps of my Samsung android phone as on Sept,11

Blogger - helps making blogpost from android !

GetJar - alternative app store which gives premium android apps free

Paper Camera - nice paper drawing image effect

Private SMS Inbox - keeps sms private & protected !

Solo - play Guitar

Suruk - auto rickshaw fare

SwiftKey X - alternative Keyboard

Brilliant Quotes - collection of Quotes

Camera360 - beautiful effects on images

Catch - simple notes taking app

Dolphin Browser HD - best browser on android market !

Entrepreneur - get inspired

Expenses - simple yet awesome Expense tracking app

IndiCode - useful India codes like Number plates and Std codes etc.

JaxtrSMS(Beta) - send FREE sms Worldwide

Note Everything - sketch and note

Saavn - bollywood music streaming app

smsBlocker - block unwanted SMS

SpeedView - speedo meter app, elegent !

Which is your favourite app ?? leave a comment below