Xtify, Google API key

grafsoft

Well-Known Member
Licensed User
Longtime User
Hi,

when I want to create an application key at Push Notifications for iOS (iPhone, iPad), Android, Windows and Mobile Web, they ask me for a Google API key.
When I go to developers.google.com and sign in, I do not find a way to get this.
Is the API key the same as "Google maps API key"? This does not sound logical.

The forums are full with questions line mine, but the answers point to an outdated page structure on Google. :(

Does anybody have more recent information?
Thank you
Peter
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
I'm not sure which API they mean. The license API is available in the developer console:
SS-2013-05-26_19.37.36.png
 
Upvote 0

grafsoft

Well-Known Member
Licensed User
Longtime User
Thank you!

I found an API key on Xtify.com, hope it is the right one.

I tried Nejoxtify.

Now I get "Could not read the APi key. No meta data found in the manifest file"

I added this to my Manifest text:

AddManifestText(<receiver android:name="com.nejo.android.xtify.NejoXtyreceiver">
<intent-filter android:priority="9999">
<action android:name="com.xtify.android.sdk.SHOW_NOTIFICATION" />
<!-- KEEP THE FORWARD SLASH IN FRONT OF THE APP KEY ON THE LINE BELOW -->
<data android:scheme="notif" android:host="notification.xtify.com"
android:pathPrefix="/a0ef38-d9-4d-9b03-156814817" />
</intent-filter>
</receiver>)

What am I doing wrong?
 
Upvote 0

grafsoft

Well-Known Member
Licensed User
Longtime User
Thanks a lot!

Now I have another problem:

At startservice I get an error pointing to Nejoxtyshowsettings.

I do not call any show settings. My code is below.

#Region Service Attributes
#StartAtBoot: False
#End Region

Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim xtify As NejoXty

End Sub
Sub Service_Create
xtify.initialize("xtify")
End Sub

Sub Service_Start (StartingIntent As Intent)

End Sub

Sub Service_Destroy

End Sub

Sub xtify_xtfymessagereceived(title As String, body As String)
Log("Message : " & title & " " & body)
ToastMessageShow(title & body,False)
' oder notification
End Sub
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Only this part of the log is relevant:
main_activity_create (B4A line: 123)
StartService (xty)
java.lang.ClassCastException: com.nejo.android.xtify.nejoXtyShowSettings
at anywheresoftware.b4a.keywords.Common.getComponentIntent(Common.java:732)
at anywheresoftware.b4a.keywords.Common.StartService(Common.java:688)
at Xtracard.Customer.main._activity_create(main.java:335)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:167)
at Xtracard.Customer.main.afterFirstLayout(main.java:85)
at Xtracard.Customer.main.access$100(main.java:16)
at Xtracard.Customer.main$WaitForLayout.run(main.java:72)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3687)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:842)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
at dalvik.system.NativeStart.main(Native Method)
java.lang.ClassCastException: com.nejo.android.xtify.nejoXtyShowSettings

What is the value of xty?
 
Upvote 0

grafsoft

Well-Known Member
Licensed User
Longtime User
Stupid me, thank you!

I have a variable xty and a service xti. I confused the writings.

The debugger comes correctly to this line

xtify.initialize("xtify")

and when I press F9 the program simply stops.

I simply copied it from
http://www.b4x.com/forum/additional...tes/10558-xtify-library-v1-0-a.html#post58765

But the troubles do not stop:

Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim xtify As NejoXty

End Sub
Sub Service_Create

xtify.initialize("xtify")
End Sub
 
Upvote 0

grafsoft

Well-Known Member
Licensed User
Longtime User
Sorry, I typed too fast and the lines got confused.

The trouble is only that the program stops at this line:

xtify.initialize("xtify")

The phone says the app was closed unexpectedly.
 

Attachments

  • log2.zip
    32.9 KB · Views: 211
Upvote 0

grafsoft

Well-Known Member
Licensed User
Longtime User
Hi,

you are right.

Caused by: com.xtify.android.sdk.InvalidFormatException: Could not read the api key. No meta data found in the manifest file.
at com.xtify.android.sdk.PersistentLocationManager.a(Unknown Source)
at com.xtify.android.sdk.PersistentLocationManager.c(Unknown Source)
at com.xtify.android.sdk.PersistentLocationManager.a(Unknown Source)
at com.xtify.android.sdk.PersistentLocationManager.<init>(Unknown Source)
at com.nejo.android.xtify.nejoXTIFY.initialize(nejoXTIFY.java:27)
at Xtracard.Customer.xti._service_create(xti.java:102)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:167)
... 13 more


The manifest editor says:

AddApplicationText (<receiver android:name="com.nejo.android.xtify.NejoXtyreceiver">
<intent-filter android:priority="9999">
<action android:name="com.xtify.android.sdk.SHOW_NOTIFICATION" />
<!-- KEEP THE FORWARD SLASH IN FRONT OF THE APP KEY ON THE LINE BELOW -->
<data android:scheme="notif" android:host="notification.xtify.com"
android:pathPrefix="/a0ef3978-dcb9-424d-9b03-1567f5814817" />
</intent-filter>
</receiver>)

The AndroidManifest.xml.

<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="Xtracard.Customer"
android:versionCode="1"
android:versionName=""
android:installLocation="internalOnly">

<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="14"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
<application
android:icon="@drawable/icon"
android:label="Xtra.Card">

<receiver android:name="com.nejo.android.xtify.NejoXtyreceiver">
<intent-filter android:priority="9999">
<action android:name="com.xtify.android.sdk.SHOW_NOTIFICATION" />
<!-- KEEP THE FORWARD SLASH IN FRONT OF THE APP KEY ON THE LINE BELOW -->
<data android:scheme="notif" android:host="notification.xtify.com"
android:pathPrefix="/a0ef3978-dcb9-424d-9b03-1567f5814817" />
</intent-filter>
</receiver>
<activity
android:windowSoftInputMode="stateHidden"
android:launchMode="singleTop"
android:name=".main"
android:label="Xtra.Card"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>

</activity>
<service android:name=".httputils2service">
</service>
<receiver android:name=".httputils2service$httputils2service_BR">
</receiver>
<service android:name=".xti">
</service>
<receiver android:name=".xti$xti_BR">
</receiver>
</application>
</manifest>

Thanks again in advance
 
Upvote 0

grafsoft

Well-Known Member
Licensed User
Longtime User
I got this anser on Stackoverflow:
It looks like you're using an old/unsupported version of the Xtify SDK.
Xtify support said the same:
This looks like you're using one of our older unsupported SDKs. Are you not using our GCM/Android SDK?
I think I am helpless here :(
 
Upvote 0

grafsoft

Well-Known Member
Licensed User
Longtime User
Thank you!

I am trying out the Android example. Hut whatever I enter before I click "resister" I get "Invalid_sender".
 
Upvote 0

grafsoft

Well-Known Member
Licensed User
Longtime User
btw, I set the sender_id in Process_globals.

My phone acts funny. In addition to run Push-Example, it tries also to run the app I last built. This one used xtify. The one I try to run - push-example, was unchanged with the exception of the sender-id. The manifest file looks fine.

I do not understand this.

Brgds

Peter

** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
** Service (xti) Create **
xti_service_create (B4A line: 12)
xtify.initialize("xtify")
com.xtify.android.sdk.InvalidFormatException: Could not read the api key. No meta data found in the manifest file.
at com.xtify.android.sdk.PersistentLocationManager.a(Unknown Source)
at com.xtify.android.sdk.PersistentLocationManager.c(Unknown Source)
at com.xtify.android.sdk.PersistentLocationManager.a(Unknown Source)
at com.xtify.android.sdk.PersistentLocationManager.<init>(Unknown Source)
at com.nejo.android.xtify.nejoXTIFY.initialize(nejoXTIFY.java:27)
at Xtracard.Customer.xti._service_create(xti.java:102)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:167)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:151)
at Xtracard.Customer.xti.onCreate(xti.java:42)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:1949)
at android.app.ActivityThread.access$2500(ActivityThread.java:117)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:989)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3687)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:842)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
at dalvik.system.NativeStart.main(Native Method)
java.lang.RuntimeException: Unable to create service Xtracard.Customer.xti: java.lang.RuntimeException: com.xtify.android.sdk.InvalidFormatException: Could not read the api key. No meta data found in the manifest file.
at android.app.ActivityThread.handleCreateService(ActivityThread.java:1959)
at android.app.ActivityThread.access$2500(ActivityThread.java:117)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:989)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3687)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:842)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.RuntimeException: com.xtify.android.sdk.InvalidFormatException: Could not read the api key. No meta data found in the manifest file.
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:193)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:151)
at Xtracard.Customer.xti.onCreate(xti.java:42)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:1949)
... 10 more
Caused by: com.xtify.android.sdk.InvalidFormatException: Could not read the api key. No meta data found in the manifest file.
at com.xtify.android.sdk.PersistentLocationManager.a(Unknown Source)
at com.xtify.android.sdk.PersistentLocationManager.c(Unknown Source)
at com.xtify.android.sdk.PersistentLocationManager.a(Unknown Source)
at com.xtify.android.sdk.PersistentLocationManager.<init>(Unknown Source)
at com.nejo.android.xtify.nejoXTIFY.initialize(nejoXTIFY.java:27)
at Xtracard.Customer.xti._service_create(xti.java:102)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:167)
... 13 more
Installing file.
PackageAdded: package:anywheresoftware.b4a.samples.push
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
Connected to B4A-Bridge (Wifi)
sending message to waiting queue (CallSubDelayed - UpdateStatus)
** Service (xti) Create **
xti_service_create (B4A line: 12)
xtify.initialize("xtify")
com.xtify.android.sdk.InvalidFormatException: Could not read the api key. No meta data found in the manifest file.
at com.xtify.android.sdk.PersistentLocationManager.a(Unknown Source)
at com.xtify.android.sdk.PersistentLocationManager.c(Unknown Source)
at com.xtify.android.sdk.PersistentLocationManager.a(Unknown Source)
at com.xtify.android.sdk.PersistentLocationManager.<init>(Unknown Source)
at com.nejo.android.xtify.nejoXTIFY.initialize(nejoXTIFY.java:27)
at Xtracard.Customer.xti._service_create(xti.java:102)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:167)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:151)
at Xtracard.Customer.xti.onCreate(xti.java:42)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:1949)
at android.app.ActivityThread.access$2500(ActivityThread.java:117)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:989)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3687)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:842)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
at dalvik.system.NativeStart.main(Native Method)
java.lang.RuntimeException: Unable to create service Xtracard.Customer.xti: java.lang.RuntimeException: com.xtify.android.sdk.InvalidFormatException: Could not read the api key. No meta data found in the manifest file.
at android.app.ActivityThread.handleCreateService(ActivityThread.java:1959)
at android.app.ActivityThread.access$2500(ActivityThread.java:117)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:989)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3687)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:842)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.RuntimeException: com.xtify.android.sdk.InvalidFormatException: Could not read the api key. No meta data found in the manifest file.
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:193)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:151)
at Xtracard.Customer.xti.onCreate(xti.java:42)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:1949)
... 10 more
Caused by: com.xtify.android.sdk.InvalidFormatException: Could not read the api key. No meta data found in the manifest file.
at com.xtify.android.sdk.PersistentLocationManager.a(Unknown Source)
at com.xtify.android.sdk.PersistentLocationManager.c(Unknown Source)
at com.xtify.android.sdk.PersistentLocationManager.a(Unknown Source)
at com.xtify.android.sdk.PersistentLocationManager.<init>(Unknown Source)
at com.nejo.android.xtify.nejoXTIFY.initialize(nejoXTIFY.java:27)
at Xtracard.Customer.xti._service_create(xti.java:102)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:167)
... 13 more
** Service (pushservice) Start **
Error: INVALID_SENDER
** Service (pushservice) Start **
Error: INVALID_SENDER
** Activity (main) Pause, UserClosed = true **
** Service (pushservice) Start **
Error: INVALID_SENDER
 
Upvote 0
Top