Android studio - Open the gallery, select images, capture a photo with camera

Introduction
This article explains how to open the gallery in your phone and display the selected images, capture a photo from the camera and save it to the gallery of your Android phone.

First the user will need to choose if he/she wants to select an image from the gallery or wants to capture an image from the camera. Then depending on the option chosen by the user,  we will either open the gallery or capture an image. 
Step 1:
Open "AndroidManifest.xml" and add the following code to it: 

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.chhavi.uploadingandviewimage"
    android:versionCode="1"
    android:versionName="1.0" >

  <uses-permission android:name="android.permission.CAMERA" />
  <uses-feature android:name="android.hardware.camera" />
  <uses-feature android:name="android.hardware.camera.autofocus" />
  <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

  <uses-sdk
      android:minSdkVersion="7"
      android:targetSdkVersion="16" />

  <application
      android:allowBackup="true"
      android:icon="@drawable/ic_launcher"
      android:label="@string/app_name"
      android:theme="@style/AppTheme" >
    <activity
        android:name="com.chhavi.uploadingandviewimage.MainActivity"
        android:label="@string/app_name" >
      <intent-filter>
        <action android:name="android.intent.action.MAIN" />

        <category android:name="android.intent.category.LAUNCHER" />
      </intent-filter>
    </activity>
  </application>
</manifest> 


Note the permission "WRITE_EXTERNAL_STORAGE" is to save the image captured to the gallery. "CAMERA" permissions enables use of the camera of your Android phone.
Step 2:
Open "activity_main" and add the following code to it:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
              xmlns:tools="http://schemas.android.com/tools"
              android:id="@+id/LinearLayout1"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:orientation="vertical"
              android:padding="10dp" >

  <LinearLayout
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:gravity="center"
          android:padding="5dp" >

    <Button
            android:id="@+id/btnSelectPhoto"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="Select Photo" />

  </LinearLayout>

  <LinearLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:orientation="vertical"
          android:padding="10dp" >

    <ImageView
            android:id="@+id/viewImage"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:src="@drawable/camera" />

  </LinearLayout>


</LinearLayout> 


Create APK in Eclipse



To put your android application on then market, you have to create an APK.
Once you have your APK, you have to suscribe to be an android developer
Then when you have an account you can upload your APK at https://market.android.com/publish



create an APK.




Open Eclipse IDE and go to File -> New -> Project -> Android -> Android Application Project. You have to specify the Application Name, the Project Name and the Package name in the appropriate text fields and then click Next.
 

extension duplicated after upgrade to 2.3.02

check old and new admin and catalog folder , check extra folder left from old version rename it


PHP error after updating from 2.2.0.0 to 2.3.02


the official Opencart v2.3.0.2 bug reports topic to report any issues from the core.


BUG: Error: Could not load model total!

Two-part bug. Part one: Event Compatibility cuts off too many parts of the route when trying to load the older extension format. ex. "extension/total/sub_total/getTotal" route gets turned into "total/sub_total" instead of "total/sub_total/getTotal". This causes it to try and load a model with no name throwing the exception. Part Two, this compatibility is being loaded fine when the route is "extension/total/subtotal" but is also loading when the route is "extension/total/sub_total/getTotal". I think this event should not be triggered for compatibility because it is a getTotal is a function call, not a model load. This causes the verification to fail and try to load the 2.2.x version which has other bits missing and throws different errors. Haven't figured out why the function call is going down the event path. But basically the attempt to support backwards compatibility with 2.2 mods is causing problems.

2 Solutions

FIX 1: Give up on 2.2.x compatibility and delete the following left-over folders: 
Code: Select all
    catalog/model/total
    catalog/model/payment
    catalog/controller/payment
    catalog/model/shipping
    catalog/controller/module
    admin/controller/total
    admin/controller/payment
    admin/controller/shipping
    admin/controller/module


FIX 2: Add a hack to bypass the event when the function call for "getTotal", "getMethod", or "getQuote" are passed in. This is experimental but should at least restore support for 2.2.x mods for now. This is NOT a permanent fix. Just a work around.
EDIT: catalog/controller/event/compatibility.php
FIND: 
Code: Select all
'model/' . $route. '.php'

REPLACE WITH:
Code: Select all
'model/' . ((strpos($route,'get') !== false) ? dirname($route) : $route) . '.php'

This should let routes like "extension/total/sub_total" work but block "extension/total/sub_total/getTotal" calls which fail on the directory check.



BUG: When enabled, fraud modules cause an error to be thrown during order completion, which can prevent the order from being fully completed. The error message thrown is: "Call to a member function check() on a non-object in /catalog/model/checkout/order.php"

How to Upgrade OpenCart Step by Step?

Step 1. Backup OpenCart

Basically you can download a copy of your OpenCart files from web server to your computer through FTP or your hosting control panel. Then export its database through phpMyAdmin or go to back up the database from OpenCart dashboard >> Tools >> Backup/Restore.

Step 2. Download latest version of OpenCart

Step 3. Upload new OpenCart version to server

When you have unzipped OpenCart installer on your computer, you should find a ‘upload’ folder. You need to upload all its files and subfolder from computer to your web hosting, except “upload/config.php” and “upload/admin/config.php“. In OpenCart 2.0.2.0, these two files seems can not be found. It does not matter which OpenCart version you are upgrading to, always double check to ensure these two files not to be uploaded

Step 4. Install OpenCart from web browser

Every new OpenCart installation will have an ‘install’ sub-folder in the OpenCart root directory. Now you need to launch the auto-installer from your web browser. Open a web browser on your PC or Mac, enter your OpenCart domain name in the address bar, add /install/ after your OpenCart site URL address, then press Enter key on your computer to initiate the OpenCart auto-installer. Since this is an OpenCart upgrade other than fresh install, only few steps required from now to complete the upgrade to new OpenCart version. 

Now you have finished upgrading OpenCart to the latest version! Oh, one last thing, don’t forget to delete your installation directory for website safety reason.



i337 (IMEI NULL)

if u get imei null after wrong firmware flash ex. i337, i337m, i9500, i9505, i434   all this is galaxy S4 but u can't mix firmware files , in fews case you can put i337 on i337m , you must keep modem version , other way you will get network problem , imei null, restarting problem

this problem is easy to fix just put right  and latest version 
check this post for firmware and odin flasher
but most of times is hardware problem

change or rehot the emmc chip


structuring your pages with Bootstrap


Grid system

Bootstrap includes a powerful mobile-first grid system for building layouts of all shapes and sizes. It’s based on a 12 column layout and has multiple tiers

How it works

At a high level, here’s how the grid system works:
  • There are three major components—containers, rows, and columns.
  • Containers—.container for fixed width or .container-fluid for full width—center your site’s contents and help align your grid content.
  • Rows are horizontal groups of columns that ensure your columns are lined up properly.
  • Content should be placed within columns, and only columns may be immediate children of rows.
  • Column classes indicate the number of columns you’d like to use out of the possible 12 per row. So if you want three equal-width columns, you’d use .col-sm-4.
  • Column widths are set in percentages, so they’re always fluid and sized relative to their parent element.
  • Columns have horizontal padding to create the gutters between individual columns.
  • There are five grid tiers, one for each responsive breakpoint: extra small, small, medium, large, and extra large.
  • Grid tiers are based on minimum widths, meaning they apply to that one tier and all those above it (e.g., .col-sm-4 applies to small, medium, large, and extra large devices).
  • You can use predefined grid classes or Sass mixins for more semantic markup.

Tutorial on How to Fix iPhone Red Screen

Fix Red Screen Of Death iPhone 5c / 5S


Perform a soft reboot/restart of your iPhone. Although it is unlikely you haven’t tried this, it is still worth mentioning. Many users claim that by doing a simple restart or a so-called soft reset, quite a few issues including freezing, crashing, auto reset, ring or vibrate fail, unresponsive keypad, not being able to make or receive calls and many other problems may be fixed by this action.
press and hold the Power and Home buttons until the Apple logo appears on the screen, then release it.
OR
Do a hard reset/restore of your iPhone with iTunes. If problem still continues after doing a soft reset, your next option is to do a hard reset or a so called iPhone factory restore. Please be advised that this method will definitely delete all the saved data on your phone, thus we strongly recommend before doing this, to create a backup on all of your saved data.
IF THIS BOTH RESET IS NOT WORKING THEN U HAVE HARDWARE PROBLEM, IF YOU ARE LUCKYIT CAN BE JUST LCD PROBLEM, CHANGE THE LCD WITH GOOD QUALITY ONE , OTHER WAY YOU HAVE DEFECTIVE MOTHERBOARD AND SPECIAL REPAIR IS NEEDED  

Nokia Unlocking Instructions

Nokia Unlocking Instructions

Important: Nokia phones allow ONLY three wrong attempt and phone will lock up. Kindly understand the instruction carefully before entering the code into the phone.
NOTE: If you receive an error message while performing the instructions below, STOP. Please be aware that if an excessive amount of incorrect attempts are made, the phone will be permanently locked. Verify the IMEI by pressing *#06# and submit a new request.
For Nokia Lumia 900 Unlocking Instructions:
  1. Switch ON your phone with a non acceptedsimcard
  2. Phone will ask you to Enter Unlock Pin
  3. Input the 8 digit Unlock Code

If code is Not working FOR LUMIA 900 ATT:
The workaround is this: Enter the incorrect code until you run out of your ten (10) attempts. Then you'll get the *real* network unlock message, with 32 attempts. Enter the same 8-digit code you've been entering,
http://www.youtube.com/watch?v=8SO5ZXQy1zM
For ROGERS, FIDO and ChatR:
Use +7 at the end first, if "Code Error" then try +1
For TELUS and BELL
Use +5 at the end first, if "Code Error" then try +1 or +7
For AT&T and T-Mobile USA:
  #PW+UNLOCKCODE+1# 
For UK Networks
Use +1 at the end first, if "Code Error" then try +7
Model:  For Most Nokia (Except Fido/Rogers and Model below)
  1. Insert an Authorized Sim Card and turn ON your phone. (Authorized Sim Card is the original carrier Sim Card that come with the phone)
  2. Press #
  3. Press * three times = P
  4. Press * four times = W
  5. Press * twice = +
  6. Enter the Unlock Code
  7. Press * twice = +
  8. Press 1, then # and the display should read "SIM Restriction Off"

Note: It should look similar to this: #pw+CODE+1#  (CODE is the Unlock Code we send you)
Model:  For Most Nokia for Fido/Rogers
  1. Insert an Authorized Sim Card and turn ON your phone. (authorizedSim Card is the original carrier Sim Card that come with the phone)
  2. Press #
  3. Press * three times = P
  4. Press * four times = W
  5. Press * twice = +
  6. Enter the Unlock Code
  7. Press * twice = +
  8. Press 7, then # and the display should read "SIM Restriction Off" IF "Code Error", use 1 instead of 7.

Note: It should look similar to this: #pw+CODE+7#  (CODE is the Unlock Code we send you) or #pw+CODE+1#
Model: T-Mobile Lumia 710
  1. Insert a T-Mobile Micro SIM Card
  2. Turn on the handset
  3. Click on Phone Button from the Home Page
  4. Next click on the Keyboard
  5. Enter in: ##782#
  6. Next Click the Call Button (a box will appear to enter the PIN for unlocking)
  7. Enter the 8 digit Unlock Code that was provided
  8. Click on the Enter Key (device should read "PIN Accepted")

Or
  1. Insert a Non T-Mobile Micro SIM Card.
  2. Turn on the handset. Note: the phone will display a message, "This SIM Card can only be used on specific networks. Contact you Customer Service Center for the Unlock Code. 10 attempts remaining."
  3. Enter the 8 digit Unlock Code that was provided.
  4. Click on the Enter Key (device should read "PIN Accepted").

Model: Nokia C3 
  1. Insert an Unauthorized Sim Card and turn ON your phone.
  2. Phone will display SIM is restricted
  3. Press OK to be able to enter the Unlock Code
  4. Type: #pw+CODE+1# and press OK (Rogers / Fido use #pw+CODE+7#)

Phone is unlocked!
Note: It should look similar to this: #pw+CODE+1# (CODE is the Unlock Code we send you)
**NOTE: For Nokia C3 ONLY, DO NOT use * , type #PW+ directly on the keypad and Replace CODE with the Unlock Code we send you.
Cable Instruction after 3 wrong attempt or Phone locked
If you are receiving "CANNOT UNDO RESTRICTION', " NOT ALLOWED", "PHONE RESTRICTIONS" message. This means your phone is hard-locked and you will have to use the following software:
Require the following:
  1. An Original USB Cable for your Nokia phone (Cannot be generic USB Cable). 
  2. The correct USB Cable Drivers.
  3. Installing the 'Nokia PC Suite' software that you can obtain from the Nokia website will install the appropriate USB Cable Drivers.  You can find it HERE
  4. A small software application that you can download from HERE.
  5. The Unlock Code from us.

Once you have all above requirement, follow these directions below:
  1. Switch on your phone without a SIM Card. You should be prompted to 'Start Phone Without SIM Card' or similar. Click 'Accept' or 'OK'. Your phone is now in offline mode. 
  2. Turn off all antivirus software on your computer.
  3. Connect your Nokia phone to the PC using the USB Cable. Your phone will display several options, PC Suite Mode', mass storage mode etc... stay in this screen, do not select any of the options.
  4. Start the SendCodeUsb application you downloaded earlier and click on the 'Read Phone Info' button. The application should display several lines of information. If it says "not found" replug your phone into the usb, and then click read phone info
  5. If the application still displays 'Not Found', your USB Cable Drivers are not correctly installed. In this case you will need to uninstall, then re-install the USB Cable Drivers. This procedure will not work unless the drivers are correctly installed. Trying an alternative USB Port may also help. DO NOT move on to the next step until you have successfully installed the USB Cable Drivers and the software can read the information from the phone. 
  6. Now make sure you check the 'Check For Fbus' checkbox. Also make sure the 'Level(1-7)' selection is set to the appropriate carrier. For Rogers and Fido use +7 or +1
    For all Telus devices use +5 or +1
    For all UK devices use +1 and +7
    For all T-Mobile USA devices use +1
    For all AT&T devices use +1
  7. Enter ONLY the numbers of the correct Unlock Code into the 'Unlock Code (15 digits)' field e.g. if your correct Unlock Code was #pw+123456789012345+1# you would enter only 123456789012345 in this field)
  8. Click on the 'Send Unlock Code' b