mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-29 08:34:37 +01:00
make it possible to build without knowing the GCM sender ID.
This commit is contained in:
parent
daf5a89a0e
commit
0bea58b128
3 changed files with 5 additions and 3 deletions
|
@ -61,6 +61,7 @@
|
|||
</exec>
|
||||
<exec dir="." executable="../scripts/gen_gcmid.sh"
|
||||
output="src/org/eehouse/android/xw4/GCMConsts.java"
|
||||
logError="true"
|
||||
/>
|
||||
<exec dir=".." executable="./scripts/genvers.sh" output="ant_out.txt">
|
||||
<arg value="XWords4"/>
|
||||
|
|
|
@ -74,7 +74,7 @@ public class GCMIntentService extends GCMBaseIntentService {
|
|||
public static void init( Application app )
|
||||
{
|
||||
int sdkVersion = Integer.valueOf( android.os.Build.VERSION.SDK );
|
||||
if ( 8 <= sdkVersion ) {
|
||||
if ( 8 <= sdkVersion && 0 < GCMConsts.SENDER_ID.length() ) {
|
||||
try {
|
||||
GCMRegistrar.checkDevice( app );
|
||||
// GCMRegistrar.checkManifest( app );
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e -u
|
||||
|
||||
if [ -z "$GCM_SENDER_ID" ]; then
|
||||
echo "GCM_SENDER_ID not in env"
|
||||
exit 1
|
||||
echo "GCM_SENDER_ID empty; GCM use will be disabled" >&2
|
||||
fi
|
||||
|
||||
cat <<EOF
|
||||
|
|
Loading…
Add table
Reference in a new issue