Android Play Store Campaign tracking pre-requisites - android

I'm attempting to use a campaign to promote my application. I've found these instructions and am attempting to do step one:
https://developers.google.com/analytics/devguides/collection/android/v2/campaigns#google-play-campaigns
However, my IDE (IntelliJ) is telling me it cannot resolve "com.google.analytics.tracking.android.CampaignTrackingService" in the Manifest file.
Is this a Bug in the IDE? Or is there a library I'm meant to be including with my application? And are there any other steps they have missed out? E.g. do I need to be adding internet permissions to my application?
When I run the application it seems to work fine, and here is my Android Manifest file:
<uses-sdk android:minSdkVersion="7" android:targetSdkVersion="17" />
<application
android:icon="#drawable/ic_launcher_toddlerswords"
android:label="#string/app_name"
android:hardwareAccelerated="true">
<activity android:name="maddy.toddlercolors.ToddlerWords"
android:screenOrientation="landscape"
android:theme="#android:style/Theme.NoTitleBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="maddy.toddlercolors.menu.QuickPrefsActivity" android:label="#string/app_name"/>
<!-- Used for install referral measurement-->
<service android:name="com.google.analytics.tracking.android.CampaignTrackingService"/>
<receiver android:name="com.google.analytics.tracking.android.CampaignTrackingReceiver" android:exported="true">
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER" />
</intent-filter>
</receiver>
</application>

After some further reading it looks like campaign tracking requires a google analytics jar, and will require internet permissions.
https://developers.google.com/analytics/devguides/collection/android/v2/

Related

Google Analytics not communicating to server - AnalyticsReceiver is not registered or is disabled - error

I have setup react native firebase on my android react-native app to track app hits on analytics. But the hits are not reaching from android emulator. So, I checked the log with adb logcat and found out the below warnings and suspect that this might be causing the issue.
AnalyticsReceiver is not registered or is disabled. Register the receiver for reliable dispatching on non-Google Play devices. See link for instructions.
CampaignTrackingReceiver is not registered, not exported or is disabled. Installation campaign tracking is not possible. See link for instructions.
AnalyticsService not registered in the app manifest. Hits might not be delivered reliably. See link for instructions.
I followed this post and did some changes to the manifest file.
Modified AndroidManifest.xml file:
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.truuue.truuuerental">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.DOWNLOAD_WITHOUT_NOTIFICATION" />
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application
android:name=".MainApplication"
android:label="#string/app_name"
android:icon="#mipmap/ic_launcher"
android:allowBackup="false"
android:theme="#style/AppTheme">
<meta-data android:name="com.facebook.sdk.ApplicationId"
android:value="#string/facebook_app_id"/>
<activity android:name="com.facebook.FacebookActivity"
android:configChanges=
"keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:label="#string/app_name" />
<activity
android:name="com.facebook.CustomTabActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="#string/fb_login_protocol_scheme" />
</intent-filter>
</activity>
<activity
android:name=".MainActivity"
android:label="#string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<action android:name="android.intent.action.DOWNLOAD_COMPLETE"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="truuuetenant" android:host="*" />
</intent-filter>
</activity>
<receiver android:name="com.appsflyer.SingleInstallBroadcastReceiver" android:exported="true">
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER" />
</intent-filter>
</receiver>
<!-- Optionally, register AnalyticsReceiver and AnalyticsService to support background dispatching on non-Google Play devices -->
<receiver android:name="com.google.android.gms.analytics.AnalyticsReceiver"
android:enabled="true">
<intent-filter>
<action android:name="com.google.android.gms.analytics.ANALYTICS_DISPATCH" />
</intent-filter>
</receiver>
<service android:name="com.google.android.gms.analytics.AnalyticsService"
android:enabled="true"
android:exported="false"/>
<!-- Optionally, register CampaignTrackingReceiver and CampaignTrackingService to enable
installation campaign reporting -->
<receiver android:name="com.google.android.gms.analytics.CampaignTrackingReceiver"
android:exported="true">
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER" />
</intent-filter>
</receiver>
<service android:name="com.google.android.gms.analytics.CampaignTrackingService" />
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
<!-- You will only need to add this meta-data tag, but make sure it's a child of application -->
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="AIzaSyB3stzerjTZEubg4WqkF1mJeqAB7TcnXj0"/>
<uses-library
android:name="org.apache.http.legacy"
android:required="false" />
</application>
</manifest>
But still the error is appearing. Any idea on how to solve this issue?
According to the mail that I recently received from Google Analytics team,
What does “stopped processing” mean?
New data you send to the Google Analytics properties listed above will
not be serviced and will therefore, not appear on your reports. This
will appear as though you are no longer sending app data to Google
Analytics.
What will happen to my Google Analytics properties listed above?
Reporting access through our UI and API access will remain available for these properties’ historical data until January 31,
2020.
After our service is fully turned down in February 2020, these legacy properties will no longer be accessible via our Google
Analytics UI or API, and the associated data will be deleted from
Google Analytics servers. In advance of this turndown, we recommend
that you retrieve this historical data through report exports.
NOTE: Bottomline, it is advised to follow and use the Firebase Analytics for reports.

Can't find uses-permission into manifest file

I'm trying to upload a new version of an application into Google Developer Console.
At the end of the upload, the console show this error message:
"Your APK uses permissions that require the setting of privacy policies: (android.permission.CAMERA)"
So I think that I have this uses-permission into the manifest file and I need to add a google privacy policy.
That's ok, but this is my manifest file:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="simone.biliato.delonghitrevisotvb">
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity
android:name="simone.biliato.delonghitrevisotvb.MainActivity"
android:label="#string/app_name"
android:theme="#style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service android:name="simone.biliato.delonghitrevisotvb.NotificationInstanceIdService">
<intent-filter>
<action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
</intent-filter>
</service>
<service android:name="simone.biliato.delonghitrevisotvb.NotificationMessagingService">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
</application>
Where are all the permissions? Why I don't see them? I'm sure that I added them earlier and now disappear. Is there a specific location? A list of all permission for the project?
User permissions are made up from the ones you have in your manifest and those that come from the library or dependencies you have in your project. The result will be a manifest merged by all of them. Check your dependencies.
You can use the apk analyzer : https://developer.android.com/studio/build/apk-analyzer.html
Our friends from CommonsWare give us a good solution to detect where the permissions come from:
https://commonsware.com/blog/2015/06/25/hey-where-did-these-permissions-come-from.html
To get a better sense of where those elements are
coming from, we can look at
app/build/outputs/logs/manifest-merger-debug-report.txt.

re. Android) run an app to AndoridStudio or when you tried to install the apk app files are not visible

After Facebook Login connect, Run app in AndroidStudio, program execution is going with device, but the file will are not be visible. I do not know why this is the case happens.
I found a solution on the Internet. but I could not apply this solution in AndroidStudio here.
Has anyone experienced the same thing ? please tell me advice. thanks
have a problem with my AndroidManifest.xml file?
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.facebooktest.test.facebooktest">
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity
android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="#string/fb_login_protocol_scheme" />
</intent-filter>
</activity>
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="#string/facebook_app_id" />
<activity
android:name="com.facebook.FacebookActivity"
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:label="#string/app_name"
android:theme="#android:style/Theme.Translucent.NoTitleBar" />
</application>
<uses-permission android:name="android.permission.INTERNET" />
</manifest>
please read over your question ask i have no idea what your talking about , and why am seeing your manifest if your issue file not found
If its about building apk
goto the build menu click build apk , it the same menu used to rebuild app -- clean app

Installing wear/mobile app on android wear device does not work

I have developed a android wear demo application. The Android wear description mentions that the wear application is automatically installed on the wear device when installed on the mobile device.
My problem is now that this does not work. The app was created with Android studio.
Wenn I start the waer (sided) app with debugging enabled it installs the app on the wear device and it works ok. Once I install the mobile app (which includes the waer app) the wear on the wear device is deleted, bit the waer not installed on the wear device anymore.
Same happens when I want to debug the apps. Whenever I debug the mobile app the app on the wear device is deleted but not installed.
As written the curios thing is that I can install the wear app directly from within Android stuudio.
All the settings look ok, created automatically by Android studio.
The mobile manifest looks like that:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.waldhoer.klemens.klemenswearsampleapp" >
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".KlemensActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service android:name=".FallRecognitionService" android:enabled="true"></service>
<service android:name=".DataLayerListenerService" android:enabled="true">
<intent-filter>
<action android:name="com.google.android.gms.wearable.BIND_LISTENER" />
</intent-filter>
</service>
<meta-data android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
</application>
<uses-permission android:name="android.permission.BODY_SENSORS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
</manifest>
The wear manifest like this:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.waldhoer.klemens.klemenswearsampleapp" >
<uses-feature android:name="android.hardware.type.watch" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#android:style/Theme.DeviceDefault" >
<activity
android:name=".KlemensWearActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service android:name=".WearFallRecognitionService" android:enabled="true"></service>
<service android:name=".DataLayerListenerService">
<intent-filter>
<action android:name="com.google.android.gms.wearable.BIND_LISTENER" />
</intent-filter>
</service>
<meta-data android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
</application>
<uses-permission android:name="android.permission.BODY_SENSORS" />
</manifest>
I also created a release version of the (mobile) app with Key signed, did not change anything.
Any idea what could be wrong? Thanks for help!

Android - Declare widget in manifest

I have 1 android app project and 1 widget project, they all work fine. Now, i want to include widget project to android app project in order to when user install application, the widget will be installed too. I did like below but it did not work. Any helps?
Thanks you!
In manifest file:
<application>
............ (this is of android app project. below is of widget).......
<receiver android:name=".widget.PlayerWidgetActivity" >
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data android:name="android.appwidget.provider"
android:resource="#xml/playerwidgetprovider" />
</receiver>
<service android:name=".widget.PlayerWidgetActivity$UpdateService" />
<service android:name=".widget.PlayerWidgetActivity$ServiceBindUnbindService" />
</application>
EDIT: My application is quite big (.APK ~ 10MB), of course it has many activity, many services, many broadcast receivers, ..... so it takes times to build.
I create a new very small application with just an activity and put the code for widget like i put on the big app above. It works! OMG! Why it worked on that small app but not my big app :(
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name" >
<activity
android:label="#string/app_name"
android:name=".activity.ApplicationWithWidgetActivity" >
<intent-filter >
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<receiver android:name=".widget.PlayerWidgetActivity"
android:icon="#drawable/ic_launcher"
android:label="#string/appwidget_name">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data android:name="android.appwidget.provider"
android:resource="#xml/playerwidgetprovider" />
</receiver>
<service android:name=".widget.PlayerWidgetActivity$UpdateService" />
<service android:name=".widget.PlayerWidgetActivity$ServiceBindUnbindService" />
</application>
I've had same problem!
The solution is - INSTALLING APPLICATION INTO PHONE.
Just move application to phone and you will see your widget.
Hope it helps you!
Info from here: http://www.hrupin.com/2012/07/how-to-fix-android-homescreen-widget-installation-widget-as-part-of-android-application

Categories

Resources