Hi I try create flutter android app and I want just like free-to-pay app, my app show some Ads and user pay some money to remove it. and also like app-in-perches and game, Access to the number of features only after payment.
I couldn't find a good resource to teach this. please help me.
Your need is specific to your project, you might not find a resource to teach it directly.
I would suggest in your user details, attach a value to check if user is subscribed or not:
user:{
... user details,
"subscription": false //true if user has subscribed
}
Subscription initial value for every user will be set to false, when user subscribe set it to true.
With this boolean value (or using an enum), you can differentiate app features for different users.
To lean more about about Google Admob with Flutter you can check this codelab:
Adding AdMob ads to a Flutter app https://codelabs.developers.google.com/codelabs/admob-ads-in-flutter#0
I got two resources for you to checkout:
Google admob guide
pub package
Related
I want to implement a refer-a-friend kind of functionality onto my application such that every user will have a unique link directing to the apk and the user can share the link via different mediums. I am done with the generating link part, now I wanted to know how to identify the user hitting the link and also check whether or not the app was installed/downloaded. If it was installed, then I need to add some credits onto the link owner's account. And my issue needs to be resolved without the use of API's.
Any help would be appreciated.
For every user you need to have a unique code stored on your server, like A has FOO766, A has BAR456.
You can use Google's referrer feature. In this method, when you A shares your app to another user, you need to append a A's unique code with your app's Play store link. And when another user installs your app, a BroadcastReceiver of your app will be called, containing the code; with which you can verify referral. More info Google Campaigns.
Or you can do it manually. Whenever a user installs your app, ask him for the referral code, and you can verify the referral condition's over the server & can determine is it valid or not.
You can achieve this without api.
Create one Label which consist some data.
Now add Scheme for that at your application (Manifest).
After that write code at First screen which get value from that label.
https://developer.android.com/training/basics/intents/filters.html
FYI :
Myapp
So I have an iOS and Android phone application that also has a Facebook application which enables users to share information. Every time someone downloads the application my analytics should show installs both iOS and Android, unfortunately it is just iOS, I'm not sure how to get it to register the Android installs, can anyone help?
This is very easy to do, just from looking at the documentation, please check there next time. Here is what you need to do:
On your very first Activity add the following to your onCreate, As you can see below it requires a context and maybe the application ID.
AppEventsLogger.activateApp(this, yourAppIdHere);
https://developers.facebook.com/docs/reference/android/current/class/AppEventsLogger/
I am looking to restrict access to a new widget I have added to one of my Android apps, so that it is available as an In-App purchase.
Is there a way to check to see if the widget as been purchased and if not the stop the user from being able to use it?
I can easily query items in Activity classes but in the AppWidgetProvider I am struggling to get there.
If it is possible, could you provide either a link or some sample code to nudge me in the right direction.
Okay, since there was no help I managed to find a work around myself ;)
Incase anyone else wants to know :-
When the In-app product is purchased I add a unique identifier to the shared preferences and recall it when it tries to create the widget.
I am not currently using Facebook's Android SDK in my Android app, and I only want to integrate it enough to capture installs via Facebook Mobile App Install Ads.
The documentation describes the need to "[c]omplete your Basic page under App Settings." If I enter my app's package name--and only its package name--I get an error:
You have specified Package Name, but you did not specify Class Name. Launching a native Android application requires both.
I don't want or need my app to be launched, do I? I only want to track conversion rates of ad clicks to app installs (and runs). The only way I can get the Promote link to show up on the left is to supply values for Class Name and Key Hash and set Facebook Login to Enabled. Is this really necessary?
Yes, it is necessary to fill out those basic details to use our SDK, however, those fields are only used for login authentication via fb - which is the most popular use case for our SDK. Your app will not be launched or anything like that if you supply those fields. For your case, just fill them out and leave it as is and you will be able to run ads without worrying about anything else.
The API requires these fields. Although in my experience it doesn't launch your app. It is merely used for the credentials in the development side of the Facebook integration in www.developer.facebook.com
Hope that helps.
RF
I'm searching for a tutorial or an explanation on how to remove advertisement in my application with in-app purchase?
I will put some ads with ad-mob in my app but I also want, that the user can disable the ads when he pays a little donation. Do you know a site or tutorial where I can find a step-by-step explanation how to do this?
Or do I need to publish 2 versions of my app? One with ads and one without ads for paying?
Don't use the SharedPreferences method because if the user flushes the app data or uninstalls/reinstalls your app their ad-free status will be lost.
A couple of ideas:
If your app has any kind of web based login or authorization, you can flag the user as having bought the ad free version by updating the web database's customer data and then disable ads in code following login and verification. This has the added benefit of following the user to new devices.
Use one of the several ways to get a unique device id, and store that in a web server database. On startup, query the DB to see if the device is ad-free. See Android Unique Device ID. This will only work for that particular device though.
The two apps approach is simple enough to get the job done too. :)
This presentation seems to explain an example and includes a link to source code at github:
http://gotocon.com/dl/2011/GeekNights/Tjen_penge_p%C3%A5_Android_ARH.pdf .
It stores the purchased upgrade at a sharedpreference.
However, I'm still looking for a more secure and robust solution that works out the use-case explained here:
http://vlingo-en.custhelp.com/app/answers/detail/a_id/1785/~/moving-in-app-purchase-(ad-removal)-to-new-android-phone/p/180