Here is a NeoGPS sketch I threw together for Pieter3, but never posted...
It's a non-blocking FSM implementation that:
* puts the A7 into GPS mode (2 states for GPS=1 and GPSRD=1),
* gets a location,
* cancels the GPS mode (2 states for GPSRD=0 and GPS=0),
* "sends" an SMS, and
* waits 5 seconds before doing it again.
Total cycle time is about 12 seconds. It just echoes the A7 response so you can see it, but you could also parse it to see if it says "OK".
#include <NMEAGPS.h>
#define A7board Serial1 // Best: Serial1 on a Mega, Leo or Due
// or
//#include <AltSoftSerial.h>
//AltSoftSerial A7board; Next best, but you must use pins 8 & 9! This is very efficient.
// or
//#include <NeoSWSerial.h>
//NeoSWSerial A7thinker( 10, 11 ); // 2nd best on whatever two pins you want. Almost as efficient.
NMEAGPS gps;
gps_fix fix;
// Finite-State Machine declarations
enum state_t
{
WAITING, // until time to check again
GPS_ON_WAIT, // after AT+GPS=1
GPS_READING, // after AT+GPSRD=1
GPS_READING_WAIT, // after location received, AT+GPSRD=0
GPS_OFF_WAIT, // after AT+GPS=0
SENDING_SMS
// other states?
};
state_t state = WAITING; // start here
uint32_t stateTime ; // used for timeouts, instead of delay
const uint32_t CHECK_LOCATION_TIME = 5000; // ms, how often to check
void echoA7chars()
{
if (A7board.available())
Serial.write( A7board.read() ); // just echo what we are receiving
}
void ignoreA7chars()
{
if (A7board.available())
A7board.read(); // ignore what we are receiving
}
void setup()
{
Serial.begin( 115200 );
A7board.begin( 9600 );
stateTime = millis();
}
void loop()
{
switch (state) {
case WAITING:
echoA7chars();
if (millis() - stateTime >= CHECK_LOCATION_TIME) {
// Turn GPS data on
A7board.println( F("AT+GPS=1") );
stateTime = millis();
state = GPS_ON_WAIT;
}
break;
case GPS_ON_WAIT:
echoA7chars();
// Wait for the GPS to turn on and acquire a fix
if (millis() - stateTime >= 5000) { // 5 seconds
// Request GPS data
A7board.println( F("AT+GPSRD=1") );
Serial.print( F("Waiting for GPS fix...") );
stateTime = millis();
state = GPS_READING;
}
break;
case GPS_READING:
while (gps.available( A7board )) { // parse the NMEA data
fix = gps.read(); // this structure now contains all the GPS fields
if (fix.valid.location) {
Serial.println();
// Now that we have a fix, turn GPS data off
A7board.println( F("AT+GPSRD=0") );
stateTime = millis();
state = GPS_READING_WAIT;
}
}
if (millis() - stateTime > 1000) {
Serial.print( '.' ); // still waiting for fix, print a dot.
stateTime = millis();
}
break;
case GPS_READING_WAIT:
ignoreA7chars();
// Wait for the GPS data to stop
if (millis() - stateTime >= 1000) {
// Turn GPS power off
A7board.println( F("AT+GPS=0") );
stateTime = millis();
state = GPS_OFF_WAIT;
}
break;
case GPS_OFF_WAIT:
ignoreA7chars();
// Wait for the GPS data to stop
if (millis() - stateTime >= 1000) {
// Show the location we will send via SMS
Serial.print( F("loc: ") );
Serial.print( fix.latitude(), 6 ); // use the latitude field of the fix structure
Serial.print( F(", ") );
Serial.println( fix.longitude(), 6 ); // use the longitude field of the fix structure
// GPS data stopped, now send SMS with location values ?
//A7board.print( SMS commands? );
//A7board.print( F("lat=") );
//A7board.print( fix.latitude(), 6 ); // use the latitude field of the fix structure
// ...
stateTime = millis();
state = SENDING_SMS;
}
break;
case SENDING_SMS:
echoA7chars();
if (millis() - stateTime >= 2000) {
stateTime = millis();
state = WAITING; // start over, or other states...
}
break;
// ... other states ...
}
}
You can test it with a regular GPS device on Serial1, but it will echo all the GPS characters to Serial. That's the extent of my testing. 
If you want to try it, NeoGPS is available from the Arduino IDE Library Manager, under the menu Sketch -> Include Library -> Manage Libraries.
Cheers,
/dev