BOOT_COMPLETED broadcast message not received - Android Q&A, Help & Troubleshooting

I have a Samsung Galaxy j7 Max, I am trying to make an app that is suppose to start on reboot and power on. I have declared the following permission in my AndroidManifest.xml-:
Code:
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
Also I have declared the following broadcast receiver-:
Code:
<receiver
android:name="homeutil.sreyan.homeutil.BootCompleted"
android:enabled="true"
android:exported="true"
>
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.REBOOT"/>
<action android:name="android.intent.action.QUICKBOOT_POWERON" />
</intent-filter>
</receiver>
But no matter how many times I power off or restart my phone I the broadcast receiver for the Boot completed event is never fired.
Can someone please help me ? Is there something I am doing wrong ? my phone uses fingerprint and password as a security lock, can those be causing a problem ?

Related

No Launcher activity found!

I'm not a developer but I want to debug an Android app on my Droid. I have Eclipse installed, etc.
I am stuck now because I don't know how to define a launcher activity. Here are the console messages:
Code:
[2010-01-17 11:33:36 - TestApp]Android Launch!
[2010-01-17 11:33:36 - TestApp]adb is running normally.
[2010-01-17 11:33:36 - TestApp]No Launcher activity found!
[2010-01-17 11:33:36 - TestApp]The launch will only sync the application package on the device!
[2010-01-17 11:33:36 - TestApp]Performing sync
[2010-01-17 11:33:36 - TestApp]Automatic Target Mode: using device '04036_my_droid_09834'
[2010-01-17 11:33:36 - TestApp]Application already deployed. No need to reinstall.
[2010-01-17 11:33:36 - TestApp]/TestApp/bin/TestApp.apk installed on device
[2010-01-17 11:33:36 - TestApp]Done!
Where can I find some help for this? Thanks.
The launcher activity is defined in the AndroidManifest.XML file.
It is defined as:
<activity android:name=".ActivityName">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
Hope that helps! I had to dig around a while to find this information too...but my app now runs properly.
I'm having ENDLESS issues getting my app to run...
I'm following this tutorial but even adding your code, it still crashes when installing and opening the app on my device....
PLEASE HELP
Here is y AndroidManifest:
Code:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.myfirstapp"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="17"
android:targetSdkVersion="21" android:maxSdkVersion="19"/>
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>

-Permission Denial: receiving Intent- with C2DM

Hi,
I want to use the C2DM, but I always get follwoing Error:
Code:
10-05 02:10:40.394: WARN/ActivityManager(11985): Permission Denial: receiving Intent { act=com.google.android.c2dm.intent.REGISTRATION cat=[mobile.app] (has extras) } to mobile.app requires mobile.app.permission.C2D_MESSAGE due to sender com.google.android.gsf (uid 10046)
Here is my Manifest.xml:
Code:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="mobile.app"
android:versionName="0.1"
android:versionCode="1">
<uses-sdk android:minSdkVersion="10" />
<!-- Only this application can receive the messages and registration result -->
<permission android:name="com.google.android.c2dm.permission.C2D_MESSAGE" android:protectionLevel="signature" />
<uses-permission android:name="mobile.app.permission.C2D_MESSAGE" />
<!-- This app has permission to register and receive message -->
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<!-- Send the registration id to the server -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.USE_CREDENTIALS" />
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".Main">
<intent-filter>
<action android:name="android.intent.action.MAIN"></action>
<category android:name="android.intent.category.LAUNCHER"></category>
</intent-filter>
</activity>
<!-- Only C2DM servers can send messages for the app. If permission is not set - any other app can generate it -->
<receiver android:name=".C2DMReceiver" android:permission="com.google.android.c2dm.permission.SEND">
<!-- Receive the actual message -->
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="mobile.app" />
</intent-filter>
<!-- Receive the registration id -->
<intent-filter>
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="mobile.app" />
</intent-filter>
</receiver>
</application>
</manifest>
Anyone an idea?
thanks!
Questions or Problems Should Not Be Posted in the Development Forum
Please Post in the Correct Forums
Moving to Q&A

[Q] ADW Theme - Help...

Alright so to start off i have eclipse, the android sdk, and all that other good stuff setup properly.
Now the problem is i keep getting an error in the androidmanifest.xml saying
<uses-sdk android:minSdkVersion="4"/>
The error message when clicked upon is, <uses-sdk> tag appears after <application> tag.
I have tried multiple versions of the sdk build including 2.2 (as the guide suggest) and changing the minimum sdk requirement but i always seem to run into this exact same problem. Any ideas? Oh and also im using this template
AnderWeb-ADW.Theme-Template-d8491c4
Heres the entire AndroidManifest.xml...
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="Red.Glow.Adw"
android:versionCode="1"
android:versionName="1.0"
android:installLocation="internalOnly">
<application android:label="@string/theme_title" android:icon="@drawable/theme_icon">
<activity android:name=".main"
android:label="@string/theme_title">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="org.adw.launcher.THEMES" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<intent-filter>
<action android:name="org.adw.launcher.icons.ACTION_PICK_ICON" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name="red.glow.adw.docks"
android:label="@string/theme_title"
android:icon="@drawable/theme_icon">
<intent-filter>
<action android:name="android.intent.action.PICK" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="image/*" />
</intent-filter>
</activity>
<provider android:name="red.glow.adw.docksProvider" android:authorities="red.glow.adw.docksProvider" />
</application>
<uses-sdk android:minSdkVersion="4"/>
</manifest>
Ehh figured it out.. AnderWeb's template build was throwing me up a ton of errors but kaydensigh's template works great.

Please Help, Settings crash I don't know why

Hi, earlier in my quest to create a Home Screen app, I have stumbled upon this code which was brilliant in order to let me do exactly what I wish to do. it couldn't work better than it does.
However ever since I included this when I run it on a tablet the following message appears "Settings have stopped working" the app continues functioning without any worries, however this is really bad because I don't want it to lhave these errors since I'm plannning on distributing the application....
<activity
android:name="com.myapp.launcher.MainActivity"
android:exported="true"
/>
<activity-alias
android:name="LauncherAlias1"
android:targetActivity="com.myapp.launcher.MainActivity"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.HOME" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity-alias>
<activity-alias
android:name="LauncherAlias2"
android:enabled="false"
android:targetActivity="com.myapp.launcher.MainActivity"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.HOME" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity-alias>

Amazfit Watch 2 - TrainingPlan data lost after re-pairing

Hi,
need your help with TrainingPlan app.
After reinstalling Amazfit Watch app, I had to pair the phone with watch again. Don't know why but after sync, TrainingPlan app got wiped.
It's not that big of a deal, because all the activities are still recorded on the watch/mobile/strava but I was in the middle of half-marathon training plan and would like to continue it.
In order to restore/recreate this data, I need to know how exactly this app is storing it.
I have already reviewed the source code available on gitlab.com - /Neuer_User/PACEfied_AmazFit
I have also downloaded the TrainingPlan.apk directly from the watch (with adb) and decompiled it (apktools) and reviewed the app in IDE.
Here is the content of AndroidManifest.xml from TrainingPlan:
Code:
...
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permisison android:name="com.huami.watch.permission.RECEIVE_WAKEUP"/>
<uses-permission android:name="com.huami.watch.permission.READ_USER_SETTINGS"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="com.huami.watch.permission.READ_USER_SETTINGS"/>
<uses-permission android:name="com.huami.watch.companion.permission.READ_SETTINGS"/>
<uses-permission android:name="com.huami.watch.companion.permission.WRITE_SETTINGS"/>
<uses-permission android:name="android.permission.WRITE_SETTINGS"/>
<uses-permission android:name="com.huami.watch.permission.READ_USER_SETTINGS"/>
<uses-permission android:name="com.huami.watch.permission.WRITE_USER_SETTINGS"/>
<application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:name=".TrainApplication" android:supportsRtl="true" android:theme="@style/train_center_theme">
<meta-data android:name="com.huami.watch.launcher.springboard.PASSAGER_TARGET" android:resource="@array/spring_depend"/>
<activity android:name=".ui.test.TestProvider"/>
<activity android:name=".ui.activity.TrainPlanSimpleSelectActivity" android:theme="@style/train_center_theme">
<intent-filter>
<action android:name="com.huami.watch.train.ui.activity.TrainPlanSimpleSelectActivity"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
<activity android:name=".ui.activity.TrainPlanDetailSelectActivity" android:theme="@style/train_center_theme">
<intent-filter>
<action android:name="com.huami.watch.train.ui.activity.TrainPlanDetailSelectActivity"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
<activity android:name=".ui.activity.TrainRecordDetailActivity">
<intent-filter>
<action android:name="com.huami.watch.train.ui.activity.TrainRecordDetailActivity"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
<activity android:name=".ui.activity.TrainWeeklyRecordDetailActivity"/>
<activity android:name=".ui.activity.TrainWidgetRemindActivity"/>
<service android:name=".ui.notification.NotificationService"/>
<receiver android:name=".ui.notification.NotificationReceiver">
<intent-filter>
<action android:name="com.huami.watch.train.broadcast.daytrainrecord"/>
</intent-filter>
<intent-filter>
<action android:name="com.huami.watch.train.broadcast.finishtrainrecord"/>
</intent-filter>
<intent-filter>
<action android:name="com.huami.watch.train.broadcast.start_service"/>
</intent-filter>
<intent-filter>
<action android:name="com.huami.watch.train.broadcast.end_service"/>
</intent-filter>
<intent-filter>
<action android:name="com.huami.watch.train.broadcast.appstart"/>
</intent-filter>
</receiver>
<receiver android:enabled="true" android:exported="true" android:name=".ui.notification.CloudDataReceiver">
<intent-filter>
<action android:name="com.huami.watch.companion.action.DataSyncRequestApps"/>
</intent-filter>
</receiver>
<provider android:authorities="com.huami.watch.train.ui.provider.dayTrainRecordProvider" android:exported="true" android:name="com.huami.watch.train.ui.provider.DayTrainRecordProvider"/>
<activity android:name=".ui.activity.FinishTrainReasonActivity"/>
</application>
</manifest>
Still no luck.
Can anybody help?
If the data is stored in the watch only (and I think it's the case for Training app), it was wiped out when you unpaired, so there is no way to recover it.
lfom said:
If the data is stored in the watch only (and I think it's the case for Training app), it was wiped out when you unpaired, so there is no way to recover it.
Click to expand...
Click to collapse
Sure. That's understandable. Still, if I know exactly how is it stored - I could recreate it.
I saw a sqlite3 file in xbin folder. Problem is that it is encrypted and I cannot open it.
Does anyone have any idea how do those guys store data on such apps?
pkondrat said:
Sure. That's understandable. Still, if I know exactly how is it stored - I could recreate it.
I saw a sqlite3 file in xbin folder. Problem is that it is encrypted and I cannot open it.
Does anyone have any idea how do those guys store data on such apps?
Click to expand...
Click to collapse
Ah, I see what you want to do now. See my AmazeBackup tool, it backups and restores data to the Sports app, you can use adb to backup data from TrainingPlan app, extract its db, modify the file, add the modded file to backup manually, then try to restore the file to watch (restart watch after you restore to make sure it loads the new data).
lfom - thanks a lot for the tip.
I solved it.
Biggest challenge was to identify and get the access to /data/data/com.huami.watch.train/databases/train_center.db which hold all the data.
After that happended, it was just a try and check for different values in TrainRecord and DayTrainRecord DB tables + adb pull and adb push as a root.
Still, I wonder when they would add those training plans to Amazfit Watch app and synchronize this data properly.

Categories

Resources