[Q] GCM isn't working in my program - Android Q&A, Help & Troubleshooting

I decided to implement Google Cloud Messaging push notifications to notify users about news. I think it is topic messaging. For implement I took the Google GCM sample. I added all needed services, permissions and receiver in manifest. When I send a post request to Google GCM server, the response is true with message ID, but device doesn't notify. What is the matter? I tested in Bluestacks.
My manifest:
Code:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="..."
xmlns:tools="..."
package="packagename" >
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="packagename.permission.C2D_MESSAGE" />
<permission android:name="packagename.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<application
android:name=".App"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".activities.MainActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="@string/app_name"
android:launchMode="singleTop" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".activities.BiographyActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="@string/title_biography"
android:parentActivityName=".activities.MainActivity"
tools:ignore="UnusedAttribute" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".activities.MainActivity" />
</activity>
<activity
android:name=".activities.AboutActivity"
android:label="@string/title_about_app" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".activities.MainActivity" />
</activity>
<activity android:name=".activities.CrashReportDialog"
android:theme="@style/Theme.Dialog"
android:process=":error_report"
android:launchMode="singleInstance"
android:excludeFromRecents="true"
android:finishOnTaskLaunch="true" />
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
<receiver
android:name="com.google.android.gms.gcm.GcmReceiver"
android:exported="true"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="packagename" />
</intent-filter>
</receiver>
<service
android:name="packagename.AppGcmListenerService"
android:exported="false" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
</intent-filter>
</service>
<service
android:name="packagename.AppInstanceIDListenerService"
android:exported="false">
<intent-filter>
<action android:name="com.google.android.gms.iid.InstanceID"/>
</intent-filter>
</service>
<service
android:name="packagename.RegistrationIntentService"
android:exported="false">
</service>
</application>
</manifest>
Main Activity:
Code:
public class MainActivity extends AppCompatActivity {
private BroadcastReceiver mRegistrationBroadcastReceiver;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
mRegistrationBroadcastReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
SharedPreferences sharedPreferences =
PreferenceManager.getDefaultSharedPreferences(context);
boolean sentToken = sharedPreferences
.getBoolean(GcmPreferences.SENT_TOKEN_TO_SERVER, false);
if (sentToken) {
Log.i("GCM", "Success!");
} else {
Log.i("GCM", "Error!");
}
}
};
Intent intent = new Intent(this, RegistrationIntentService.class);
startService(intent);
}
}
GCM Listener Service:
Code:
public class AppGcmListenerService extends GcmListenerService {
private static final String TAG = "GCM";
/**
* Called when message is received.
*
* @param from SenderID of the sender.
* @param data Data bundle containing message data as key/value pairs.
* For Set of keys use data.keySet().
*/
@Override
public void onMessageReceived(String from, Bundle data) {
String message = data.getString("message");
Log.d(TAG, "From: " + from);
Log.d(TAG, "Message: " + message);
/**
* Production applications would usually process the message here.
* Eg: - Syncing with server.
* - Store message in local database.
* - Update UI.
*/
/**
* In some cases it may be useful to show a notification indicating to the user
* that a message was received.
*/
sendNotification(message);
}
/**
* Create and show a simple notification containing the received GCM message.
*
* @param message GCM message received.
*/
private void sendNotification(String message) {
Intent intent = new Intent(this, MainActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
PendingIntent pendingIntent = PendingIntent.getActivity(this, 0 /* Request code */, intent,
PendingIntent.FLAG_ONE_SHOT);
Uri defaultSoundUri= RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this)
.setSmallIcon(R.drawable.ic_app)
.setContentTitle("GCM Message")
.setContentText(message)
.setAutoCancel(true)
.setSound(defaultSoundUri)
.setContentIntent(pendingIntent);
NotificationManager notificationManager =
(NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
notificationManager.notify(0 /* ID of notification */, notificationBuilder.build());
}
}
Instance ID Listener Service:
public class AppInstanceIDListenerService extends InstanceIDListenerService {
/**
* Called if InstanceID token is updated. This may occur if the security of
* the previous token had been compromised. This call is initiated by the
* InstanceID provider.
*/
@Override
public void onTokenRefresh() {
// Fetch updated Instance ID token and notify our app's server of any changes (if applicable).
Intent intent = new Intent(this, RegistrationIntentService.class);
startService(intent);
}
}
Registration Intent Service:
Code:
public class RegistrationIntentService extends IntentService {
private static final String TAG = "GCM";
public RegistrationIntentService() {
super(TAG);
}
@Override
protected void onHandleIntent(Intent intent) {
SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);
try {
// In the (unlikely) event that multiple refresh operations occur simultaneously,
// ensure that they are processed sequentially.
synchronized (TAG) {
// Initially this call goes out to the network to retrieve the token, subsequent calls
// are local.
InstanceID instanceID = InstanceID.getInstance(this);
String token = instanceID.getToken(getString(R.string.gcm_defaultSenderId),
GoogleCloudMessaging.INSTANCE_ID_SCOPE, null);
Log.d(TAG, "GCM Registration Token: " + token);
subscribeTopics(token);
// You should store a boolean that indicates whether the generated token has been
// sent to your server. If the boolean is false, send the token to your server,
// otherwise your server should have already received the token.
sharedPreferences.edit().putBoolean(GcmPreferences.SENT_TOKEN_TO_SERVER, true).apply();
}
} catch (Exception e) {
Log.d(TAG, "Failed to complete token refresh", e);
// If an exception happens while fetching the new token or updating our registration data
// on a third-party server, this ensures that we'll attempt the update at a later time.
sharedPreferences.edit().putBoolean(GcmPreferences.SENT_TOKEN_TO_SERVER, false).apply();
}
// Notify UI that registration has completed, so the progress indicator can be hidden.
Intent registrationComplete = new Intent(GcmPreferences.REGISTRATION_COMPLETE);
LocalBroadcastManager.getInstance(this).sendBroadcast(registrationComplete);
}
/**
* Subscribe to any GCM topics of interest, as defined by the TOPICS constant.
*
* @param token GCM token
* @throws IOException if unable to reach the GCM PubSub service
*/
private void subscribeTopics(String token) throws IOException {
GcmPubSub.getInstance(this).subscribe(token, "/topics/global", null);
}
}
My POST request:
Code:
GCM Server
Content-Type:application/json
Authorization:key=mykey
{
"to": "/topics/global",
"data": {
"message": "This is a GCM Topic Message!",
}
}
I tested POST request. Android app tested on Bluestacks App Player. I noticed also the app is not in the running services in the settings. Also I tested the app on real phone, but notifications still does not come I have no use for a long time working on it. The issue is strangely. I checked my code - whole is true as in the Google sample and documentation.

Related

[Q] Broadcast Receivers

Hello, I am trying to create a broadcast receiver to detect when the screen was locked. I have it already working to detect when the the tablet was booted, but it won't work for the SCREEN_OFF action. Right now I just have it log any intents that where triggered and so far its only working for when the boot was completed.
Code:
package com.atlantis;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
public class broadcastReceiver extends BroadcastReceiver {
[user=439709]@override[/user]
public void onReceive( Context context , Intent intent ) {
Log.v( "atlantis" , "Hey this intent was triggered " + intent );
if ( "android.intent.action.BOOT_COMPLETED".equals(intent.getAction()) ) {
Intent launchMain = new Intent ( context, MainActivityService.class );
context.startService( launchMain );
}
}
}
Android manifest:
Code:
<receiver
android:name = "com.atlantis.broadcastReciever"
android:enabled = "true"
android:exported = "false" >
<intent-filter>
<action android:name = "android.intent.action.ACTION_SCREEN_OFF" />
<action android:name = "android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
Thanks
reply
did you write anything for screen lock intent... if yes display that code..

[Q] Receive a broadcast AFTER user click on OK button AFTER uninstall was completed?

I placed all the receiver tags in AndroidManifest.xml:
Code:
<receiver android:name="my.package.MyBroadcastReceiver" >
<intent-filter>
<category android:name="android.intent.category.DEFAULT" />
<action android:name="android.intent.action.PACKAGE_REMOVED" />
<data android:scheme="package" />
</intent-filter>
</receiver>
And implemented my BroadcastReceiver subclass:
Code:
public class MyBroadcastReceiver extends BroadcastReceiver {
[user=439709]@override[/user]
public void onReceive( final Context context, final Intent intent ) {
Log.w( "RECEIVED!!!!!!!" );
}
}
This works very fine!!! But... The onReceive method is called AFTER uninstall was completed but BEFORE users press OK at confirmation activity showed by native system.
I wanna, if exists, receive a broadcast AFTER user press OK.
Thanks!

[Q] How do I use intent ACTION_TIME_TICK with BroadcastReceiver in a widget?

Hi, i'm try to create a simple clock that needs to be updated every minute, I want to use a BroadcastReceiver that listen the ACTION_TIME_TICK, however, it never launches, I have the action registered in the AndroidManifest:
Code:
<receiver android:name=".MainWidget" >
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE"></action>
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
android:resource="@xml/widget_provider">
</meta-data>
</receiver>
<receiver android:name=".WidgetBroadcastReceiver" >
<intent-filter>
<action android:name="android.intent.action.TIME_TICK"></action>
</intent-filter>
</receiver>
The class MainWidget extends from AppWidgetProvider:
Code:
[user=439709]@override[/user]
public void onUpdate(Context context, AppWidgetManager appWidgetManager,
int[] appWidgetIds) {
// TODO Auto-generated method stub
//super.onUpdate(context, appWidgetManager, appWidgetIds);
updateWidget(context);
context.startService(new Intent(context, WidgetBroadcastReceiver.class));
}
public void updateWidget(Context context){
RemoteViews updateViews = new RemoteViews(context.getPackageName(), R.layout.activity_main_widget);
updateViews.setTextViewText(R.id.test, actualDate);
ComponentName myComponentName = new ComponentName(context, MainWidget.class);
AppWidgetManager manager = AppWidgetManager.getInstance(context);
manager.updateAppWidget(myComponentName, updateViews);
}
And the class WidgetBroadcastReceiver from BroadcastReceiver where I have this on the onReceive method:
Code:
if(action.equals(Intent.ACTION_TIME_TICK)){
Log.i("TICK", "WORKS");
}
But it never adds anything in the log, any help? Thanks in advanced, have a nice day!

Usage: Simple BroadcastReceiver with Manifest file

I'm learning about BroadcastReceiver with kitkat version. So far I spend more than 12+ hours searching for answer to fix below code. (I tried BLUETOOTH, BOOT_COMPLETE, sms received and wifi state and nothing worked so far)
Here's the file:
Code:
<receiver
android:name="MountReceiver"
android:enabled="true"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MEDIA_UNMOUNTED" />
<action android:name="android.intent.action.MEDIA_MOUNTED" />
<data android:scheme="file" />
</intent-filter>
</receiver>
Code:
#cat MountReceiver.java
public class MountReceiver extends BroadcastReceiver {
public MountReceiver(){
}
@Override
public void onReceive
(Context context, Intent intent) {
// react to the event
Toast.makeText(MainActivity.this
, "Hello there", Toast.LENGTH_SHORT).show();
}
}
Issue is , toast is not appearing. Please note have MainActivity.java which is different from above MountReceiver.java - Is that fine, or I need to move this code into MainActivity. Thanks for any help. (Im new to this forum, if this is not correct topic, please move this question)

someone can tell me why my app can't run in anroid13?

the app can run in huawei nova5zd, OS is HarmonyOS 2.0.0, but can't run in pixel4xl, android 13, showing "no permission", the main code is
Java:
public class TestLocationActivity extends AppCompatActivity {
public static final int LOCATION_CODE = 301;
public static final String TAG = "TestLocationActivity:wp";
private LocationManager locationManager;
private String locationProvider = null;
com.adan.gpsdemo.databinding.ActivityTestBinding activityTestBinding;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
activityTestBinding = ActivityTestBinding.inflate(getLayoutInflater());
setContentView(activityTestBinding.getRoot());
getLocation();
}
private void getLocation(){
//1.获取位置管理器
locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
//2.获取位置提供器,GPS或是NetWork
List<String> providers = locationManager.getProviders(true);
if (providers.contains(LocationManager.GPS_PROVIDER)) {
//如果是GPS
locationProvider = LocationManager.GPS_PROVIDER;
Log.v(TAG, "定位方式GPS");
} else if (providers.contains(LocationManager.NETWORK_PROVIDER)) {
//如果是Network
locationProvider = LocationManager.NETWORK_PROVIDER;
Log.v(TAG, "定位方式Network");
}else {
Toast.makeText(this, "没有可用的位置提供器", Toast.LENGTH_SHORT).show();
return;
}
if (Build.VERSION_CODES.M <= Build.VERSION.SDK_INT) {
//获取权限(如果没有开启权限,会弹出对话框,询问是否开启权限)
if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)
!= PackageManager.PERMISSION_GRANTED ||
ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION)
!= PackageManager.PERMISSION_GRANTED) {
//请求权限
ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.ACCESS_FINE_LOCATION,
Manifest.permission.ACCESS_COARSE_LOCATION}, LOCATION_CODE);
} else {
//3.获取上次的位置,一般第一次运行,此值为null
Location location = locationManager.getLastKnownLocation(locationProvider);
if (location!=null){
// notice textview change
showGPSValue(location.getLongitude(),location.getLatitude());
Log.v(TAG, "获取上次的位置-经纬度:"+location.getLongitude()+" "+location.getLatitude());
getAddress(location);
}else{
//监视地理位置变化,第二个和第三个参数分别为更新的最短时间minTime和最短距离minDistace
locationManager.requestLocationUpdates(locationProvider, 3000, 1,locationListener);
}
}
} else {
Location location = locationManager.getLastKnownLocation(locationProvider);
if (location!=null){
showGPSValue(location.getLongitude(),location.getLatitude());
Log.v(TAG, "获取上次的位置-经纬度:"+location.getLongitude()+" "+location.getLatitude());
getAddress(location);
}else{
//监视地理位置变化,第二个和第三个参数分别为更新的最短时间minTime和最短距离minDistace
locationManager.requestLocationUpdates(locationProvider, 3000, 1,locationListener);
}
}
}
@SuppressLint("SetTextI18n")
private void showGPSValue(double longitude, double latitude){
new Thread(()->{
// 39.951111, 75.172778 change to 75°10'22''E,39°57'04''N
int hour = (int) longitude;
double minute = getDecimalValue(longitude) * 60;
double second = getDecimalValue(minute) * 60;
int hour_lat = (int) latitude;
double minute_lat = getDecimalValue(latitude) * 60;
double second_lat = getDecimalValue(minute_lat) * 60;
String strLong = hour + "°" + (int)minute + "'" + (int)second + "\"";
String strLat = hour_lat + "°" + (int)minute_lat + "'" + (int)second_lat + "\"";
Log.i(TAG,"longitude:" + strLong);
Log.i(TAG,"latitude:" + strLat);
activityTestBinding.tvGpsValue.setText(strLong + "E," + strLat + "N");
}).start();
}
/**
* get decimal of a value
* @param value double include int and decimal
* @return decimal of value
*/
private double getDecimalValue(double value){
long longPart = (long) value;
BigDecimal bigDecimal = new BigDecimal(Double.toString(value));
BigDecimal bigDecimalLongPart = new BigDecimal(Double.toString(longPart));
double dPoint = bigDecimal.subtract(bigDecimalLongPart).doubleValue();
Log.i(TAG,"DecimalValue:" + dPoint);
return dPoint;
}
public LocationListener locationListener;
{
locationListener = new LocationListener() {
// Provider的状态在可用、暂时不可用和无服务三个状态直接切换时触发此函数
@SuppressWarnings("deprecation")
@Contract(pure = true)
@Override
public void onStatusChanged(String provider, int status, Bundle extras) {
}
// Provider被enable时触发此函数,比如GPS被打开
@Override
public void onProviderEnabled(String provider) {
}
// Provider被disable时触发此函数,比如GPS被关闭
@Override
public void onProviderDisabled(String provider) {
}
//当坐标改变时触发此函数,如果Provider传进相同的坐标,它就不会被触发
@Override
public void onLocationChanged(Location location) {
if (location != null) {
//如果位置发生变化,重新显示地理位置经纬度
showGPSValue(location.getLongitude(),location.getLatitude());
Log.v(TAG, "监视地理位置变化-经纬度:" + location.getLongitude() + " " + location.getLatitude());
}
}
};
}
@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
if (requestCode == LOCATION_CODE) {
if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED
&& grantResults[1] == PackageManager.PERMISSION_GRANTED) {
Toast.makeText(this, "申请权限", Toast.LENGTH_LONG).show();
try {
List<String> providers = locationManager.getProviders(true);
if (providers.contains(LocationManager.NETWORK_PROVIDER)) {
//如果是Network
locationProvider = LocationManager.NETWORK_PROVIDER;
} else if (providers.contains(LocationManager.GPS_PROVIDER)) {
//如果是GPS
locationProvider = LocationManager.GPS_PROVIDER;
}
Location location = locationManager.getLastKnownLocation(locationProvider);
if (location != null) {
showGPSValue(location.getLongitude(),location.getLatitude());
Log.v("TAG", "获取上次的位置-经纬度:" + location.getLongitude() + " " + location.getLatitude());
} else {
// 监视地理位置变化,第二个和第三个参数分别为更新的最短时间minTime和最短距离minDistace
locationManager.requestLocationUpdates(locationProvider, 0, 0, locationListener);
}
} catch (SecurityException e) {
e.printStackTrace();
}
} else {
Toast.makeText(this, "缺少权限", Toast.LENGTH_LONG).show();
finish();
}
} else {
throw new IllegalStateException("Unexpected value: " + requestCode);
}
}
//获取地址信息:城市、街道等信息
private void getAddress(Location location) {
List<Address> result;
try {
if (location != null) {
Geocoder gc = new Geocoder(this, Locale.getDefault());
result = gc.getFromLocation(location.getLatitude(),
location.getLongitude(), 1);
new Thread(()->{
String addValue = result.toString();
activityTestBinding.tvAddressValue.setText(addValue);
}).start();
Log.v(TAG, "获取地址信息:"+ result);
}
} catch (Exception e) {
e.printStackTrace();
}
}
@Override
protected void onDestroy() {
super.onDestroy();
locationManager.removeUpdates(locationListener);
}
}
Click to expand...
Click to collapse
XML:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:ignore="ExtraText">
<!-- 粗略的位置权限 -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <!-- 精确的位置权限 -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.GPSDemo">
<activity
android:name=".TestFusedLocationProviderClientActivity"
android:exported="true">
<!-- <meta-data-->
<!-- android:name="android.app.lib_name"-->
<!-- android:value="" />-->
</activity>
<activity android:name=".MainActivity"></activity>
<activity android:name=".TestGPS2"></activity>
<activity android:name=".TestLocationActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".Test1" />
<activity android:name=".Test2" />
</application>
</manifest>
whloe code is
GitHub - yhm2046/GPSDemo: test gps
test gps. Contribute to yhm2046/GPSDemo development by creating an account on GitHub.
github.com
mm11751 said:
the app can run in huawei nova5zd, OS is HarmonyOS 2.0.0, but can't run in pixel4xl, android 13, showing "no permission", the main code is
XML:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:ignore="ExtraText">
<!-- 粗略的位置权限 -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <!-- 精确的位置权限 -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.GPSDemo">
<activity
android:name=".TestFusedLocationProviderClientActivity"
android:exported="true">
<!-- <meta-data-->
<!-- android:name="android.app.lib_name"-->
<!-- android:value="" />-->
</activity>
<activity android:name=".MainActivity"></activity>
<activity android:name=".TestGPS2"></activity>
<activity android:name=".TestLocationActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".Test1" />
<activity android:name=".Test2" />
</application>
</manifest>
whloe code is
GitHub - yhm2046/GPSDemo: test gps
test gps. Contribute to yhm2046/GPSDemo development by creating an account on GitHub.
github.com
Click to expand...
Click to collapse
Most likely because Android 13 includes behavior changes that may affect your app. The following behavior changes apply exclusively to apps that are targeting Android 13 or higher.
Privacy
Granular media permissions
Use of body sensors in the background requires new permission
Performance and battery
User experience
App color theme applied automatically to WebView content
Google Play services
Updated non-SDK restrictions
rodken said:
Most likely because Android 13 includes behavior changes that may affect your app. The following behavior changes apply exclusively to apps that are targeting Android 13 or higher.
Privacy
Granular media permissions
Use of body sensors in the background requires new permission
Performance and battery
User experience
App color theme applied automatically to WebView content
Google Play services
Updated non-SDK restrictions
Click to expand...
Click to collapse
I modify some code , but sitll don't work. Now how can I do ?
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
mm11751 said:
I modify some code , but sitll don't work. Now how can I do ?
Click to expand...
Click to collapse
Try API Level 33.
rodken said:
Try API Level 33.
Click to expand...
Click to collapse
I modified this code, still no work
mm11751 said:
I modified this code, still no work
Click to expand...
Click to collapse
Are you the developer of the app?
rodken said:
Are you the developer of the app?
Click to expand...
Click to collapse
yes, I wrote it
mm11751 said:
yes, I wrote it
Click to expand...
Click to collapse
You might want to redirect your question(s) to this forum to receive more than one insight on the issue.

Categories

Resources