Am working with two apps, In A App on clicking button, i hit the playstore link of B App and send data in playstore url and when app is installed, i get parameters from "referrel"
I used InstallReferrelReciever in manifest of B app as like:
<receiver android:name=".data.AppInstallReceiver"
android:permission="android.permission.INSTALL_PACKAGES"
android:enabled="true"
android:exported="true">
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER" />
</intent-filter>
</receiver>
so here i get issue on some devices like Redmi and Oppo InstallReferrelReceiver is not called sometime but that works fine on Samsung devices.
Related
I try to do this for my application to launch automatically when device is rebooted.But this is not working on android 11 devices.
<uses-permissionandroid:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<receiver
android:name=".boot.StartUpBootReceiver"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
You can't launch an Activity from the background on Android 11. The Receiver is working fine most likely. It's the launching that is no longer allowed by the OS.
If you want to make a kiosk mode app, the correct way to do this is to make this app the launcher app so it takes over the home screen.
I am building out an instant app for my existing app in the app store. The full app has a searchview that shows a list of results. When the user taps on one of the results, onNewIntent gets fired which in turn helps me do things in the app.
When porting the code the onNewIntent gets fired in the instant app as expected in a Google Pixel 3 device but the same event doesn't fire on Samsung devices or the emulator.
I have tried most of the stuff mentioned in Stackoverflow. In my AndroidManifest I have the
android:name=".Activity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="Test"
android:launchMode="singleTop"
>
<intent-filter>
<action android:name="android.intent.action.SEARCH" />
</intent-filter>
<meta-data
android:name="android.app.searchable"
android:resource="#xml/searchable" />
<meta-data
android:name="android.app.default_searchable"
android:value=".Activity" />
</activity>
So I would expect the onNewIntent to fire across all devices and OS levels in the instant app but it only seems to fire on the Google Pixel. Ideas?
I have added increment counter in wear module and trying to pass the incremented value to the mobile module. Even though , I receive "successfully sent" response from the wear module(through google API sendmessage() called inside a service), the message is not being received by Listener service(extends Wearable listenerService) in the mobile module.I have added following intent filters for the mobile listener service,
<service android:name=".ListenerService">
<intent-filter>
<action android:name="com.google.android.gms.wearable.BIND_LISTENER" />
<action android:name="com.google.android.gms.wearable.DATA_CHANGED" />
<action android:name="com.google.android.gms.wearable.MESSAGE_RECEIVED" />
<action android:name="com.google.android.gms.wearable.CAPABILITY_CHANGED" />
<action android:name="com.google.android.gms.wearable.CHANNEL_EVENT" />
<data android:scheme="wear" android:host="*" android:pathPrefix="/prefix" />
</intent-filter>
</service>
<meta-data android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
I am incrementing count everytime and but still no response,Everything is fine till it is dispatched from the wearable.Any suggestions would be great.
The following things I have verified,
Both of the modules package names and application Ids are identical.
I am running the wear app on emulator hence, verified that
emulatore is already connected to mobile through Android wear app.
Able to send notifications from mobile to wear app.
Made sure count in wear app is changing everytime I send it to
mobile app.
No signing key difference possiblity as I both the modules are run
as debug builds.
Made sure both the URI paths are same for shared data(count).
I am trying to develop an Android lock screen app and I completed all features except one.
When the phone has rebooted, it shows the home screen, but I want to show my lock screen app so I added the following broadcast receiver:
<receiver android:enabled="true" android:name="receiver.LockScreenReceiver">
<intent-filter android:priority="999">
<action android:name="android.intent.action.BOOT_COMPLETED"/>
<action android:name="com.htc.intent.action.QUICKBOOT_POWERON"/>
<action android:name="android.intent.action.MY_PACKAGE_REPLACED"/>
</intent-filter>
</receiver>
and in the onreceive() method, I start an activity. When the phone has rebooted, my lock screen app opens after 5-10 seconds later, but I want to show my app when the phone has rebooted.
I cannot find any solution. I saw many lock screen apps and they opens with a maximum of 5-10 seconds delay.
I found an app - Next lock screen. It works. It opens the first time after rebooting the phone.
This can increase you priority but still there would be some delay. Since android first load its OS and the all the other activity starts.
<receiver
android:name="receiver.LockScreenReceiver"
android:enabled="true"
android:exported="true"
<intent-filter android:priority="1000">
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
I am trying to run the Timer sample google glass app, but when I run the project, it gets installed and then says DONE, however, I don't see anything on the emulator. I know there is no Launcher and so I tried the RUN CONFIGURATION but I don't see any activity in the dropdown when I chose the Launch option. Any thoughts or guides on to do this ?
First of all there is no avd/emulator available for Glass.But if still you are interested converting your mobile phone into glass.Check these link i.e 1,2,3.But no one works completely treating your phone as Glass.
As you have mentioned above that you try to install an app on emulator.The main reason why it is not showing up is that:
Move to AndroidManifest.xml
<activity
android:name=".MainActivity"
android:label="#string/app_name" >
This is the normal code for the main launcher activity of android.This is the main activity which is launched in the emulator/avd
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
While in Glass code you find something like this.There is no launcher in Glass but still you can add.Here you only found out the voice trigger which open your app
<intent-filter>
<action android:name="com.google.android.glass.action.VOICE_TRIGGER" />
</intent-filter>
<meta-data
android:name="com.google.android.glass.VoiceTrigger"
android:resource="#xml/voicetrigger" />
</activity>